From better-init
This skill should be used when the user asks to generate, initalise, or modify a CLAUDE.md file to provide Claude Code with a context of the project.
How this skill is triggered — by the user, by Claude, or both
Slash command
/better-init:init-guidanceThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
When creating or initialising a CLAUDE.md file, follow these guidelines to produce an effective, high-quality project context file.
When creating or initialising a CLAUDE.md file, follow these guidelines to produce an effective, high-quality project context file.
CLAUDE.md is the highest leverage point for Claude Code. It affects every workflow phase and output artifact. Treat it as carefully crafted documentation, not auto-generated content.
Structure every CLAUDE.md around three core areas:
WHAT - Describe the codebase:
WHY - Explain the purpose:
HOW - Detail workflows (only essential):
Target fewer than 300 lines. Aim for under 60 lines when possible.
Every line in CLAUDE.md competes for attention. Irrelevant context degrades performance uniformly across all instructions. Remove anything not universally applicable to every task.
Include only critical project-specific rules and essential workflow commands.
Store detailed, task-specific guidance in separate files. Reference them from CLAUDE.md rather than embedding everything in CLAUDE.md.
Instead of:
## API Development
[500 lines of API documentation]
Use:
## API Development
See `docs/api-guide.md` for API development guidelines.
Read the projects documentation and its structure to determine which files to reference.
Do not use CLAUDE.md for code style enforcement. Deterministic tools handle this better
Style instructions in CLAUDE.md waste instruction budget and produce inconsistent results. Configure tooling instead.
Reference code locations instead of embedding snippets:
Instead of:
The authentication middleware looks like:
\`\`\`typescript
export function authMiddleware(req, res, next) {
// 50 lines of code
}
\`\`\`
Use:
Authentication middleware: `src/middleware/auth.ts:15`
Benefits:
State facts and commands clearly:
Good:
Run tests: `npm test`
Build: `npm run build`
Database: PostgreSQL 14
Avoid:
You might want to run tests using npm test.
The build process can be initiated with npm run build.
We use PostgreSQL for our database needs.
Ask yourself for each line:
Including everything "just in case" dilutes important instructions. Be selective.
Embedding coding standards. Use tooling instead.
Explaining how things work in detail. Link to documentation.
Including historical context or version notes. Keep it current-state only.
Embedding code blocks. Use file:line references.
Before finalizing CLAUDE.md:
npx claudepluginhub sdui-hq/ai-marketplace --plugin better-initGenerates or updates CLAUDE.md context files from a codebase scan, producing focused files under 100 lines with build commands, conventions, and gotchas. Supports create, update, and audit modes.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
Applies a firm's KYC/AML rules grid to parsed onboarding records: assigns risk rating, checks required documents, outputs rule outcomes with citations, and routes for escalation.