From ac
Write CC-optimal CLAUDE.md and CLAUDE.local.md files. Use when creating, reviewing, or improving any CLAUDE.md — global, project-level, or local. Covers section authoring, compression, dedup boundaries, and quality scoring.
npx claudepluginhub anilcancakir/claude-code-plugin --plugin acThis skill uses the workspace's default tool permissions.
Write CLAUDE.md files that Claude Code actually follows. Every line must earn its place — CLAUDE.md loads every conversation turn, consuming context window tokens each time.
Generates design tokens/docs from CSS/Tailwind/styled-components codebases, audits visual consistency across 10 dimensions, detects AI slop in UI.
Records polished WebM UI demo videos of web apps using Playwright with cursor overlay, natural pacing, and three-phase scripting. Activates for demo, walkthrough, screen recording, or tutorial requests.
Delivers idiomatic Kotlin patterns for null safety, immutability, sealed classes, coroutines, Flows, extensions, DSL builders, and Gradle DSL. Use when writing, reviewing, refactoring, or designing Kotlin code.
Write CLAUDE.md files that Claude Code actually follows. Every line must earn its place — CLAUDE.md loads every conversation turn, consuming context window tokens each time.
CLAUDE.md is delivered as a user message after the system prompt — advisory context, not enforced configuration. Adherence degrades with file length and conflicting rules.
Loading order (lowest → highest priority):
/Library/Application Support/ClaudeCode/CLAUDE.md) — org-wide, cannot exclude~/.claude/CLAUDE.md + ~/.claude/rules/)./CLAUDE.md + ./.claude/CLAUDE.md + ./.claude/rules/ at each level./CLAUDE.local.md) — personal, not git-trackedCLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD env var)Subdirectory CLAUDE.md files lazy-load when Claude touches files in that directory.
Compaction: CLAUDE.md survives /compact — re-read from disk and re-injected. Conversation-only instructions are lost.
Import syntax: @path/to/file pulls in additional files. Max 5 hops. Relative paths resolve from the importing file.
| File | Target | Hard limit |
|---|---|---|
Global ~/.claude/CLAUDE.md | ≤120 lines | 40K chars (CC warning) |
Project ./CLAUDE.md | ≤120 lines (~2500 tokens) | 40K chars (CC warning) |
CLAUDE.local.md | ≤50 lines | Same |
MEMORY.md | ≤200 lines or 25KB | Hard truncation |
Shorter files = better adherence. Over 200 lines, instruction-following drops measurably.
~/.claude/CLAUDE.md)Personal development partner configuration. Loaded in every CC session across all projects.
Sections (in order):
my-coding skillCompression-critical: Workflow section (Intent Gate table + Research delegation) must survive verbatim — these are routing anchors that CC uses to decide how to act.
./CLAUDE.md)Project-specific context. Loaded in every conversation within this project directory.
Sections (in order — include only if content discovered):
Dedup boundary: NEVER duplicate global CLAUDE.md content (workflow, identity, tech stack, coding rules). Project = project-specific facts only.
Personal project-specific preferences — gitignored. Appended after CLAUDE.md at same directory level (wins on conflict).
Use for: Local URLs, sandbox endpoints, preferred test data, personal workflow shortcuts. Keep under 50 lines.
Path-scoped conventions that inject when matching files are touched.
paths frontmatter): inject only when matching files are openedBoundary: Generic project conventions → CLAUDE.md. File-path-specific conventions → rules.
## Commands
| Command | Description |
|---------|-------------|
| `npm run build` | Production build with optimization |
| `npm test -- --watch` | Run tests in watch mode |
npm install, git clone)--watch, --coverage, --runInBand)## Architecture
src/ api/ # REST endpoints — one file per resource services/ # Business logic layer — no HTTP concerns models/ # Sequelize models with custom scopes jobs/ # Background job processors (Bull queues)
node_modules/, dist/, .git/, config dirs with clear namesGood — project-specific, imperative, verifiable:
- Use barrel exports (`index.ts`) in every module directory
- Prefer `readonly` arrays — use `ReadonlyArray<T>` not `T[]` for function params
- Error responses use `AppError` class from `src/errors.ts` — never raw Error
Bad — generic, vague, unverifiable:
- Follow clean code principles
- Use descriptive variable names
- Handle errors properly
Good — non-obvious, prevents debugging:
- Migrations auto-run at boot — never modify existing migration files, create new ones
- `NEXT_PUBLIC_*` vars must be set at BUILD time, not runtime
- Tests must run sequentially (`--runInBand`) due to shared DB state
Bad — obvious, generic:
- Be careful with database migrations
- Environment variables must be configured
- Tests should be independent
Good — entry points Claude wouldn't find:
- `src/bootstrap.ts` — Server bootstrap, DI container setup. Import order matters
- `config/features.yml` — Feature flags. Changes require restart
Bad — discoverable or obvious:
- `package.json` — Node.js configuration
- `src/index.ts` — Application entry point
Adding emphasis tokens improves instruction-following in longer files:
IMPORTANT: Always use pnpm, not npm.
YOU MUST run tests before committing.
Use sparingly — if everything is IMPORTANT, nothing is. Reserve for rules where violation causes real damage.
Score each criterion (from Anthropic's official rubric):
| Criterion | Weight | What earns full score |
|---|---|---|
| Commands/Workflows | 20pts | All essential commands with context |
| Architecture Clarity | 20pts | Key dirs explained, entry points identified |
| Non-Obvious Patterns | 15pts | Gotchas, workarounds, "why we do it this way" |
| Conciseness | 15pts | Dense content, no filler, no obvious info |
| Currency | 15pts | Commands work, file refs accurate, stack current |
| Actionability | 15pts | Copy-paste ready, concrete steps, real paths |
Red flags: Commands that would fail, references to deleted files, outdated tech versions, generic advice, unfinished TODOs, duplicate info across files.
Before finalizing any CLAUDE.md:
| Topic | File | When to read |
|---|---|---|
| Section patterns | claude-md-patterns.md | Before writing — complete section templates, good/bad examples, monorepo patterns |
| CLAUDE.md dedup | claude-md-dedup-guide.md | Before writing — dedup boundaries between global/project/rules/my-coding/CC system prompt |
| CC dedup (general) | ${CLAUDE_SKILL_DIR}/../prompt-writer/references/cc-dedup-guide.md | When checking what CC system prompt already provides |