Forge-core ExtractPrompt
Move bulk reference material from the main SKILL.md body into @-included companion files so the always-loaded content stays lean. USE WHEN an adopted or authored skill's body exceeds its information density because it inlines reference tables, pricing, catalogs, or per-variant guidance.
install
source · Clone the upstream repo
git clone https://github.com/N4M3Z/forge-core
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/N4M3Z/forge-core "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/ExtractPrompt" ~/.claude/skills/n4m3z-forge-core-extractprompt && rm -rf "$T"
manifest:
skills/ExtractPrompt/SKILL.mdsource content
ExtractPrompt
Move bulk reference material out of
SKILL.md into companion files referenced with @ includes. The SKILL.md stays the entrypoint an AI reads to decide behavior; companions load on demand when the AI needs the reference data. Referenced by ForgeAdopt as the extract transform.
Follows [ARCH-0002](docs/decisions/ARCH-0002 Skills Companion Files.md).
What to extract
| Content shape | Extract to a companion? |
|---|---|
| Long reference table (model pricing, language-specific rules, catalogs) | Yes |
| Per-variant guidance (one section per framework, language, or ecosystem) | Yes, one companion per variant |
| Command reference (many commands, each with flags and examples) | Yes, if it spans more than a screen |
| Full example project | Yes, always |
| Workflow that decides HOW to use the skill | No, stays in |
| Constraints, red flags, anti-patterns | No, stays in |
| Decision tables with 3-7 rows | No, inline |
Procedure
-
Identify candidate sections — content that is reference material rather than instruction.
-
For each candidate, move it to a companion file named by its scope (
,PythonReference.md
,Tables.md
).ModelPricing.md -
Replace the extracted block with an
include in@
:SKILL.md## Language-specific guidance @python-security.md @typescript-security.md @go-security.md -
Keep the section heading in
so the AI knows the companion exists.SKILL.md -
Re-read
alone. It should still be a complete instruction — the AI must be able to decide what to do without loading the companion.SKILL.md
Naming
- Companions live in the same directory as
SKILL.md - PascalCase for conceptual companions (
,TemplateReference.md
)SchemaValidation.md - kebab-case for variant-keyed companions (
)python-django-security.md - One companion per topic; do not bundle unrelated reference material
Constraints
must remain complete as instruction on its own — companions are reference, not required loadingSKILL.md- Never extract decision-making content; the AI needs it to choose which companion to read
- Do not create a companion unless at least 200 words would move; smaller moves are just fragmentation
- Keep companion files under 2000 words each; split further if they grow
- Do not nest companions (a companion cannot
-include another companion) — compose at the SKILL.md level@