ccs-delegation
Auto-activate CCS CLI delegation for deterministic tasks. Parses user input, auto-selects optimal profile (glm/kimi/custom) from ~/.ccs/config.json, enhances prompts with context, executes via `ccs {profile} -p "task"` or `ccs {profile}:continue`, and reports results. Triggers on "use ccs [task]" patterns, typo/test/refactor keywords. Excludes complex architecture, security-critical code, performance optimization, breaking changes.
Install
mkdir -p .claude/skills/ccs-delegation && curl -L -o skill.zip "https://mcp.directory/api/skills/download/2770" && unzip -o skill.zip -d .claude/skills/ccs-delegation && rm skill.zipInstalls to .claude/skills/ccs-delegation
About this skill
CCS Delegation
Delegate deterministic tasks to cost-optimized models via CCS CLI.
Core Concept
Execute tasks via alternative models using:
- Initial delegation:
ccs {profile} -p "task" - Session continuation:
ccs {profile}:continue -p "follow-up"
Profile Selection:
- Auto-select from
~/.ccs/config.jsonvia task analysis - Profiles: glm (cost-optimized), kimi (long-context/reasoning), custom profiles
- Override:
--{profile}flag forces specific profile
User Invocation Patterns
Users trigger delegation naturally:
- "use ccs [task]" - Auto-select best profile
- "use ccs --glm [task]" - Force GLM profile
- "use ccs --kimi [task]" - Force Kimi profile
- "use ccs:continue [task]" - Continue last session
Examples:
- "use ccs to fix typos in README.md"
- "use ccs to analyze the entire architecture"
- "use ccs --glm to add unit tests"
- "use ccs:continue to commit the changes"
Agent Response Protocol
For /ccs [task]:
-
Parse override flag
- Scan task for pattern:
--(\w+) - If match:
profile = match[1], remove flag from task, skip to step 5 - If no match: continue to step 2
- Scan task for pattern:
-
Discover profiles
- Read
~/.ccs/config.jsonusing Read tool - Extract
Object.keys(config.profiles)→availableProfiles[] - If file missing → Error: "CCS not configured. Run: ccs doctor"
- If empty → Error: "No profiles in config.json"
- Read
-
Analyze task requirements
- Scan task for keywords:
/(think|analyze|reason|debug|investigate|evaluate)/i→needsReasoning = true/(architecture|entire|all files|codebase|analyze all)/i→needsLongContext = true/(typo|test|refactor|update|fix)/i→preferCostOptimized = true
- Scan task for keywords:
-
Select profile
- For each profile in
availableProfiles: classify by name pattern (see Profile Characteristic Inference table) - If
needsReasoning: filter profiles wherereasoning=true→ prefer kimi - Else if
needsLongContext: filter profiles wherecontext=long→ prefer kimi - Else: filter profiles where
cost=low→ prefer glm selectedProfile = filteredProfiles[0]- If
filteredProfiles.length === 0: fallback toglmif exists, else first available - If no profiles: Error
- For each profile in
-
Enhance prompt
- If task mentions files: gather context using Read tool
- Add: file paths, current implementation, expected behavior, success criteria
- Preserve slash commands at task start (e.g.,
/cook,/commit)
-
Execute delegation
- Run:
ccs {selectedProfile} -p "$enhancedPrompt"via Bash tool
- Run:
-
Report results
- Log: "Selected {profile} (reason: {reasoning/long-context/cost-optimized})"
- Report: Cost (USD), Duration (sec), Session ID, Exit code
For /ccs:continue [follow-up]:
-
Detect profile
- Read
~/.ccs/delegation-sessions.jsonusing Read tool - Find most recent session (latest timestamp)
- Extract profile name from session data
- If no sessions → Error: "No previous delegation. Use /ccs first"
- Read
-
Parse override flag
- Scan follow-up for pattern:
--(\w+) - If match:
profile = match[1], remove flag from follow-up, log profile switch - If no match: use detected profile from step 1
- Scan follow-up for pattern:
-
Enhance prompt
- Review previous work (check what was accomplished)
- Add: previous context, incomplete tasks, validation criteria
- Preserve slash commands at start
-
Execute continuation
- Run:
ccs {profile}:continue -p "$enhancedPrompt"via Bash tool
- Run:
-
Report results
- Report: Profile, Session #, Incremental cost, Total cost, Duration, Exit code
Decision Framework
Delegate when:
- Simple refactoring, tests, typos, documentation
- Deterministic, well-defined scope
- No discussion/decisions needed
Keep in main when:
- Architecture/design decisions
- Security-critical code
- Complex debugging requiring investigation
- Performance optimization
- Breaking changes/migrations
Profile Selection Logic
Task Analysis Keywords (scan task string with regex):
| Pattern | Variable | Example |
|---|---|---|
/(think|analyze|reason|debug|investigate|evaluate)/i | needsReasoning = true | "think about caching" |
/(architecture|entire|all files|codebase|analyze all)/i | needsLongContext = true | "analyze all files" |
/(typo|test|refactor|update|fix)/i | preferCostOptimized = true | "fix typo in README" |
Profile Characteristic Inference (classify by name pattern):
| Profile Pattern | Cost | Context | Reasoning |
|---|---|---|---|
/^glm/i | low | standard | false |
/^kimi/i | medium | long | true |
/^claude/i | high | standard | false |
| others | low | standard | false |
Selection Algorithm (apply filters sequentially):
profiles = Object.keys(config.profiles)
classified = profiles.map(p => ({name: p, ...inferCharacteristics(p)}))
if (needsReasoning):
filtered = classified.filter(p => p.reasoning === true).sort(['kimi'])
else if (needsLongContext):
filtered = classified.filter(p => p.context === 'long').sort(['kimi'])
else:
filtered = classified.filter(p => p.cost === 'low').sort(['glm', ...])
selected = filtered[0] || profiles.find(p => p === 'glm') || profiles[0]
if (!selected): throw Error("No profiles configured")
log("Selected {selected} (reason: {reasoning|long-context|cost-optimized})")
Override Logic:
- Parse task for
/--(\w+)/. If match:profile = match[1], remove from task, skip selection
Example Delegation Tasks
Good candidates:
- "/ccs add unit tests for UserService using Jest" → Auto-selects: glm (simple task)
- "/ccs analyze entire architecture in src/" → Auto-selects: kimi (long-context)
- "/ccs think about the best database schema design" → Auto-selects: kimi (reasoning)
- "/ccs --glm refactor parseConfig to use destructuring" → Forces: glm (override)
Bad candidates (keep in main):
- "implement OAuth" (too complex, needs design)
- "improve performance" (requires profiling)
- "fix the bug" (needs investigation)
Execution
Commands:
/ccs "task"- Intelligent delegation (auto-select profile)/ccs --{profile} "task"- Force specific profile/ccs:continue "follow-up"- Continue last session (auto-detect profile)/ccs:continue --{profile} "follow-up"- Continue with profile switch
Agent via Bash:
- Auto:
ccs {auto-selected} -p "task" - Continue:
ccs {detected}:continue -p "follow-up"
References
Template: CLAUDE.md.template - Copy to user's CLAUDE.md for auto-delegation config
Troubleshooting: references/troubleshooting.md
You might also like
flutter-development
aj-geddes
Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.
drawio-diagrams-enhanced
jgtolentino
Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.
ui-ux-pro-max
nextlevelbuilder
"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."
godot
bfollington
This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.
nano-banana-pro
garg-aayush
Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.
fastapi-templates
wshobson
Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.
Related MCP Servers
Browse all serversEnhance software testing with Playwright MCP: Fast, reliable browser automation, an innovative alternative to Selenium s
Mobile Next offers fast, seamless mobile automation for iOS and Android. Automate apps, extract data, and simplify mobil
Sub-Agents delegates tasks to specialized AI assistants, automating workflow orchestration with performance monitoring a
SuperAgent is artificial intelligence development software that orchestrates AI agents for efficient, parallel software
Boost productivity with Task Master: an AI-powered tool for project management and agile development workflows, integrat
Supercharge browser tasks with Browser MCP—AI-driven, local browser automation for powerful, private testing. Inspired b
Stay ahead of the MCP ecosystem
Get weekly updates on new skills and servers.