|
| 1 | +# Chalk Skills |
| 2 | + |
| 3 | +Agent skills that ship with [Chalk](https://github.com/chalk-pm) -- the product planning system for AI-enabled teams. These skills teach coding agents (Claude Code, Cursor, etc.) how to work with Chalk's documentation-as-product-truth model. |
| 4 | + |
| 5 | +## What Are Chalk Skills? |
| 6 | + |
| 7 | +Chalk skills are structured markdown instructions that agents read at runtime. Each skill gives an agent a specific capability: bootstrapping docs from a codebase, creating plans, updating documentation, or capturing a project's architecture and design system for style transfer. |
| 8 | + |
| 9 | +Skills follow the `.claude/skills/` convention (Claude Code) and `.cursor/skills/` convention (Cursor) so they're auto-discovered by the agent when referenced or triggered. |
| 10 | + |
| 11 | +## Repository Structure |
| 12 | + |
| 13 | +``` |
| 14 | +Chalk-skills/ |
| 15 | +├── README.md |
| 16 | +├── skills/ # All Chalk agent skills |
| 17 | +│ ├── setup-chalk/SKILL.md # Full .chalk/ folder generation with style transfer |
| 18 | +│ ├── setup-docs/SKILL.md # One-shot profile doc bootstrap |
| 19 | +│ ├── create-doc/SKILL.md # Create new docs in .chalk/docs/ |
| 20 | +│ ├── update-doc/SKILL.md # Update existing docs |
| 21 | +│ ├── create-plan/SKILL.md # Create .plan.md files |
| 22 | +│ └── product-context-docs/ # Cursor skill with templates |
| 23 | +│ ├── SKILL.md |
| 24 | +│ ├── agents/openai.yaml |
| 25 | +│ └── assets/templates/ |
| 26 | +│ ├── product-profile.md |
| 27 | +│ ├── product-features.md |
| 28 | +│ ├── architecture.md |
| 29 | +│ ├── tech-stack.md |
| 30 | +│ └── sitemap.md |
| 31 | +└── agents-md/ # AGENTS.md files by project |
| 32 | + ├── chalk-browser-AGENTS.md # Electron app (most comprehensive) |
| 33 | + ├── chalk-cli-template-AGENTS.md # Template distributed by npx get-chalk |
| 34 | + ├── chalk-design-partners-AGENTS.md # Design partner repos |
| 35 | + └── chalk-root-AGENTS.md # Monorepo root |
| 36 | +``` |
| 37 | + |
| 38 | +## Skill Inventory |
| 39 | + |
| 40 | +### Claude Code Skills (`.claude/skills/`) |
| 41 | + |
| 42 | +| Skill | Purpose | Trigger | |
| 43 | +|-------|---------|---------| |
| 44 | +| **setup-chalk** | Analyze a repo and generate the full `.chalk/` folder -- product profile, engineering profile, AI profile, design system, tech stack, coding style, brand assets | First-time project setup, style transfer | |
| 45 | +| **setup-docs** | One-shot bootstrap that populates all three profile stubs with real codebase content | After `npx get-chalk` or Chalk Browser init | |
| 46 | +| **create-doc** | Create a new numbered doc file in `.chalk/docs/` under the correct vertical | "Create a doc about..." | |
| 47 | +| **update-doc** | Update an existing doc -- find it, apply changes, bump the "Last updated" line | "Update the engineering profile..." | |
| 48 | +| **create-plan** | Create a `.plan.md` file with YAML frontmatter and actionable todos | "Plan the auth feature..." | |
| 49 | + |
| 50 | +### Cursor Skills (`skills/`) |
| 51 | + |
| 52 | +| Skill | Purpose | Trigger | |
| 53 | +|-------|---------|---------| |
| 54 | +| **product-context-docs** | Create and update `/docs` product context documentation (product profile, features, sitemap, architecture, tech stack) | "Document this product", "bootstrap /docs" | |
| 55 | + |
| 56 | +### AGENTS.md Files |
| 57 | + |
| 58 | +| File | Source | Description | |
| 59 | +|------|--------|-------------| |
| 60 | +| `chalk-browser-AGENTS.md` | `chalk-browser/` | Most comprehensive -- includes Electron conventions, IPC patterns, and inline plan creation instructions | |
| 61 | +| `chalk-cli-template-AGENTS.md` | `chalk-cli/templates/` | Template distributed to user repos via `npx get-chalk` -- generic Chalk conventions with plan creation | |
| 62 | +| `chalk-design-partners-AGENTS.md` | `Chalk-DesignPartners/` | Minimal version for design partner repos | |
| 63 | +| `chalk-root-AGENTS.md` | Root `/` | Monorepo-level instructions pointing to `.chalk/docs` | |
| 64 | + |
| 65 | +## How Skills Are Structured |
| 66 | + |
| 67 | +Each skill is a folder containing a `SKILL.md` file and optional supporting assets: |
| 68 | + |
| 69 | +``` |
| 70 | +skill-name/ |
| 71 | +├── SKILL.md # Required -- agent instructions |
| 72 | +├── reference.md # Optional -- detailed docs |
| 73 | +├── examples.md # Optional -- usage examples |
| 74 | +└── assets/ # Optional -- templates, scripts |
| 75 | + └── templates/ |
| 76 | +``` |
| 77 | + |
| 78 | +### SKILL.md Anatomy |
| 79 | + |
| 80 | +Every `SKILL.md` has YAML frontmatter and a markdown body: |
| 81 | + |
| 82 | +```markdown |
| 83 | +--- |
| 84 | +name: skill-name |
| 85 | +description: What this skill does and when to use it |
| 86 | +allowed-tools: Read, Write, Glob, Grep |
| 87 | +argument-hint: "[what the user passes]" |
| 88 | +--- |
| 89 | + |
| 90 | +# Skill Title |
| 91 | + |
| 92 | +## Workflow |
| 93 | +1. Step one... |
| 94 | +2. Step two... |
| 95 | +``` |
| 96 | + |
| 97 | +- `name` -- Unique identifier (lowercase, hyphens, max 64 chars) |
| 98 | +- `description` -- Drives auto-discovery; must include **what** and **when** |
| 99 | +- `allowed-tools` -- Restricts the agent to only the tools it needs |
| 100 | +- `argument-hint` -- Shows the user what to pass after the slash command |
| 101 | + |
| 102 | +## Where Skills Live |
| 103 | + |
| 104 | +Skills are placed in two locations depending on the agent: |
| 105 | + |
| 106 | +| Agent | Path | Scope | |
| 107 | +|-------|------|-------| |
| 108 | +| Claude Code | `.chalk/.claude/skills/<skill-name>/` | Per-project | |
| 109 | +| Cursor | `.cursor/skills/<skill-name>/` | Per-project | |
| 110 | +| Cursor (personal) | `~/.cursor/skills/<skill-name>/` | All projects | |
| 111 | + |
| 112 | +Chalk distributes skills inside `.chalk/.claude/skills/` so they travel with the `.chalk/` folder when it's initialized in a repo. |
| 113 | + |
| 114 | +## The `.chalk/` Folder |
| 115 | + |
| 116 | +Skills produce and maintain the `.chalk/` documentation structure: |
| 117 | + |
| 118 | +``` |
| 119 | +.chalk/ |
| 120 | +├── chalk.json # Project metadata |
| 121 | +├── docs/ |
| 122 | +│ ├── product/ |
| 123 | +│ │ └── 0_PRODUCT_PROFILE.md # What, who, why |
| 124 | +│ ├── engineering/ |
| 125 | +│ │ ├── 0_ENGINEERING_PROFILE.md # Read-this-first technical overview |
| 126 | +│ │ ├── 1_architecture.md # Process model, data flow, diagrams |
| 127 | +│ │ ├── 2_coding-style.md # Naming, patterns, conventions |
| 128 | +│ │ └── 3_techstack.md # Every dependency with version + purpose |
| 129 | +│ ├── ai/ |
| 130 | +│ │ └── 0_AI_PROFILE.md # Agent orientation, gotchas, quick ref |
| 131 | +│ └── design/ |
| 132 | +│ ├── 0_design-system.md # Colors, typography, spacing, tokens |
| 133 | +│ └── assets/ # Logos, icons, favicons |
| 134 | +└── .claude/ |
| 135 | + └── skills/ # Skills that maintain the above |
| 136 | +``` |
| 137 | + |
| 138 | +### Doc Conventions |
| 139 | + |
| 140 | +- No YAML frontmatter in docs (plain markdown only) |
| 141 | +- First `# Heading` is the document title |
| 142 | +- `Last updated: YYYY-MM-DD (<brief note>)` immediately after the title |
| 143 | +- Numbered filenames: `0_` for profiles, sequential for additional docs |
| 144 | +- Verticals: `product/` (business-facing), `engineering/` (technical), `ai/` (agent-facing), `design/` (visual) |
| 145 | + |
| 146 | +## Design Principles |
| 147 | + |
| 148 | +**Style transfer fidelity** -- An agent reading `.chalk/docs` should be able to write code that looks like it belongs in the codebase, place files in the right directories, use the correct libraries, and match the visual design. |
| 149 | + |
| 150 | +**Concrete over abstract** -- Real hex codes, not "brand green." Real file paths, not "the components folder." Real code snippets from the actual repo. |
| 151 | + |
| 152 | +**Generation creates options, approval creates truth** -- Skills generate documentation; humans review and approve it. Agents never silently merge generated content into project truth. |
| 153 | + |
| 154 | +**Progressive disclosure** -- `SKILL.md` contains the essentials (under 500 lines). Detailed reference material lives in separate files linked from the skill. |
| 155 | + |
| 156 | +## Adding a New Skill |
| 157 | + |
| 158 | +1. Create a folder: `skills/<skill-name>/` |
| 159 | +2. Add a `SKILL.md` with frontmatter (`name`, `description`, `allowed-tools`, `argument-hint`) |
| 160 | +3. Write the workflow as numbered steps |
| 161 | +4. Add templates or scripts in `assets/` if needed |
| 162 | +5. Keep `SKILL.md` under 500 lines; use progressive disclosure for detail |
| 163 | + |
| 164 | +### Naming |
| 165 | + |
| 166 | +- Folder and `name` field: `kebab-case`, max 64 characters |
| 167 | +- Description: third-person, includes trigger terms |
| 168 | +- Filenames inside `.chalk/docs/`: `<number>_<snake_case_slug>.md` |
| 169 | + |
| 170 | +## Related Projects |
| 171 | + |
| 172 | +| Project | Description | |
| 173 | +|---------|-------------| |
| 174 | +| `chalk-cli` | CLI tool (`npx get-chalk`) that scaffolds `.chalk/` in any repo | |
| 175 | +| `chalk-browser` | Electron app for visual product planning and epic management | |
| 176 | +| `Chalk-DesignPartners` | Design partner program and feedback collection | |
| 177 | + |
| 178 | +## License |
| 179 | + |
| 180 | +MIT |
0 commit comments