/zaksak:writing-claude-mdfrom zaksak
Guidelines for writing effective CLAUDE.md files and .claude/rules/ — invoke when creating or editing CLAUDE.md or rule files
Ships in zaksak. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Less is more - Keep root CLAUDE.md under 100 lines. Claude Code's system prompt uses ~50 instructions; models reliably follow ~150-200 total. Every instruction in CLAUDE.md competes for that budget.
Universal applicability - If it only applies sometimes, make it a scoped rule. As instruction count increases, quality degrades uniformly across ALL instructions.
Map, not territory - Point to docs with @path/to/file, don't embed them. Prefer file:line references over code snippets.
Be specific - "Use bun not npm" not "use the right tool"
Claude learns from codebase - Skip code style rules. Claude is an in-context learner and will follow existing patterns in the codebase.
# Project Name
One-line description.
## Stack
- Runtime, framework, database
## Structure
- `src/` - what it contains
- `tests/` - what it contains
## Commands
- Build: `command`
- Test: `command`
- Lint: `command`
## Key Patterns
- [2-3 max, universally applicable]
## See Also
- @docs/topic.md for details
| Root CLAUDE.md | .claude/rules/ |
|---|---|
| Universal context | Topic-specific |
| Essential commands | File-type conventions |
| Project structure | Conditional instructions |
.claude/rules/
├── api-design.md # No paths = always loaded
├── testing.md
└── frontend/
└── react.md # Subdirectories supported
api-design.md, database-migrations.md---
paths:
- "src/api/**/*.ts"
---
Use often to properly scope rules to specific directories or file types. This leads to shorter rule files (less context bloat) and pinpoint accurate guidance.
| Pattern | Matches |
|---|---|
**/*.ts | All .ts files |
src/**/* | Everything under src/ |
src/**/*.{ts,tsx} | .ts and .tsx in src/ |
See @README for overview.
For API work: @docs/api.md
Limitations:
@file#section anchors are NOT supportedfile:line refs instead)@imports or file:line refs instead of embedding contentWhat SKILL.md sets; muted values are Claude Code's defaults
3 skills in this plugin
/ascii-uiGenerate consistent, pixel-perfect ASCII UI wireframe mockups for specs and PRDs. Use when the user asks to draw a wireframe, mockup, UI diagram, or ASCII layout. Also use when fixing alignment in existing ASCII diagrams./mermaid-diagramsAuthor or fix Mermaid diagrams that render correctly on GitHub. Use whenever writing, editing, or debugging a ```mermaid block — flowchart, sequence, state, ER, class, gantt — or when a diagram shows "Unable to render rich display" / a parse error. Encodes the exact escaping, quoting, ID, and block-balance rules that keep GitHub's strict renderer from failing.Other plugins' skills for the same job
npx claudepluginhub zakattack9/agentic-coding --plugin zaksak