Docs / Contributing
Contributing Skills
Skills are the knowledge base behind Architect. Each skill is a SKILL.md file with YAML frontmatter that encodes architectural best practices for one tech stack or integration. If you know a stack well, you can write a skill and submit it as a PR.
Prerequisites
# Clone the repo
git clone https://github.com/Levironexe/architect
cd architect/architect-cli
# Install dependencies
npm install
# Build
npm run build
# Run tests
npm test
File Location
Skills live in:
architect-cli/skills/
├── stacks/ ← one SKILL.md per framework (express, nextjs, react, etc.)
├── meta/ ← language-level conventions (general-js)
└── patterns/ ← integration libraries (prisma, supabase, clerk, etc.)
Create a new file: architect-cli/skills/stacks/<your-stack>/SKILL.md
Use an existing skill as your starting point — express-api/SKILL.md is a good template.
Required Fields
Every skill is a SKILL.md file with YAML frontmatter. The frontmatter must include:
| Field | Required | Notes |
|---|---|---|
schema_version | Yes | Always "2.0.0" |
id | Yes | kebab-case, unique across all skills |
name | Yes | Human-readable display name |
version | Yes | Semver, start at "1.0.0" |
description | Yes | One sentence summary |
category | Yes | stack, meta, or integration |
language | Yes | javascript, python, csharp, etc. |
frameworks | Yes | Array; empty [] for meta skills |
detection | Yes | At least one detection signal |
structure.required_dirs | Yes | The directories this stack must have |
separation.rules | Yes | At least two rules with rule_text and example |
anti_patterns | Yes | At least one with bad_example and good_example |
The markdown body (after the --- closing the frontmatter) can include additional sections:
| Section | Optional | Notes |
|---|---|---|
| Service Layer | Yes | Pattern, location, and naming for service files. Triggers service extraction phase in plans. |
| Composition | Yes | Rules for when this skill is combined with others (integration skills only). |
Detection Rules
Detection rules must be specific enough that the skill doesn't match the wrong project. Check for collisions with existing skills:
detection:
dependencies:
any:
- your-framework # matched against package.json dependencies
none:
- conflicting-pkg # exclude if this dep exists (prevents false matches)
files:
- config-file.js # matched against project root files
source_indicators:
- "framework.init(" # matched against source file content
Run architect skill list in a fixture project to verify your skill activates correctly and doesn't false-positive on other stacks.
Writing Good Examples
Every separation rule and anti-pattern needs real, runnable code examples — not pseudocode.
anti_patterns:
- id: god_file
severity: critical # critical | warning | info
description: "One sentence: what the problem is."
bad_example: |
# The actual bad code, exactly as a developer would write it
good_example: |
# The corrected version with a comment explaining the structure
Testing Your Skill
- Build the CLI:
npm run build - Check the skill loads:
node dist/cli/index.js skill list - See the rendered blueprint:
node dist/cli/index.js context --techstack your-skill-id - Run
architect initagainst a fixture or real project:node dist/cli/index.js init ./tests/fixtures/your-fixture --integration claude - Open the generated SKILL.md and verify it reads clearly
- If your skill includes a Service Layer section, verify that
architect contextincludes it in the output - If your skill includes Composition rules, test with a fixture that has both skills active
PR Checklist
Before submitting:
-
SKILL.mdfile is in the correct directory (stacks/,meta/, orpatterns/) - YAML frontmatter contains all required fields
-
detectionrules are specific — no false positives on existing stacks -
structure.required_dirshaspurposefilled in for every entry - Every
separation.rulesentry has arule_textand a workingexample - Every
anti_patternsentry has bothbad_exampleandgood_example -
architect context --techstack <your-id>produces clean output -
architect initagainst a real or fixture project writes a valid SKILL.md - If Service Layer section included: pattern, location, and naming are defined
- If Composition section included: combined-with targets reference existing skills
- No existing tests broken (
npm test)