Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
athola avatar

Delegation Core

  • 126 installs
  • 325 repo stars
  • Updated August 2, 2026
  • athola/claude-night-market

delegation-core is an agent skill that supplies token cost tables, budget tiers, and a benefit-versus-cost decision framework for external LLM delegation.

About

delegation-core (documented as cost-estimation under the conjure delegation framework) gives solo and indie builders concrete math for external LLM delegation: compare Gemini and Qwen input/output pricing, plug in expected token volumes, and judge whether time saved and quality gains justify spend. It pairs operational dependencies—quota management and usage logging—so estimates are not theoretical. Use it when you are about to fan out repetitive codebase tasks, large summarization jobs, or bulk generation to a cheaper model and need a consistent rule instead of guessing. The worked examples span low-cost grep-style delegations through medium architecture passes to high-cost full-repo reviews. It does not replace provider dashboards or your own rate limits; it standardizes when to delegate and how to think about marginal cost per task.

  • Per-1M-token rate tables for Gemini 2.0 Pro/Flash and Qwen with context-window notes
  • Cost-benefit formula: delegate only when benefit exceeds cost × 3 safety margin
  • Tiered examples from sub-cent counts to $0.10+ large-context reviews
  • Parent skill conjure:delegation-core with dependencies leyline:quota-management and leyline:usage-logging
  • Estimated ~250 tokens in the skill package for quick reference during delegation decisions

Delegation Core by the numbers

  • 126 all-time installs (skills.sh)
  • Ranked #3,743 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
  • Security screen: HIGH risk (skills.sh audit)
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/athola/claude-night-market --skill delegation-core

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs126
repo stars325
Security audit1 / 3 scanners passed
Last updatedAugust 2, 2026
Repositoryathola/claude-night-market

What it does

Estimate token spend and apply a cost-benefit gate before routing work to external LLMs like Gemini or Qwen.

Who is it for?

Agent developers who routinely delegate scans, summaries, or codegen to Gemini Flash/Pro or Qwen and need a repeatable cost gate.

Skip if: Skip if you only use a single in-agent model with no external API billing, or and already enforce hard monthly caps without per-task estimation.

When should I use this skill?

Before routing repetitive file scans, large summarization, or bulk generation to Gemini, Qwen, or other billed external models.

What you get

You can price a delegation in dollars, apply the 3× safety-margin rule, and align spend with leyline quota and usage logging before the call runs.

  • Dollar estimate for a planned delegation from input/output token counts
  • Go/no-go decision using the cost-benefit ratio with 3× margin

By the numbers

  • Benefit must exceed Cost × 3 before delegating per the documented safety margin
  • Gemini 2.0 Flash listed at $0.075 input and $0.30 output per 1M tokens
  • Skill frontmatter estimates ~250 tokens for the package body

Files

SKILL.mdMarkdownGitHub ↗

Table of Contents

Delegation Core Framework

Overview

A method for deciding when and how to delegate tasks to external LLM services. Core principle: delegate execution, retain high-level reasoning.

When To Use

  • Before invoking external LLMs for task assistance.
  • When operations are token-heavy and exceed local context limits.
  • When batch processing benefits from different model characteristics.
  • When tasks require routing between models.

When NOT To Use

  • Task requires reasoning by Claude

Philosophy

Delegate execution, retain reasoning. Claude handles architecture, strategy, design, and review. External LLMs perform data processing, pattern extraction, bulk operations, and summarization.

Delegation Flow

1. Task Assessment: Classify task by complexity and context size. 2. Suitability Evaluation: Check prerequisites and service fit. 3. Handoff Planning: Formulate request and document plan. 4. Execution & Integration: Run delegation, validate, and integrate results.

Quick Decision Matrix

ComplexityContextRecommendation
HighAnyKeep local
LowLargeDelegate
LowSmallEither

High Complexity: Architecture, design decisions, trade-offs, creative problem solving.

Low Complexity: Pattern counting, bulk extraction, boilerplate generation, summarization.

Detailed Workflow Steps

1. Task Assessment (delegation-core:task-assessed)

Classify the task:

  • See modules/task-assessment.md for classification criteria.
  • Use token estimates to determine thresholds.
  • Apply the decision matrix.

