agentleFS
pecigonzalopecigonzalo/agent-skills/skills/role-orchestrator/SKILL.md

role-orchestrator

Skill0 starsChanged 4 months agoMITView on GitHub

Use this skill when you are a primary agent coordinating subagents or multi-step work, and when deciding whether to delegate, how to split work, how to use TODO and store state, or how to verify delegated output. Provides delegation criteria, quality gates, and compaction recovery. Use pattern-orchestration-complex when the work also needs user approval between phases.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 5 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Never: run two read-write delegations at once, or assume a subagent inherited your skills and store context.

    line 17
  2. Very specific:

    Escalate to pattern-orchestration-complex: when two or more of these hold: 4+ files affected, more than 60 minutes, multiple sequential …

    line 32
  3. Distinctive:

    Read the Explorer delegation template and the standard delegation template for the exact call shapes.

    line 51
  4. Distinctive:

    Every delegation states the skills to load, the requirements, and verifiable success criteria.

    line 57
  5. Distinctive:

    After every delegated task, check:

    line 67
  6. Distinctive:

    Read the compaction recovery template for the exact call shape.

    line 90
  7. Very specific:

    Use TODO only for genuinely multi-step work.

    line 98
  8. Very specific:

    Use storewrite and storepatch for durable plans, decisions, schemas, and context that must survive compaction.

    line 100
  9. Very specific:

    Store items are never auto-loaded: When you see Load store: or [store:<id>], call storeread({ id: "<id>" }) before proceeding, and verify …

    line 102

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Provides: Delegation routing, agent selection, quality gates, escalation rules, and compaction recovery for orchestrating subagents.

Quick Reference

Delegate when work is independent, specialized, read-only discovery, or too large for one focused pass.

Do it directly when the task is small, local, or easier than writing a precise delegation prompt.

Quality rule: review every delegated result before acting on it.

Never: run two read-write delegations at once, or assume a subagent inherited your skills and store context.

Host tools: Before delegating in Pi, read the Pi tool mapping and use its native task and todo forms instead of the OpenCode-style examples in the templates. If store tools are unavailable, omit store calls and keep complete context in TODO descriptions or the conversation. Do not create substitute repository files.


Routing

Work typeApproach
Read-only discoveryDelegate with a narrow question; ask for paths, line ranges, and concise findings
PlanningLoad pattern-task-breakdown, or delegate planning with it attached
ImplementationDelegate one read-write task at a time; parallelize only read-only investigation
Review and verificationDelegate an independent pass when risk or breadth justifies it

Escalate to pattern-orchestration-complex when two or more of these hold: 4+ files affected, more than 60 minutes, multiple sequential phases, cross-cutting or security-critical changes, unclear approach, or architectural decisions required.


Agent Selection

Match the work to the cheapest agent that can do it reliably:

AgentUse for
ExplorerRead-only discovery, locating files, functions, and patterns
ThinkerDeep analysis, planning, research, no writes
FastSimple edits, docs, tests; bounded and low-risk
BalancedStandard implementation, refactors, non-trivial bugfixes
DeepComplex or cross-cutting work, uncertain scope, security or performance critical
Deep-LDeep work needing large context, such as analysis spanning many files

Explorer constraints: Explorer is read-only with bash denied. Do not put shell commands or execution instructions in an Explorer prompt; it has only grep, glob, list, and read. Ask for a summary plus file paths and line ranges, never full file contents. If you need the content, read the identified ranges yourself afterwards.

Read the Explorer delegation template and the standard delegation template for the exact call shapes.


Delegation Contents

Every delegation states the skills to load, the requirements, and verifiable success criteria. Subagents do not inherit your loaded skills or store items, so name them explicitly.

Match skills to the task: role-developer and standards-code for implementation, standards-security or role-security-auditor for security-critical work, role-qa-engineer and standards-testing for tests, role-architect for structure, role-code-review for review, role-technical-writer for docs, pattern-task-breakdown for planning, standards-analysis for problem decomposition and trade-off analysis.

For context continuity across phases, extract session_id from the first result and pass it to later delegations. Read the multi-phase delegation shape.


Quality Gate

After every delegated task, check:

  • Did it answer the exact question, or complete the exact requirement?
  • Are file paths, commands, and assumptions concrete rather than plausible?
  • Did it respect read and write boundaries and avoid forbidden actions?
  • Are tests or verification results present where needed?
  • Do the findings require user approval before implementation?

When a result fails: give targeted feedback once, escalate to a more capable agent once, then split the task or ask the user. Do not loop a third time on the same framing.


Compaction Recovery

Subagents can hit context compaction mid-task. Detect it from a compaction marker in the result, explicit statements about lost context, incomplete work despite a full response, or requirements silently dropped.

To recover:

  • Reuse the original session_id to keep the surviving context.
  • Force a store reload. Store items are not restored after compaction.
  • Summarize progress rather than repeating the original prompt, so work is not duplicated.
  • Limit to two automatic recovery attempts, then escalate to the user or split the task.

Read the compaction recovery template for the exact call shape.

The same applies to your own context. Call storeread() with no ID to list available items, then load only the relevant ones, which restores continuity without bloating context. Do this at the start of a session, after a compaction, when the user references past work or decisions, and before planning multi-session work.


TODO and Store Usage

Use TODO only for genuinely multi-step work. Mark items in_progress when starting and completed immediately on finishing, and keep completed items rather than deleting them.

Use storewrite and storepatch for durable plans, decisions, schemas, and context that must survive compaction. Do not store scratch notes.

Store items are never auto-loaded. When you see Load store: or [store:<id>], call storeread({ id: "<id>" }) before proceeding, and verify subagents did the same. Read the store and TODO call shapes for the exact code, and see pattern-task-breakdown for the canonical prompt_drafts shape.

For long plans, store plain task prompts and TODO descriptions rather than client-specific tool blocks, so any agent can execute them.


Checklist

Before finishing orchestration:

  • Each delegation named its skills, requirements, and success criteria
  • Every delegated output was reviewed, not accepted on faith
  • Read-write delegations ran serially
  • All TODO items are updated or intentionally left open
  • Verification ran, or skipped checks are stated with reasons
  • The user gets a concise final summary in chat, with no new summary files

Integration with Other Skills

With pattern-orchestration-complex: load it when two or more complexity indicators are present, and follow its workflow instead of direct delegation.

With pattern-task-breakdown: produce the plan that feeds TODOs and stored prompt_drafts. Skip it for one or two step tasks.

With tool-store: detailed store operations and durable decision records.

With role-code-review and role-qa-engineer: delegate the independent verification pass.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.