skill-orchestration
Skill2 starsChanged 3 months agoMITView on GitHub
Dynamic skill router — discovers available SKILL.md metadata, matches the current task to the smallest relevant skill set, and loads those skills before acting. Trigger proactively at the start of non-trivial tasks or whenever the available skill catalog may have changed.
In this repository53 other files it gives its agents.
- instructions/AGENTS.mdAGENTS.md
- skills/software-development/php-best-practices/AGENTS.mdAGENTS.md
- instructions/CLAUDE.mdCLAUDE.md
- architecture-designerSkill
- caveman-commitSkill
- caveman-compressSkill
- cavemanSkill
- conventional-commitSkill
- youtube-contentSkill
- agentkit-skill-authoringSkill
- analogical-thinkingSkill
- investigateSkill
- ponytailSkill
- systematic-debuggingSkill
- mermaid-diagramsSkill
- feature-forgeSkill
- find-skillsSkill
- impeccableSkill
- javascript-proSkill
- legacy-modernizerSkill
- migrationSkill
- no-ai-slopSkill
- olakunlevpn-filament-skillsSkill
- clickupSkill
- clickup-tweak-workflowSkill
- git-advancedSkill
- local-wikiSkill
- mr-reviewSkill
- php-proSkill
- doxSkill
- improveSkill
- openspecSkill
- scrutinizeSkill
- systems-thinkingSkill
- tweakSkill
- tweak-workflowSkill
- prompt-engineerSkill
- laravel-best-practicesSkill
- pest-testingSkill
- php-best-practicesSkill
- security-audit-lightSkill
- security-best-practicesSkill
- spatie-javascriptSkill
- spatie-laravel-phpSkill
- spatie-securitySkill
- spatie-version-controlSkill
- tailwindcss-developmentSkill
- test-driven-developmentSkill
- sql-proSkill
- typescript-proSkill
- ui-ux-pro-maxSkill
- vue-expert-jsSkill
- vue-expertSkill
The file
We split this skill into the rules it gives an agent
12 rules. About 0 are common, 8 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
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
- Distinctive: line 24
Discover: Use the harness catalog only for candidate names and descriptions.
- Distinctive: line 52
Resolve paths: Before reading any selected skill, resolve each name through the bundled helper from the user's current project directory, …
- Very specific: line 66
Handle gaps: If a needed skill is not installed, ask before searching or installing.
- Very specific: line 69
Load and act: Read each resolved file, then resolve relative references from that file's directory.
- Distinctive: line 77
Verify: Run the strongest applicable checks and report any remaining uncertainty.
- Very specific: line 88
Do not select skill-orchestration again after routing has started.
- Distinctive: line 89
Do not execute candidate-skill scripts during discovery.
- Very specific: line 91
Do not install skills during routing.
- Distinctive: line 93
If two skills conflict, apply the more specific instruction unless a global or repository instruction has higher authority.
- Distinctive: line 95
If an unresolved ambiguity would materially change the work, ask the user.
- Distinctive: line 96
If no skill matches, continue with global and repository instructions only.
- Distinctive: line 100
Run this after adding, moving, renaming, or removing skills:
≈ “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.
Files
Skill Orchestration
Discover and select the right skills before acting. Skill metadata is the source of truth; do not maintain a duplicate routing matrix here.
Activation model
Activate skills by reading an existing resolved SKILL.md path. Discovery only reads
frontmatter metadata. Never trust a catalog location without checking it exists;
never use name-based harness loaders because they may flatten namespaces. If this
skill's own catalog path is missing, bootstrap from the canonical helper under
~/.agents/skills/core/skill-orchestration/scripts/. The bundled discovery helper is
the sole script exception; never execute candidate-skill scripts speculatively.
Procedure
- Ground. Apply
SYSTEM.mdand the applicableAGENTS.mdhierarchy before skill guidance. Skills add domain detail; they do not override global rules. Discover. Use the harness catalog only for candidate names and descriptions. It is not authoritative for paths. When absent or stale, run the bundled helper beside this file:
python3 <skill-directory>/scripts/discover_skills.pyFor project work, set
SKILL_AGENT=pi,claude, orcodexwhen harness is known. Discovery precedence is deliberate: shared~/.agents/skillsfirst, then current harness user skills (~/.pi/agent/skills,~/.claude/skills, or~/.codex/skills), then project's.agents/skills, then harness-specific project roots (.pi/skills,.claude/skills, or.codex/skills). WithSKILL_AGENT=auto, helper usesSKILL_AGENTorAI_AGENTto prioritize current harness, then scans other supported harness roots:python3 <skill-directory>/scripts/discover_skills.py \ --agent "${SKILL_AGENT:-auto}"Earlier roots win by skill name. It follows symlinked namespaces and emits
name, absolutepath, anddescription. Treat emitted paths as metadata; resolve selected names in step 4.- Route. Match the request against skill descriptions, then select the smallest sufficient set: normally one workflow skill plus only required domain or verification skills. If no skill matches, continue with global rules.
Resolve paths. Before reading any selected skill, resolve each name through the bundled helper from the user's current project directory, even when the catalog supplied a location:
python3 <skill-directory>/scripts/discover_skills.py \ --agent "${SKILL_AGENT:-auto}" --name <skill-name>Require
test -fon the single absolute stdout path before passing it toread. Valid paths may be shared (~/.agents/skills/<category>/foo/SKILL.md), project local (<project>/.agents/skills/foo/SKILL.md), or harness-specific. Never derive a flat path, strip a category, or create an alias. A nonzero result or missing file means missing or duplicate skill; handle it as a gap.- Handle gaps. If a needed skill is not installed, ask before searching or
installing. After approval, load
find-skills, install only through it, then rerun discovery. Otherwise proceed without the skill. - Load and act. Read each resolved file, then resolve relative references
from that file's directory. If a loader reports
ENOENT, rerun the same agent-aware--namelookup from the project directory and read the emitted path once. Forskill-orchestrationitself, use the canonical~/.agents/skillshelper if the harness path is missing. If lookup returns a different category than the failing path, stale session data is being reused: reload/restart the session; never create a compatibility alias. Compose global → workflow → domain guidance, route only available tools, and implement the smallest correct change. - Verify. Run the strongest applicable checks and report any remaining uncertainty.
Selection rules
- Explicit and mandatory triggers (
MUST,always invoke, exact command names) outrank general semantic matches. - Specific skills outrank broad skills. For example, a Pest test task selects a Pest skill before a general PHP skill.
- Multiple domains may match, but plausibility alone is not enough. Every loaded skill must have a concrete role in the task.
- Do not select
skill-orchestrationagain after routing has started. - Do not execute candidate-skill scripts during discovery; only run the skill-orchestration discovery helper when refreshing the catalog.
- Do not install skills during routing. Install only through
find-skills, only after explicit user approval, then rerun discovery. - If two skills conflict, apply the more specific instruction unless a global or repository instruction has higher authority.
- If an unresolved ambiguity would materially change the work, ask the user.
- If no skill matches, continue with global and repository instructions only.
Catalog validation
Run this after adding, moving, renaming, or removing skills:
python3 <skill-directory>/scripts/discover_skills.py --checkValidation fails for broken symlinks, unreadable or invalid frontmatter, missing
name/description, and duplicate skill names. A successful scan proves only
that skills are discoverable; task selection remains a semantic agent decision.
Why discovery is dynamic
A static matrix drifts whenever a skill is installed, removed, renamed, or kept in a private symlinked namespace. Dynamic discovery keeps routing aligned with the actual filesystem while loading only the skill bodies needed for the task.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
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.