Exit Criteria: Task classified with complexity level, context size, and delegation recommendation.

2. Suitability Evaluation (delegation-core:delegation-suitability)

Verify prerequisites:

  • See modules/handoff-patterns.md for checklist.
  • Evaluate cost-benefit ratio using modules/cost-estimation.md.
  • Check for red flags (security, real-time iteration).

Exit Criteria: Service authenticated, quotas verified, cost justified.

3. Handoff Planning (delegation-core:handoff-planned)

Create a delegation plan:

  • See modules/handoff-patterns.md for request template.
  • Document service, command, input context, expected output.
  • Define validation method.

Exit Criteria: Delegation plan documented.

4. Execution & Integration (delegation-core:results-integrated)

Execute and validate results:

  • Run delegation and capture output.
  • Validate format and correctness.
  • Integrate only after validation passes.
  • Log usage.

Exit Criteria: Results validated and integrated, usage logged.

MCP Authentication

OAuth Client Credentials (Claude Code 2.1.30+)

For MCP servers that don't support Dynamic Client Registration (e.g., Slack), pre-configured OAuth client credentials can be provided:

claude mcp add <server-name> --client-id <id> --client-secret <secret>

This enables delegation workflows through MCP servers that require pre-configured OAuth, expanding the range of external services available for task delegation.

Claude.ai MCP Connectors (Claude Code 2.1.46+)

As an alternative to manual OAuth setup, users can configure MCP servers directly in claude.ai at claude.ai/settings/connectors. These connectors are automatically available in Claude Code when logged in with a claude.ai account: no claude mcp add or credential management required. This provides a browser-based auth flow that may be simpler for services with complex OAuth requirements.

Worktree Isolation for File-Modifying Delegations (Claude Code 2.1.49+)

When delegating tasks that modify files to subagents, use isolation: worktree in the agent frontmatter to run each agent in a temporary git worktree. This prevents file conflicts when multiple delegated agents operate in parallel on overlapping paths. The worktree is auto-cleaned if no changes are made; preserved with commits if the agent produces changes.

# Agent frontmatter for isolated delegation
isolation: worktree

Leyline Infrastructure

Conjure uses leyline infrastructure:

Leyline SkillUsed For
quota-managementTrack service quotas and thresholds.
usage-loggingSession-aware audit trails.
service-registryUnified service configuration.
error-patternsConsistent error handling.
authentication-patternsAuth verification.

See modules/cost-estimation.md for leyline integration examples.

Service-Specific Skills

For detailed service workflows:

  • Skill(conjure:gemini-delegation): Gemini CLI specifics.
  • Skill(conjure:qwen-delegation): Qwen MCP specifics.

Execution Modes

When delegating to multiple agents, choose the appropriate execution mode:

ModeWhen to UseHow It Works
single-sessionSequential tasks, same-file editsClaude works through tasks in order
subagentsParallel independent tasksAgents work independently, report back
agent-teamParallel coordinated tasksAgents can communicate with each other

See references/execution-modes.md for the selection decision matrix, mode compatibility notes, and anti-patterns to avoid.

Module Reference

  • task-assessment.md: Complexity classification, decision matrix.
  • cost-estimation.md: Pricing, budgets, cost tracking.
  • handoff-patterns.md: Request templates, workflows.
  • troubleshooting.md: Common problems, service failures.

Exit Criteria

  • [ ] Task assessed and classified.
  • [ ] Delegation decision justified.
  • [ ] Results validated before integration.
  • [ ] Lessons captured.

Related skills

How it compares

Use for token-dollar math on delegated LLM calls, not for writing API reference docs or implementing barcode capture SDKs.

FAQ

Who is delegation-core for?

Developers shipping agent workflows who pay per token on external models and want delegation-core’s rates and cost-benefit rule before firing another API.

When should I use delegation-core?

Use it in Operate when reviewing agent bills and quotas, in Build when designing which tasks to route to Flash versus Pro, and before any medium- or high-cost delegation (summaries, architecture passes, bulk codegen).

Is delegation-core safe to install?

It is reference math and guidelines; review the Security Audits panel on this Prism page and treat any real API keys only in your own quota/logging setup, not inside the skill text.

AI & Agent Buildingagentsautomation

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.