claude-setup
Scannednpx machina-cli add skill anilcancakir/claude-code-plugins/claude-setup --openclawClaude Setup Skill
Patterns and templates for creating optimized CLAUDE.md files that integrate project.md and brand.md context.
Workflow Integration
project.md (what) → brand.md (identity) → CLAUDE.md (how)
CLAUDE.md should:
- Reference project.md for project overview
- Reference brand.md for design guidelines
- Focus on TECHNICAL configuration for Claude
Core Principles
1. Context-Aware Generation
- Read project.md for project identity and goals
- Read brand.md for design and voice guidelines
- Focus CLAUDE.md on technical commands and patterns
2. Signal Over Noise
- Only document non-obvious information
- Avoid restating what's clear from code
- Focus on gotchas, patterns, and decisions
3. Token Budget Awareness
| Project Size | Target Tokens | Max Lines |
|---|---|---|
| Small (<10k LOC) | 500-1000 | 50-100 |
| Medium (10-50k LOC) | 1000-2000 | 100-200 |
| Large (>50k LOC) | 2000-4000 | 200-300 |
4. Structured Sections
Use XML-style tags for parseability:
<ARCHITECTURE>- Technical architecture decisions<CONVENTIONS>- Project-specific code patterns<TOOLS>- MCP servers and preferences<TESTING>- Test framework and patterns<COMMANDS>- Quick reference table<BRAND>- Quick reference from brand.md<GOTCHAS>- Proven solutions to problems
CLAUDE.md Structure
# [Project Name]
[One-line description - from project.md or detected]
## Quick Reference
| Command | Description |
|---------|-------------|
| `[cmd]` | [purpose] |
For project overview, see [project.md](project.md).
For brand guidelines, see [brand.md](brand.md).
<ARCHITECTURE>
## Architecture
[Technical architecture - patterns, layers, data flow]
[Reference project.md for project goals and features]
</ARCHITECTURE>
<CONVENTIONS>
## Conventions
### Naming
- [File naming pattern]
- [Class/function naming]
### Code Organization
- [Feature vs layer structure]
- [Import ordering]
</CONVENTIONS>
<TESTING>
## Testing
- **Framework**: [PHPUnit/Jest/Pest/etc.]
- **Run**: `[command]`
- **Coverage**: `[command]`
### Patterns
- [Test organization]
- [Mocking approach]
</TESTING>
<TOOLS>
## Available Tools
### Research
- `WebSearch` - Documentation lookup
- `mcp__context7__query-docs` - Framework docs
### Development
- `mcp__github__*` - Issue/PR management
- `Bash` - Build and test commands
### Tool Preferences
- [When to use which tool]
</TOOLS>
<BRAND>
## Design Guidelines
Reference: See [brand.md](brand.md) for full guidelines.
**Quick Reference:**
- Archetype: [From brand.md]
- Primary: [HEX from brand.md]
- Font: [From brand.md]
- Voice: [Key attributes from brand.md]
</BRAND>
<GOTCHAS>
## Gotchas
### [Issue Name]
**Problem**: [Description]
**Solution**: [Fix with file reference]
</GOTCHAS>
Context Integration
From project.md
Extract and use:
- Project name: For CLAUDE.md header
- Description: For one-line summary
- Target audience: To calibrate technical detail level
- Core features: To prioritize what to document
From brand.md
Extract and reference:
- Archetype: For voice calibration in generated content
- Primary color: For quick design reference
- Font: For typography reference
- Voice attributes: For documentation tone
In CLAUDE.md
- Add references to project.md and brand.md
- Include quick reference <BRAND> section
- Don't duplicate full content from either file
Stack-Specific Patterns
See reference files for detailed templates:
- references/stack-patterns.md - Laravel, Flutter, Vue patterns
- references/claude-md-templates.md - Complete templates
- references/rules-templates.md - Path-specific rules
- references/mcp-catalog.md - MCP server and LSP recommendations
Smart Merge Strategy
When updating existing CLAUDE.md:
- Check context files - Read project.md and brand.md first
- Identify custom sections - Content not from templates
- Preserve custom content - Never delete user additions
- Add missing sections - Insert template sections that don't exist
- Add references - Link to project.md and brand.md
- Show diff - Always preview changes before applying
Quality Checklist
Before finalizing CLAUDE.md:
- References project.md (if exists)
- References brand.md (if exists)
- Commands are copy-paste ready and tested
- No obvious/redundant information
- Architecture section explains WHY not just WHAT
- Gotchas have concrete solutions
- Token count within budget
- All file paths verified
- MCP tools documented if available
- Uses XML section tags
Anti-Patterns to Avoid
- Duplicating project.md - Reference it, don't copy
- Duplicating brand.md - Reference it, don't copy
- Generic advice - "Write clean code" adds no value
- Obvious info - "This is a Laravel app" when composer.json exists
- Verbose explanations - One line per concept when possible
- Outdated commands - Verify all commands work
- No structure - Always use XML sections
Source
git clone https://github.com/anilcancakir/claude-code-plugins/blob/main/project-optimizer/skills/claude-setup/SKILL.mdView on GitHub Overview
CLAUDE-setup crafts optimized CLAUDE.md files by merging project.md context with brand.md design guidelines. It emphasizes technical configuration for Claude Code, uses XML-style sections, and respects token budgets to keep docs precise and actionable.
How This Skill Works
It reads project.md for project name, description, audience, and core features, and brand.md for archetype, color, font, and voice attributes. It then generates a structured CLAUDE.md with sections like ARCHITECTURE, CONVENTIONS, TOOLS, TESTING, and BRAND, includes a quick reference, and references project.md and brand.md without duplicating full content.
When to Use It
- When creating a CLAUDE.md from scratch for a new project
- When running /my_setup to refresh CLAUDE.md
- When optimizing Claude Code configuration and documenting technical patterns
- When updating design guidelines after a brand refresh
- When preparing Claude documentation for a project using Claude Code
Quick Start
- Step 1: Gather project.md and brand.md context from the repository
- Step 2: Run claude-setup to generate CLAUDE.md and place it at the project root
- Step 3: Review the generated CLAUDE.md, adjust token budget sections, and commit
Best Practices
- Start from the project.md overview to calibrate goals and audience
- Read brand.md first to align voice, colors, and typography
- Document only non-obvious patterns and gotchas
- Respect token budgets by pruning verbose sections
- Include a compact <BRAND> section and references to source files
Example Use Cases
- Generate CLAUDE.md for a fintech analytics project to document CLI commands and data flow
- Update CLAUDE.md after a brand refresh to reflect new typography and color palette
- Create CLAUDE.md for Claude Code integration in a SaaS product
- Produce CLAUDE.md for a large codebase with token budget constraints
- Produce CLAUDE.md with gotchas and testing patterns for a microservices project