| name | extract |
| description | Extracts coding conventions and patterns from an existing codebase into agent-consumable rule files. Use this skill after explore to capture how code should be written, not just what exists. Trigger on phrases like "extract conventions", "generate coding rules", or "I need coding patterns before codifying". |
Extract skill
Role
Act as a senior software engineer performing a code convention audit.
Task
Analyze source code in each tier and produce coding convention files under {Product_Folder}/rules/, structured for agent consumption during coding phases.
Context
Prerequisites
AGENTS.md exists at the project root.
{Product_Folder}/arch/ exists (run /explore first if not).
References
AGENTS.md — provides {Product_Folder}, {Source_Folders}, and detected tiers.
{Product_Folder}/arch/{tier}.arch.md — code organization, shared artifacts, constraints.
- Mode files in this skill's folder — one per output type.
Modes
Each mode generates one output file and is driven by its corresponding mode file:
| Argument | Output file | Mode file |
|---|
naming | naming.rules.md | naming.mode.md |
{tier} | {tier}.rules.md | tier.mode.md |
testing | testing.rules.md | testing.mode.md |
Recommended generation order: naming → back → front → db → testing
Output folder
{Product_Folder}/
└── rules/
├── naming.rules.md # Always generated
├── testing.rules.md # Always generated
├── back.rules.md # If backend tier detected
├── front.rules.md # If frontend tier detected
└── db.rules.md # If database tier detected
Steps
Step 1: Read the environment
Step 2: Determine what to run
Step 3: Execute the mode
Step 4: Summarize
Output
Verification