Compound Apply Spec
Agent Buildingcompound-apply-specCompound Apply Spec is an Agent Skill for agent building published in the majiayu000/claude-skill-registry repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Write a CompoundSpec v2 JSON payload and apply it via compound_apply to create/update skills, instincts, and docs.
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Inspect the Agent Skill at https://github.com/majiayu000/claude-skill-registry/blob/HEAD/skills/skills/compound-apply-spec/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/compound-apply-spec, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
Why this exists
The plugin is deterministic. The agent is not. So we separate:
- Agent: decides what to learn (writes the spec).
- Tool (
compound_apply): validates and applies changes safely.
CompoundSpec v2
Top-level keys (all optional except schema_version):
schema_version: must be2auto:{ reason, sessionID }
instincts
create[]:{ id, title, trigger, action, confidence }update[]:{ id, confidence_delta, evidence_note }
skills
create[]:{ name, description, body }update[]:{ name, description?, body }
Notes:
namemust match^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$.bodyis markdown without frontmatter.- If updating a skill:
skills.update[].bodymust be the entire final managed body (no snippets/diffs).
docs
sync: boolean (refresh derived indexes/blocks)blocks.upsert[]:{ file, id, content }
Only upsert AI-managed blocks; do not rewrite human-owned text.
When writing markdown content inside docs.blocks.upsert[].content:
- Use repo-root-relative paths when referencing files/dirs (no absolute paths).
changelog
{ note }: a single sentence describing the memory delta.
Apply
- Draft the CompoundSpec v2 as a single JSON object.
- Output JSON only (no code fences, no commentary).
- Run
compound_apply()to validate and write the memory/doc updates.
Manual notes
This section is preserved when the skill is updated. Put human notes, caveats, and exceptions here.