compile-apm-package Skill 📄
Overview
This skill generates merged context documents from APM primitives. This is primarily required for harnesses that consume a single authoritative file (like Gemini's GEMINI.md) rather than distributed skill directories.
🚫 Non-Negotiables
- Artifact Status — Compiled files (
AGENTS.md, etc.) are generated artifacts. NEVER edit them directly if a.apm/source tree exists. - Conditional Use — Do not run compile if the user's harness (e.g., Claude Code, Copilot Chat) supports native directory-based skills.
- Validation First — Ensure the package is valid before merging primitives.
Decision Tree
- Target supports directory-based skills? -> Use
install-apm-package. - Target needs top-level context? (e.g., Gemini, Codex) -> Run
apm compile. - Authoring shared context? -> Use
apm compileto verify how fragments merge into the final doc.
Workflow
- Verify
apm.ymlexistence. - Execute
python scripts/validate_apm_package.py. - Identify target requirements.
- Run
apm compile [--target <slug>]. - Report the location of generated context files.
Anti-Patterns
- Unnecessary Compilation: Running
apm compilefor a Claude Code project (redundant work). - Direct Artifact Editing: Fixing a typo in
GEMINI.mdinstead of the source.prompt.md.