anonymousnomad/covert-coder/aid-skills-auto-load-by-context
Claude Code and agent skill by anonymousnomad/covert-coder
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Checking that the SKILL.md file is still in the repository.
Wire in the AIDE orchestrator to auto-load the right skill (SOP) into every model prompt based on detected task type — the "fluid model" pattern from the 2026 research. Theia AI calls this "Agent Skills (Alpha)"; Cursor has plans; Copilot has instructions. AIDE already has ~80 skills in the global tree but they are loaded manually by the agent. This skill encodes the exact wire-in: the skill registry, the detection signals, the injection point in harness/orchestrator.mjs, and the test that proves the right skill lands in the system prompt for the right task. Use whenever the user wants the model to behave like an expert per task without naming a skill, or when building any new orchestrator that composes multiple skills.
Install
npx vskill@latest install anonymousnomad/covert-coder/aid-skills-auto-load-by-contextSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as anonymousnomad/covert-coder/aid-skills-auto-load-by-context.
Skills Auto-Load by Context — Wire-In Recipe for AIDE
What this skill is
AIDE has ~80 skills in the global tree (C:\Users\Grey_\.agents\skills\*.md). Each one is a Standard Operating Procedure (SOP) — a doctrine document that tells the model exactly what to do, how to do it, what not to do, and which pitfalls to watch for. Today, these skills are loaded manually: the user (or the orchestrator) has to NAME a skill for it to appear in the system prompt.
This is the wrong default. Per the 2026 research (Theia AI Skills, Cursor plans, Copilot instructions), the standard is: the orchestrator detects the task type and auto-loads the right skill. The user never names a skill. The model behaves like an expert per task because the SOP changed, not because the weights changed.
This skill encodes the exact wire-in: the skill registry, the detection signals, the injection point, and the test that proves the right skill lands in the system prompt for the right task.
Research base (primary sources, verified 2026-09-03)
- Theia AI Skills (Alpha) —
https://theia-ide.org/docs/user_ai/#agent-skills-alpha
- "Skills are directories of instructions + resources that the orchestrator loads automatically based on context."
- "The user never names a skill."
- Each skill has a
name+description; the orchestrator matches user intent to skill metadata. - The skill content is injected into the system prompt when the orchestrator detects a match.
- Skills can be created on the fly (CreateSkill agent) or shipped with the IDE.
- Theia AI Agent Modes —
https://theia-ide.org/docs/theia_ai/#agent-modes
- Agents can have multiple operational modes (concise, detailed, plan, edit).
- The mode selector appears in the chat input UI.
- The selected mode changes the system prompt behavior.
- Theia AI Variables and Tool Functions —
https://theia-ide.org/docs/theia_ai/#variables-and-tool-functions
- Variables inject context into the prompt (e.g.
#file:foo.ts→ file content). - Tool functions let the LLM call actions on demand.
- Skills are a higher-level composition: instructions + variables + tool functions.
- Theia AI Architecture —
https://theia-ide.org/docs/theia_ai/
- Agents are injected services that mediate between the UI and the LLM.
- The Prompt Service resolves variables and functions in prompt fragments automatically.
- Custom agents register via DI (
bind(Agent).toService(MyAgent)).
- AIDE architecture (verified from source):
harness/orchestrator.mjs(111 lines) is the main orchestrator. Flow: intake → plan (reasonprovider) → build (buildprovider) → repair → verify (verifyprovider) → veritas.node/src/services/agent-loop.mjs(561 lines) is the agent loop that calls the model with the constructed prompt.node/src/services/agent-loop.mjs:10-19loads the credocore guardrail into the system prompt (PART A only, 6 lines).node/src/services/agent-loop.mjs:8comment: "Shared credo loader — single discipline source per THE QUAD Law #1."- The orchestrator's
reasonstep is the natural injection point: before calling the LLM, detect the task type and load the matching skill.
- Existing AIDE skills (the auto-load source pool):
C:\Users\Grey_\.agents\skills\aid-dap-real-debugpy-fixture\SKILL.md— Python debug tasksC:\Users\Grey_\.agents\skills\aid-double-check-everything\SKILL.md— pre-commit verificationC:\Users\Grey_\.agents\skills\aid-closed-loop-self-improvement\SKILL.md— self-improvement tasksC:\Users\Grey_\.agents\skills\aid-moe-lora-6gb-card\SKILL.md— fine-tuning tasksC:\Users\Grey_\.agents\skills\aid-venv-care\SKILL.md— Python venv tasksC:\Users\Grey_\.agents\skills\aide-arch-protocols\SKILL.md— LSP/DAP tasksC:\Users\Grey_\.agents\skills\aide-release-engineering\SKILL.md— release tasksC:\Users\Grey_\.agents\skills\process-hygiene-sop\SKILL.md— process managementC:\Users\Grey_\.agents\skills\github-repo-professional-setup\SKILL.md— README tasksC:\Users\Grey_\.agents\skills\shopify-capability-engineering\SKILL.md— Shopify tasks- ... and ~70 more.
The skill registry (the detection table)
A skill is selected by matching the task text + workspace context against detection signals. The registry is a simple table:
| Task signal (keywords in user request) | Skill to load | Path | |
|---|---|---|---|
debug, breakpoint, DAP, pydevd, debugpy | aide-arch-protocols | C:\Users\Grey_\.agents\skills\aide-arch-protocols\SKILL.md | |
LSP, language server, completion, hover, diagnostics | aide-arch-protocols | same | |
commit, push, PR, merge, CI, verify, green | aide-release-engineering | C:\Users\Grey_\.agents\skills\aide-release-engineering\SKILL.md | |
README, LICENSE, llms.txt, badge, professional | github-repo-professional-setup | C:\Users\Grey_\.agents\skills\github-repo-professional-setup\SKILL.md | |
Shopify, theme, Liquid, section, app block | shopify-capability-engineering | C:\Users\Grey_\.agents\skills\shopify-capability-engineering\SKILL.md | |
fine-tune, LoRA, QLoRA, training, checkpoint | cipher-qlora-finetune | C:\Users\Grey_\.agents\skills\cipher-qlora-finetune\SKILL.md | |
venv, python, py -3.10, pip install | aid-venv-care | C:\Users\Grey_\.agents\skills\aid-venv-care\SKILL.md | |
process, llama-server, kill, cleanup, stray | process-hygiene-sop | C:\Users\Grey_\.agents\skills\process-hygiene-sop\SKILL.md | |
desktop control, mouse, keyboard, window, screenshot | aide-p6-desktop-control | C:\Users\Grey_\.agents\skills\aide-p6-desktop-control\SKILL.md | |
self-improve, closed-loop, trajectory, retrain | aid-closed-loop-self-improvement | C:\Users\Grey_\.agents\skills\aid-closed-loop-self-improvement\SKILL.md | |
verify, check, test, battery | aid-double-check-everything | C:\Users\Grey_\.agents\skills\aid-double-check-everything\SKILL.md | |
Windows, win32, EBUSY, libuv, UV_HANDLE_CLOSING | aide-windows-dev-reality | C:\Users\Grey_\.agents\skills\aide-windows-dev-reality\SKILL.md |
Multiple matches are allowed (skills compose). The order is: match → load → append to system prompt. If no match, load nothing (don't pollute the prompt).
The injection point
In harness/orchestrator.mjs, the reason step is the natural injection point. Before calling the reason.complete() provider, the orchestrator should:
- Take the user's task text + workspace context.
- Match against the skill registry (case-insensitive keyword search).
- Load the matching skill files (read the SKILL.md, strip the YAML frontmatter).
- Append the skill content to the
contextparameter passed toreason.complete().
The current code (line 35-49) builds the context like this:
The wire-in is to add a skills field to the context (or a new skillsText parameter) that contains the loaded skill content. The reason provider's system prompt includes {{skills}} which resolves to the loaded content.
The wire-in steps (one thing at a time)
- Create the skill registry module at
harness/skill-registry.mjs(new file, ~40 lines):
- Export
loadSkillsFor(task, context)that returns a string of loaded skill content. - Implement the keyword matching from the table above.
- Read each SKILL.md, strip YAML frontmatter, append to the result.
- Cap the total size at
rules.max_context_bytes / 2to leave room for the actual context.
- Modify `harness/orchestrator.mjs` (line 1-5, add import):
``js import { loadSkillsFor } from './skill-registry.mjs'; ` (line 49, before reason.complete): `js const skillsText = bounded(loadSkillsFor(goal, context), rules.max_context_bytes / 2, 'skills'); const plan = await reason.complete({ role: 'reason', mandatory_credo: MANDATORY_CREDO, skills: skillsText, // NEW instruction: '...', task: goal, context: bounded(JSON.stringify(context), rules.max_context_bytes, 'context') }); ``
- Modify the `reason` provider's prompt to include
{{skills}}(this is provider-specific; the harness doesn't own the prompt).
- Write the test at
tests/arch/skill-registry.test.ts(new file, ~60 lines):
- Test 1:
loadSkillsFor("debug this Python script with breakpoints")returns theaide-arch-protocolsskill content. - Test 2:
loadSkillsFor("write a Shopify theme section")returns theshopify-capability-engineeringskill content. - Test 3:
loadSkillsFor("explain the color blue")returns nothing (no match). - Test 4:
loadSkillsFor("debug and commit this")returns BOTHaide-arch-protocolsANDaide-release-engineering(multiple matches). - Test 5: the returned string is bounded (doesn't exceed max_context_bytes / 2).
- Verify the wire-in end-to-end: run the orchestrator with a real task and check the model's output reflects the loaded skill.
Verification (the gate)
The skills-auto-load stage is complete when:
harness/skill-registry.mjsexists and exportsloadSkillsFor(task, context).harness/orchestrator.mjsimports and callsloadSkillsForbeforereason.complete.tests/arch/skill-registry.test.tspasses all 5 tests.- A real orchestrator run with task "debug this Python script" produces a plan that references DAP / breakpoints (proving the skill was loaded).
- A real orchestrator run with task "explain the color blue" produces a plan that does NOT reference DAP / breakpoints (proving no false-positive loading).
Pitfalls (each cost a cycle in research)
- Loading too many skills — the system prompt overflows. Cap at max_context_bytes / 2.
- Loading the wrong skill — keyword matching is brittle. "debug" matches DAP but also "debug a network issue" which should load a different skill. Mitigation: use context (workspace files) to disambiguate, or accept false positives for now.
- YAML frontmatter in skill files — strip it before injecting. The frontmatter is metadata, not instructions for the model.
- Skill content is too long — some skills are 400+ lines. Cap each skill at a max bytes (e.g. 8000 bytes) to keep the prompt manageable.
- Not updating the provider's prompt — if the
reasonprovider's system prompt doesn't include{{skills}}, the loaded content is ignored. The wire-in is two-sided: the harness loads it, the provider renders it. - Loading skills for the build step — the
buildprovider doesn't need skills, it needs the plan. Only thereasonstep benefits from skill auto-loading. - Modifying credocore — the credo is loaded separately (line 10-19 of agent-loop.mjs). Don't conflate skills and credo. Skills are domain SOPs; credo is the universal discipline.
What NOT to do
- Do NOT load all skills always — that defeats the purpose. Load only what matches.
- Do NOT use regex — keyword matching with
.includes()is simpler and good enough. - Do NOT modify the existing skills — the skills are the source of truth. The registry is a read-only layer.
- Do NOT skip the test — the test proves the wire-in works. Without it, the orchestrator silently loads nothing.
- Do NOT load skills in the build step — the
buildprovider already has the plan. Loading skills there just pollutes the context.
Related skills
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/packs/aid-skills-auto-load-by-context/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Extension points
hookPre/post lifecycle hooks
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Grok Build (Cursor)
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/anonymousnomad/covert-coder/aid-skills-auto-load-by-context)