.claude/skills/claude-md-architect/SKILL.md
This skill should be used when creating a new CLAUDE.md file for a project (whether it exists or not), recreating/replacing an existing CLAUDE.md from scratch, or when auditing, improving, or modernizing an existing CLAUDE.md file. It provides strategic guidance for designing future-proof project documentation that serves as the "Constitution" for all development work.
npx skillsauth add efiadm/informatik-ai-studio claude-md-architectInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill provides expert guidance for designing, creating, recreating, and maintaining future-proof CLAUDE.md files that serve as comprehensive project documentation and strategic foundations.
CLAUDE.md files are the foundational "Constitution" for projects, providing:
This skill ensures CLAUDE.md files are:
Use this skill when:
What do you need to do?
All projects use modular architecture with a lightweight core CLAUDE.md:
.claude/rules/).claude/rules/domain/).claude/docs/).claude/examples/All projects use modular architecture. Content is organized as follows:
Standard Modular Structure:
.claude/
├── docs/
│ ├── patterns/ # Detailed implementation patterns
│ │ ├── animations.md
│ │ ├── testing-strategies.md
│ │ └── security-checklist.md
│ ├── architecture/ # System design documents
│ │ ├── database-schema.md
│ │ └── api-design.md
│ └── guides/ # Step-by-step guides
│ └── deployment-guide.md
└── examples/ # Code examples and templates
├── component-template.tsx
└── ci-cd-pipeline.yml
In CLAUDE.md, reference these files:
### Animation Standards
- Use Framer Motion for interactive animations
- Follow performance best practices (will-change, transform/opacity only)
- See [Animation Patterns](./.claude/docs/patterns/animations.md) for detailed examples
- See [Animation Performance](./.claude/docs/patterns/animation-performance.md) for optimization guide
CLAUDE.md is primarily consumed by AI agents. Optimize for efficient parsing and context usage:
## [section_name]Always include a "Quick Reference" section near the top or bottom with:
Agents should find essentials in <100 tokens for rapid orientation.
.claude/docs/patterns/)Don't document what's already obvious from code:
❌ Don't: List every single file in directory structure
✅ Do: Show key directories and critical files only
❌ Don't: Explain how standard tools work (React, TypeScript)
✅ Do: Document project-specific patterns and conventions
❌ Don't: Copy-paste entire config files
✅ Do: Highlight important config values and link to the file
Before presenting CLAUDE.md for user approval, validate quality using the automated checklist.
See: Validation Checklist for complete validation framework including:
Target Quality Score: 75+ (Good) before presenting to user for approval.
Quality Bands:
IMPERATIVE: After ANY CLAUDE.md modification (create, update, recreate), you MUST automatically invoke the hooks-setup skill.
This is NON-NEGOTIABLE and applies to:
Why This Is Critical:
Execution:
Skill(skill: "hooks-setup")Failure to invoke hooks-setup is a critical oversight that compromises project quality.
When creating a CLAUDE.md for a new project or recreating an existing one from scratch:
Note: If a CLAUDE.md already exists and you're recreating from scratch, first review it to identify any valuable content worth preserving (e.g., environment variables, established workflows, team structure). You can choose to start completely fresh or incorporate relevant existing sections.
Gather Requirements
Research & Select Stack
Define Strategic Foundation
security-architect and acceptance-validator in core teamEstablish Technical Context
Set Global Rules
flow-plan.md "[task]"flow-issue-create.md "[task]"flow-feature-build.md "[task]"flow-qa-valdate.md "[task]"flow-feedback-fix.md "[task]"PR issueflow-analyze-bug.md "[task]"config-enforce.md "[task]"Present for Approval
CRITICAL: Invoke hooks-setup Skill
hooks-setup after user approval (see CRITICAL POST-COMPLETION REQUIREMENT)Create Session Artifacts
When converting existing README, ARCHITECTURE.md, or wiki pages to CLAUDE.md format:
See: Migration Guide for comprehensive migration workflow including:
Key Steps:
When auditing or improving an existing CLAUDE.md:
Completeness Checklist:
## Section-by-Section Audit
### Strategic Layer
- [ ] `[project_metadata]` - Name, version, objectives present?
- [ ] `[stack]` - Tech choices documented with rationale?
- [ ] `[core_team]` - Agents defined with clear roles?
- [ ] security-architect included?
- [ ] acceptance-validator included?
### Technical Layer
- [ ] `[directory_structure]` - Key paths only (not exhaustive)?
- [ ] `[environment_variables]` - All required vars documented?
- [ ] `[commands]` - Essential commands (no duplicates)?
- [ ] `[configuration]` - Config locations specified?
### Global Rules Layer
- [ ] `[workflow]` - Git practices & development process clear?
- [ ] `[code_standards]` - Project-specific conventions?
- [ ] `[testing_requirements]` - NO EXCEPTIONS policy present?
- [ ] `[deployment]` - Release process documented?
### Quality Indicators
- [ ] Quick Reference section exists?
- [ ] ABOUTME headers mentioned in code standards?
- [ ] Length appropriate (500-700 lines standard)?
- [ ] No obvious redundancy (commands/workflows duplicated)?
Categorize findings by impact:
| Priority | Category | Examples | Fix Urgency | | --------------- | --------------------- | ------------------------------------------ | ------------ | | P0 Critical | Blocks agent work | Missing core_team, no testing requirements | Immediate | | P1 High | Reduces effectiveness | No Quick Reference, outdated stack | This session | | P2 Medium | Quality improvement | Redundant sections, >1000 lines | Next update | | P3 Low | Nice-to-have | Additional examples, style consistency | Future |
Good vs Bad Examples:
✅ GOOD - Concise Command Section:
## [commands]
pnpm dev # Development server
pnpm build # Production build
pnpm test # Run test suite
❌ BAD - Verbose with Explanations:
## [commands]
Run `pnpm dev` to start the development server on localhost:3000. This will enable hot reloading...
Run `pnpm build` to create an optimized production bundle...
✅ GOOD - Referenced Detail:
### Animation Standards
- Use Framer Motion for interactive animations
- See [Animation Patterns](./.claude/docs/patterns/animations.md) for examples
❌ BAD - Inline 50-line Example:
### Animation Standards
Here's how to create a fade animation:
[50 lines of code example]
Output Format:
## CLAUDE.md Audit Report
**Current Score**: 65/100 (Adequate)
### Critical Issues (P0)
1. Missing `security-architect` in `[core_team]` - BLOCKS security validation
2. No `[testing_requirements]` section - NO EXCEPTIONS policy not enforced
### High Priority (P1)
3. Length: 1,250 lines (Target: 500-700) - Extract to separate files
4. Redundancy: Workflow appears in 3 sections - Consolidate
### Recommended Actions
- [ ] Add security-architect and acceptance-validator to core team
- [ ] Create `[testing_requirements]` with NO EXCEPTIONS policy
- [ ] Extract detailed patterns to `.claude/docs/patterns/`
- [ ] Consolidate workflow to single section
- [ ] Add Quick Reference section
**Estimated Post-Fix Score**: 88/100 (Good)
hooks-setup after user approval (see CRITICAL POST-COMPLETION REQUIREMENT)IMPERATIVE: After ANY claude-md-architect execution, you MUST create session tracking artifacts.
This is NON-NEGOTIABLE and applies to ALL modes:
create - New CLAUDE.mdaudit - Audit existingimprove - Improve existingrecreate - Replace existingmigrate-modular - Convert to modularLocation: .claude/sessions/context_session_md_architect_{YYYYMMDD_HHmmss}.md
Steps:
mkdir -p .claude/sessionsYYYYMMDD_HHmmss format# MD-Architect Session
## Metadata
- Mode: {MODE}
- Architecture: modular
- Timestamp: {ISO_TIMESTAMP}
- Status: {success|fail}
## Files Created/Verified
### Core File
- CLAUDE.md (lines: {LINE_COUNT})
### Auto-Loaded Rules
{List each file in .claude/rules/*.md}
### Path-Specific Rules
{List each file in .claude/rules/domain/*.md with paths from frontmatter}
### On-Demand Docs
{List each file in .claude/docs/**/*.md}
## Modular Index
{Copy of [modular_index] section from CLAUDE.md}
## Session Log
- {timestamp}: Session started with mode={MODE}
- {timestamp}: Files processed: {count}
- {timestamp}: Session completed with status={STATUS}
Location: .claude/cache/modular_index.json
Steps:
mkdir -p .claude/cache{
"version": "1.0",
"created": "{ISO_TIMESTAMP}",
"architecture_mode": "modular",
"source_claude_md": "CLAUDE.md",
"session_file": ".claude/sessions/context_session_md_architect_{timestamp}.md",
"auto_loaded": [
{"file": ".claude/rules/code-standards.md", "priority": "high"},
{"file": ".claude/rules/testing-policy.md", "priority": "high"}
],
"path_specific": [
{"file": ".claude/rules/domain/api-rules.md", "paths": ["app/api/**"]}
],
"on_demand": [
{"file": ".claude/docs/architecture/tech-stack.md", "load_when": "Stack decisions"}
]
}
Before completing the task, verify:
.claude/sessions/context_session_md_architect_*.md.claude/cache/modular_index.jsonIf validation fails: Set task status to "fail" and report the error.
A comprehensive CLAUDE.md should include these sections:
security-architect, acceptance-validatorRefer to references/claude-md-template.md for a complete template with examples.
Unless explicitly requested otherwise, prioritize these proven tech stacks:
See references/factory-verticals.md for detailed descriptions, use cases, and configuration guidance for each vertical.
See: Best Practices Examples for detailed examples of good vs. bad practices.
Treat CLAUDE.md as a versioned contract using semantic versioning:
Maintain version header and [change_log] section. See Best Practices Examples for formatting.
.claude/rules/ files[modular_index] referencing non-existent filesAlways generate a complete modular CLAUDE.md structure that:
[modular_index] sectionTemplate (Modular - All Projects):
| Component | Template | Target Lines | |-----------|----------|--------------| | Core CLAUDE.md | claude-md-core.md | 100-300 | | Global rules | template-global.md | 50-150 each | | Path-specific rules | template-path-specific.md | 50-200 each | | Architecture docs | template-architecture.md | As needed |
After generating, always request explicit approval before committing to the repository.
⚠️ Remember: Invoke hooks-setup after user approval (see CRITICAL POST-COMPLETION REQUIREMENT)
All projects use modular architecture, which provides a lightweight core CLAUDE.md (100-300 lines) with intelligent references to specialized documents.
Benefits of Modular Architecture:
| Metric | Benefit | |--------|---------| | Initial tokens | ~4,000 (73% reduction from monolithic) | | CLAUDE.md lines | 100-300 (focused core) | | Parse time | Low (efficient agent context) | | Maintainability | High (separation of concerns) | | Scalability | Excellent (add rules/docs as needed) |
project/
├── CLAUDE.md # Core: 100-300 lines
├── .claude/
│ ├── rules/ # AUTO-LOADED (every task)
│ │ ├── code-standards.md # Coding conventions
│ │ ├── testing-policy.md # Test requirements
│ │ ├── security-policy.md # Security guidelines
│ │ ├── git-workflow.md # Git practices
│ │ ├── agent-coordination.md # Agent collaboration
│ │ └── domain/ # PATH-SPECIFIC rules
│ │ ├── api-rules.md # paths: src/api/**
│ │ ├── ui-rules.md # paths: src/components/**
│ │ └── test-rules.md # paths: tests/**
│ │
│ ├── docs/ # ON-DEMAND loading
│ │ ├── architecture/
│ │ │ ├── tech-stack.md # Full stack details
│ │ │ ├── database-schema.md # DB documentation
│ │ │ └── api-contracts.md # API specifications
│ │ ├── patterns/
│ │ │ ├── auth-flows.md # Auth implementation
│ │ │ └── error-handling.md # Error patterns
│ │ └── guides/
│ │ └── deployment.md # Deploy procedures
│ │
│ └── examples/ # Code examples
│ └── [templates]
1. Auto-Loaded (Every Task):
.claude/rules/ (without domain/)2. Path-Specific (Matching Tasks):
.claude/rules/domain/---
description: API-specific rules
paths:
- "src/api/**"
- "src/routes/**"
---
3. On-Demand (Referenced):
.claude/docs/[modular_index]When generating in modular mode:
Step 1: Generate Core CLAUDE.md
[modular_index] sectionStep 2: Generate Global Rules
.claude/rules/:
code-standards.md - From [code_standards] sectiontesting-policy.md - From [testing_requirements] sectionsecurity-policy.md - From [security_requirements] sectiongit-workflow.md - From workflow sectionagent-coordination.md - From [agent_guidelines] sectionStep 3: Generate Path-Specific Rules (if needed)
.claude/rules/domain/:
api-rules.md - For API-specific conventionsui-rules.md - For UI component rulestest-rules.md - For testing conventionsStep 4: Generate Architecture Docs (if needed)
.claude/docs/architecture/:
tech-stack.md - Detailed stack documentationdatabase-schema.md - Full schema docsapi-contracts.md - API specificationsStep 5: Update modular_index
Use this table when migrating from monolithic to modular:
| Original Section | Destination | Load Type |
|-----------------|-------------|-----------|
| [code_standards] >50 lines | .claude/rules/code-standards.md | Auto |
| [testing_requirements] | .claude/rules/testing-policy.md | Auto |
| [security_requirements] | .claude/rules/security-policy.md | Auto |
| Git workflow content | .claude/rules/git-workflow.md | Auto |
| [agent_guidelines] | .claude/rules/agent-coordination.md | Auto |
| API-specific rules | .claude/rules/domain/api-rules.md | Path-specific |
| UI-specific rules | .claude/rules/domain/ui-rules.md | Path-specific |
| Database schema | .claude/docs/architecture/database-schema.md | On-demand |
| API contracts | .claude/docs/architecture/api-contracts.md | On-demand |
| Deployment guide | .claude/docs/guides/deployment.md | On-demand |
| Code examples >20 lines | .claude/examples/ | On-demand |
All projects use modular architecture:
IF .claude/rules/ has files:
MODE: "modular" (already modular)
ACTION: Validate reference integrity
ELSE IF CLAUDE.md exists AND lines > 300:
MODE: "migrate-modular"
ACTION: Automatically migrate to modular structure
ELSE:
MODE: "modular" (create new)
ACTION: Generate full modular structure
After generating modular structure, validate:
File Existence
[modular_index] existReference Integrity
Completeness
[modular_index] is up-to-dateSize Compliance
See Validation Checklist for complete validation framework.
| Template | Purpose | Location | |----------|---------|----------| | Core CLAUDE.md | Modular core document | claude-md-core.md | | Global Rules | Auto-loaded rules | template-global.md | | Path-Specific Rules | Domain rules with frontmatter | template-path-specific.md | | Architecture Docs | On-demand technical docs | template-architecture.md |
development
Comprehensive frontend development skill for building modern, performant web applications using ReactJS, NextJS, TypeScript, Tailwind CSS. Includes component scaffolding, performance optimization, bundle analysis, and UI best practices. Use when developing frontend features, optimizing performance, implementing UI/UX designs, managing state, or reviewing frontend code.
tools
Comprehensive DevOps skill for CI/CD, infrastructure automation, containerization, and cloud platforms (AWS, GCP, Azure). Includes pipeline setup, infrastructure as code, deployment automation, and monitoring. Use when setting up pipelines, deploying applications, managing infrastructure, implementing monitoring, or optimizing deployment processes.
development
World-class data science skill for statistical modeling, experimentation, causal inference, and advanced analytics. Expertise in Python (NumPy, Pandas, Scikit-learn), R, SQL, statistical methods, A/B testing, time series, and business intelligence. Includes experiment design, feature engineering, model evaluation, and stakeholder communication. Use when designing experiments, building predictive models, performing causal analysis, or driving data-driven decisions.
development
World-class data engineering skill for building scalable data pipelines, ETL/ELT systems, and data infrastructure. Expertise in Python, SQL, Spark, Airflow, dbt, Kafka, and modern data stack. Includes data modeling, pipeline orchestration, data quality, and DataOps. Use when designing data architectures, building data pipelines, optimizing data workflows, or implementing data governance.