skills/delegating/SKILL.md
Proactively delegates tasks to cost-optimized agents before working in main session. MUST suggest for: tests, typos, formatting, docs, refactors, code reviews, feature implementation, debugging, commit validation. Skips main session token usage by routing to GLM (simple/deterministic), Gemini (reasoning/analysis), Qwen (quality/patterns), or multi-agent orchestration (review, feature dev, bug hunt). Never suggest for: architecture decisions, security-critical code, unknown-cause bugs, performance optimization.
npx skillsauth add jaggerxtrm/jaggers-agent-tools delegatingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Delegate tasks to cost-optimized models (CCS) or multi-agent orchestration workflows (Gemini/Qwen).
Task Pattern → Backend Mapping (auto-selection logic):
| Task Pattern | Backend | Cost | Reason |
|-------------------------------|-------------|--------|--------------------------------|
| typo\|test\|doc\|format | CCS (GLM) | LOW | Simple deterministic |
| think\|analyze\|reason | CCS (Gemini)| MEDIUM | Requires reasoning |
| review.*(code\|security) | Orchestration| HIGH | Multi-agent code review |
| implement.*feature | Orchestration| HIGH | Full development workflow |
| validate.*commit | Orchestration| MEDIUM | Security+Quality validation |
| debug\|bug.*unknown | Orchestration| HIGH | Root cause investigation |
Never Suggest For:
Use AskUserQuestion with:
If user selects "Delegate" → Continue to Step 2 If user selects "Work in main session" → Execute task normally (don't delegate)
Use AskUserQuestion with:
Configuration-Driven: All pattern matching is defined in config.yaml, not hardcoded.
The skill reads config.yaml to determine:
When backend: 'orchestration' is selected, Claude autonomously chooses the appropriate workflow and orchestrates between gemini and qwen CLI tools.
config.yamlgemini -p "..."qwen "..."gemini -r latest -p "..." (to refine)| Workflow | Protocol | | :--- | :--- | | handshake | 1 turn: Agent A (Gemini) proposes -> Agent B (Qwen) validates. | | collaborative | 3 turns: Gemini designs -> Qwen critiques -> Gemini refines. | | troubleshoot | 4 turns: Gemini hypothesis -> Qwen verification -> Gemini root cause -> Final synthesis. |
/delegation [task] or /delegate [task])--glm, --gemini, --orchestrate, etc.)CCS wraps the claude CLI and only works with GLM. It requires a PTY for output and is blocked by the CLAUDECODE nested-session guard — always run via tmux:
tmux new-session -d -s ccs_task "env -u CLAUDECODE ccs glm -p '{task}' > /tmp/ccs_out.txt 2>&1"
sleep 30 # or poll until session exits
cat /tmp/ccs_out.txt
If the task requires file modifications, add --dangerously-skip-permissions:
tmux new-session -d -s ccs_task "env -u CLAUDECODE ccs glm --dangerously-skip-permissions -p '{task}' > /tmp/ccs_out.txt 2>&1"
Gemini is a direct CLI — no tmux workaround needed:
gemini -p "task description"
If the task requires file modifications, add -y to auto-approve all tool calls:
gemini -y -p "task description"
Qwen is a direct CLI — no tmux workaround needed:
qwen "task description"
If the task requires file modifications, add -y to auto-approve all tool calls:
qwen -y "task description"
Multi-turn sequences use Gemini and Qwen direct CLIs. Add -y to all turns when modifications are expected:
gemini -y -p "..." # Turn 1
qwen -y "..." # Turn 2
gemini -y -r latest -p "..." # Turn 3 (refine)
CCS Simple:
/delegate add unit tests for UserService → CCS (GLM)/delegate think about the best database schema → CCS (Gemini)Orchestration Workflows:
/delegate review this code for security issues → Orchestration (parallel-review)/delegate implement OAuth authentication feature → Orchestration (feature-design)/delegate debug crash on startup → Orchestration (bug-hunt)gemini and qwen CLI calls.config.yaml.development
Operational service-knowledge system for a project's services. One skill that creates, discovers, activates, updates, and scopes per-service expert skill packages (SKILL.md + diagnostic scripts + references), kept in sync with the code via a GitNexus-aware drift engine. Use when onboarding to a service, routing a task to the right expert, scaffolding a missing skill, or syncing a skill after the implementation drifted. Triggers: /service-skills, /creating-service-skills, /using-service-skills, /updating-service-skills, /scope, or any task that touches a registered service territory.
development
Bootstrap a complete security pipeline (Dependabot + OSV + Semgrep + gitleaks + pre-commit hooks + Codex review) on any GitHub repo. Designed for free user-private repos where GitHub Advanced Security is unavailable. Reusable across Python/TypeScript/Go/Rust stacks.
testing
Merges queued PRs from xt worktree sessions in the correct order (FIFO), maintaining linear history by rebasing remaining PRs after each merge. Use this skill whenever the user has multiple open PRs from xt worktrees, asks to "merge my PRs", "process the PR queue", "drain the queue", "merge worktree branches", or says "what PRs do I have open". Also activate after any xt-end completion when other PRs are already open, or when the user asks "can I merge yet" or "is CI green". Handles the full sequence: list → sort → CI check → merge oldest → rebase cascade → repeat until queue is empty.
testing
Autonomous session close flow for xt worktree sessions. Use this skill whenever the user says "done", "finished", "wrap up", "close session", "ship it", "I'm done", "ready to merge", or similar. Also activate when all beads issues in the session are closed, or when the user explicitly runs /xt-end. This skill is designed for headless/specialist use: it must make deterministic decisions, auto-remediate common anomalies, and avoid clarification questions unless execution is truly blocked.