From samhvw8-dot-claude
CLAUDE.md file generation and optimization for Claude Code projects. Capabilities: initialize project instructions, analyze codebase context, optimize existing CLAUDE.md, apply Anthropic best practices, reduce token usage, improve effectiveness. Actions: init, create, optimize, enhance CLAUDE.md files. Keywords: CLAUDE.md, project instructions, Claude Code setup, project context, codebase analysis, Anthropic best practices, token optimization, project configuration, AI instructions, coding guidelines, project rules, workspace setup. Use when: initializing CLAUDE.md for new projects, optimizing existing project instructions, setting up Claude Code for a codebase, improving AI coding guidelines.
npx claudepluginhub joshuarweaver/cascade-code-languages-misc-1 --plugin samhvw8-dot-claudeThis skill uses the workspace's default tool permissions.
Generate and optimize CLAUDE.md files for software projects by analyzing codebase context and applying Anthropic engineering best practices. Creates concise, maintainable project instructions that maximize Claude Code effectiveness while minimizing token consumption.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Checks Next.js compilation errors using a running Turbopack dev server after code edits. Fixes actionable issues before reporting complete. Replaces `next build`.
Generate and optimize CLAUDE.md files for software projects by analyzing codebase context and applying Anthropic engineering best practices. Creates concise, maintainable project instructions that maximize Claude Code effectiveness while minimizing token consumption.
Activate when user requests:
User Request
│
├─→ "init" or "create" → Initialize New CLAUDE.md
│ └─→ Follow: @refs/initialization-workflow.md
│
├─→ "optimize" or "improve" → Optimize Existing CLAUDE.md
│ └─→ Follow: @refs/optimization-patterns.md
│
└─→ "integrate" or "setup MCP/slash commands" → Integration
└─→ Follow: @refs/integration-strategies.md
Quick Steps:
Detailed Instructions: @refs/initialization-workflow.md
Quick Steps:
Detailed Instructions: @refs/optimization-patterns.md
When you are implementing new features in this codebase, it's very important that you always make sure to write comprehensive tests for all the functionality you add. We use Jest as our testing framework, and we expect all new code to have at least 80% code coverage.
### Testing Requirements
- New features require tests (Jest, >80% coverage)
- Unit tests: Individual functions in `src/lib/`
- Integration tests: API endpoints with Supertest
Result: 70% token reduction, same information
| Project Type | Key Indicators | Template Focus |
|---|---|---|
| Web App | React/Vue/Angular, frontend build | UI components, responsive design, routing |
| Backend API | Express/FastAPI, database, auth | RESTful conventions, validation, security |
| CLI Tool | Commander/Click, stdio | Commands, user experience, file operations |
| Library | Package exports, no app logic | API design, versioning, backward compatibility |
| Monorepo | Workspaces, multiple packages | Cross-package changes, workspace commands |
Before presenting CLAUDE.md:
| Project Complexity | Target Token Count |
|---|---|
| Simple (single-purpose tool) | 100-200 tokens |
| Medium (standard web app) | 200-400 tokens |
| Complex (multi-service platform) | 400-800 tokens |
| Maximum (exception only) | 1000 tokens |
If approaching max, split into:
.claude/CLAUDE.md (essentials).claude/ARCHITECTURE.md (reference, not auto-loaded).claude/commands/*.md (workflows as slash commands)When working on authentication:
@src/lib/auth.ts
@src/middleware/authenticate.ts
User has ~/.claude/CLAUDE.md (global):
Project CLAUDE.md should:
Example header:
# MyProject - Development Guide
> Note: General software engineering principles are in your global CLAUDE.md.
> This guide focuses on project-specific patterns and requirements.
## MCP Tools Configuration
### context7 (Official Documentation)
Use for React hooks, Next.js routing, Prisma schema
### magic (UI Component Generation)
Use for new components, accessibility improvements
### Playwright (E2E Testing)
Use for user flows, visual regression, accessibility audits
Detailed Integration Guide: @refs/integration-strategies.md
Detailed Templates: @refs/output-templates.md
| Problem | Solution |
|---|---|
| Over-Documentation | Document project-specific decisions only |
| Stale Information | Verify against current package.json, files |
| Redundant Context | Link to README, add only unique patterns |
| Token Waste | On-demand context by functional area |
| Generic Fluff | Specific patterns: "Use Zod validation, Prisma transactions" |
Remember:
When in doubt:
Quick Start: When user requests CLAUDE.md creation/optimization, follow the decision tree above and consult relevant reference files for detailed instructions.