with one click
with one click
Design a product metrics dashboard — North Star + input metrics + guardrails — that the team actually uses to make decisions. Distinct from north-star-metric (defines THE one number) by focusing on the full dashboard architecture: layers, owners, cadence, visualization, and the discipline that prevents 30-chart dashboards.
Opportunity Solution Tree (Teresa Torres) — a continuous discovery artifact mapping desired outcomes → opportunities → solutions → assumption tests. Use when prioritizing discovery work, structuring weekly customer interviews, mapping multiple solutions to one problem, or auditing whether your roadmap actually moves outcomes.
Plan a sprint that ships — capacity, commitment vs stretch, dependencies, risk-identification, and the pre-sprint discipline that prevents mid-sprint surprises. Distinct from scrum-master (process facilitation) by focusing on the planning artifact itself.
Map stakeholders by power × interest (or influence × support), design a communication plan, and run the stakeholder-management discipline that prevents surprise objections. Use when launching a major initiative, navigating an enterprise deal, planning a re-org, or pre-empting political resistance to a roadmap change.
Generate complete test scenario coverage from a feature spec: happy paths, edge cases, error handling, accessibility, security, and performance scenarios. Includes a coverage analyzer that flags gaps before QA writes the test plan. Distinct from automated test generation — this is the WHAT to test before HOW.
Go-to-market strategy: ICP × motion × channels × messaging × success metrics × launch plan. Distinct from individual marketing or sales skills by being the integrated cross-functional strategy spanning product, marketing, sales, CS, and finance. Use when launching a new product, entering a new segment, or auditing why an existing GTM isn't working.
| name | claude-code-mastery |
| description | null |
| license | MIT |
| metadata | {"version":"1.0.0","author":"borghei","category":"engineering","domain":"development-tools","updated":"2026-03-31T00:00:00.000Z","tags":["claude-code","skill-authoring","subagents","hooks"]} |
Expert skill for Claude Code CLI -- CLAUDE.md optimization, skill authoring, subagent creation, hooks automation, and context engineering.
claude-code, claude-cli, CLAUDE.md, skill-authoring, subagents, hooks, context-window, token-budget, MCP-servers, worktrees, permission-modes, prompt-engineering, context-engineering, slash-commands
# Scaffold a new skill package
python scripts/skill_scaffolder.py my-new-skill --domain engineering --description "Brief description"
# Analyze and optimize an existing CLAUDE.md
python scripts/claudemd_optimizer.py path/to/CLAUDE.md
# Estimate context window usage across a project
python scripts/context_analyzer.py /path/to/project
# All tools support JSON output
python scripts/claudemd_optimizer.py CLAUDE.md --json
Generates a skill directory with SKILL.md template, scripts/, references/, assets/ directories, and YAML frontmatter.
python scripts/skill_scaffolder.py my-skill --domain engineering --description "Does X"
| Parameter | Description |
|---|---|
skill_name | Name for the skill (kebab-case) |
--domain, -d | Domain category |
--description | Brief description for frontmatter |
--version | Semantic version (default: 1.0.0) |
--license | License type (default: MIT) |
--output, -o | Parent directory for skill folder |
--json | Output as JSON |
Analyzes a CLAUDE.md file and produces optimization recommendations.
python scripts/claudemd_optimizer.py CLAUDE.md --token-limit 4000 --json
Output includes: line count, token estimate, section completeness, redundancy detection, missing sections, scored recommendations.
Scans a project to estimate context window consumption by file category.
python scripts/context_analyzer.py /path/to/project --max-depth 4 --json
Output includes: token estimates per category, percentage of context consumed, largest files, budget breakdown, reduction recommendations.
python scripts/claudemd_optimizer.py CLAUDE.md and capture the score.## Project Purpose -- What the project is
## Architecture Overview -- Directory structure, key patterns
## Development Environment -- Build, test, setup commands
## Key Principles -- 3-7 non-obvious rules
## Anti-Patterns to Avoid -- Things that look right but are wrong
## Git Workflow -- Branch strategy, commit conventions
project/
├── CLAUDE.md # Global: purpose, architecture, principles
├── frontend/CLAUDE.md # Frontend-specific: React patterns, styling
├── backend/CLAUDE.md # Backend-specific: API patterns, DB conventions
└── .claude/CLAUDE.md # User-specific overrides (gitignored)
python scripts/claudemd_optimizer.py CLAUDE.md --token-limit 4000 and confirm score improved.python scripts/skill_scaffolder.py my-skill -d engineering --description "..."description: >-
This skill should be used when the user asks to "analyze performance",
"optimize queries", "profile memory", or "benchmark endpoints".
Use for performance engineering and capacity planning.
--json flag, module docstring, error handling..claude/agents/agent-name.yaml:
name: security-reviewer
description: Reviews code for security vulnerabilities
model: claude-sonnet-4-20250514
allowed-tools:
- Read
- Glob
- Grep
- Bash(git diff*)
custom-instructions: |
For every change:
1. Check for hardcoded secrets
2. Identify injection vulnerabilities
3. Verify auth patterns
4. Flag insecure dependencies
Output a structured report with severity levels.
Read, Glob, Grep), read+commands (+ Bash(npm test*)), or write-capable (+ Edit, Write)./agents/security-reviewer Review the last 3 commitsHooks run custom scripts at lifecycle events without user approval.
| Hook | Fires When | Blocking |
|---|---|---|
PreToolUse | Before tool executes | Yes (exit 1 blocks) |
PostToolUse | After tool completes | No |
Notification | Claude sends notification | No |
Stop | Claude finishes turn | No |
.claude/settings.json:
{
"hooks": {
"PostToolUse": [
{
"matcher": "Edit|Write",
"hooks": [{ "type": "command", "command": "prettier --write \"$CLAUDE_FILE_PATH\" 2>/dev/null || true" }]
}
],
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [{ "type": "command", "command": "bash .claude/hooks/validate.sh" }]
}
]
}
}
python scripts/context_analyzer.py /path/to/project| Category | Budget | Purpose |
|---|---|---|
| System prompt + CLAUDE.md | 5-10% | Project configuration |
| Skill definitions | 5-15% | Active skill content |
| Source code (read files) | 30-50% | Files Claude reads |
| Conversation history | 20-30% | Messages and responses |
| Working memory | 10-20% | Reasoning space |
/compact after completing subtasks.| Command | Description |
|---|---|
/compact | Summarize conversation to free context |
/clear | Clear conversation history |
/model | Switch model mid-session |
/agents | List and invoke custom agents |
/permissions | View and modify tool permissions |
/cost | Show token usage and cost |
/doctor | Diagnose configuration issues |
/init | Generate CLAUDE.md for current project |
| Mode | Behavior | Best For |
|---|---|---|
| Default | Asks permission for writes | Normal development |
| Allowlist | Auto-approves listed tools | Repetitive workflows |
| Yolo | Auto-approves everything | Trusted automation |
{ "permissions": { "allow": ["Read", "Glob", "Grep", "Bash(npm test*)"],
"deny": ["Bash(rm -rf*)", "Bash(git push*)"] } }
~/.claude/CLAUDE.md -- user global, always loaded/project/CLAUDE.md -- project root, always loaded/project/.claude/CLAUDE.md -- project config, always loaded/project/subdir/CLAUDE.md -- subdirectory, loaded when files accessed| Server | Purpose |
|---|---|
server-filesystem | File access beyond project |
server-github | GitHub API (issues, PRs) |
server-postgres | Database queries |
server-memory | Persistent key-value store |
server-brave-search | Web search |
server-puppeteer | Browser automation |
| Document | Path |
|---|---|
| Skill Authoring Guide | references/skill-authoring-guide.md |
| Subagent Patterns | references/subagent-patterns.md |
| Hooks Cookbook | references/hooks-cookbook.md |
| Skill Template | assets/skill-template.md |
| Agent Template | assets/agent-template.md |
| Problem | Cause | Solution |
|---|---|---|
| CLAUDE.md changes not picked up | Claude loads CLAUDE.md at session start | Start a new conversation or use /clear to reload configuration |
| Skill not triggering on expected prompts | Description field in YAML frontmatter missing trigger phrases | Add quoted user phrases to the description field (e.g., "optimize queries", "profile memory") |
| Context window exhausted mid-task | Root CLAUDE.md too large or too many files read | Run context_analyzer.py to audit token usage, then move domain content to child CLAUDE.md files |
| Hook not firing after tool use | Matcher in .claude/settings.json does not match the tool name | Verify the matcher regex matches the exact tool name (e.g., Edit|Write, not edit|write) |
| Subagent exceeds scope and edits unrelated files | allowed-tools list is too permissive | Restrict to read-only tools (Read, Glob, Grep) and add write tools only when necessary |
| Scaffolder fails with "Directory already exists" | Target skill directory already present on disk | Remove or rename the existing directory, or choose a different skill name |
| Optimizer reports low score despite good structure | Token count exceeds the default 6000 limit | Pass --token-limit matching your actual budget (e.g., --token-limit 10000) |
claudemd_optimizer.py --token-limit 4000)allowed-tools scope during testingThis skill covers:
This skill does NOT cover:
| Skill | Integration | Data Flow |
|---|---|---|
| senior-architect | Architecture decisions inform CLAUDE.md structure sections | Architecture diagrams and patterns feed into the Architecture Overview section of CLAUDE.md |
| code-reviewer | Subagent creation for automated code review | Claude Code Mastery creates the agent YAML; Code Reviewer provides the review logic |
| senior-prompt-engineer | Prompt optimization for skill descriptions and agent instructions | Prompt engineering techniques improve YAML frontmatter trigger phrases and agent custom-instructions |
| doc-drift-detector | Detects when CLAUDE.md drifts out of sync with the codebase | Context Analyzer output feeds drift detection; drift findings trigger CLAUDE.md optimization |
| context-engine | Advanced context management strategies | Context Analyzer provides token budgets; Context Engine applies compression and prioritization |
| senior-secops | Security hooks and permission mode configuration | SecOps policies define which tools to deny; Claude Code Mastery configures the permission allowlists |
scripts/skill_scaffolder.py)Purpose: Generate a complete skill package directory with SKILL.md template, starter Python script, reference document, and proper YAML frontmatter.
Usage:
python scripts/skill_scaffolder.py <skill_name> [options]
Parameters:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
skill_name | positional | Yes | -- | Name for the skill in kebab-case (e.g., my-new-skill) |
--domain, -d | string | No | engineering | Domain category. Options: engineering, marketing, product, project-management, c-level, ra-qm, business-growth, finance, standards, development-tools |
--description | string | No | auto-generated | Brief description for YAML frontmatter, optimized for auto-discovery |
--version | string | No | 1.0.0 | Semantic version for metadata |
--license | string | No | MIT | License type for frontmatter |
--category | string | No | same as domain | Skill category for metadata |
--output, -o | string | No | . (current dir) | Parent directory for the skill folder |
--json | flag | No | off | Output results in JSON format |
Example:
python scripts/skill_scaffolder.py api-analyzer -d engineering --description "API analysis and optimization" --json
Output Formats:
--json): Returns { success, path, name, domain, version, directories_created, files_created }.scripts/claudemd_optimizer.py)Purpose: Analyze a CLAUDE.md file for structure completeness, token efficiency, redundancy, and verbosity. Produces a scored report with prioritized optimization recommendations.
Usage:
python scripts/claudemd_optimizer.py <file_path> [options]
Parameters:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
file_path | positional | Yes | -- | Path to the CLAUDE.md file to analyze |
--token-limit | integer | No | 6000 | Maximum recommended token count for the file |
--json | flag | No | off | Output results in JSON format |
Example:
python scripts/claudemd_optimizer.py path/to/CLAUDE.md --token-limit 4000
Output Formats:
--json): Returns { success, file, metrics, sections, completeness, redundancies, recommendations, score }.scripts/context_analyzer.py)Purpose: Scan a project directory to estimate how much of Claude Code's context window is consumed by CLAUDE.md files, skill definitions, source code, and configuration. Produces a token budget breakdown with reduction recommendations.
Usage:
python scripts/context_analyzer.py <project_path> [options]
Parameters:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
project_path | positional | Yes | -- | Path to the project directory to analyze |
--max-depth | integer | No | 5 | Maximum directory traversal depth |
--context-window | integer | No | 200000 | Total context window size in tokens |
--json | flag | No | off | Output results in JSON format |
Example:
python scripts/context_analyzer.py /path/to/project --max-depth 3 --context-window 200000 --json
Output Formats:
--json): Returns { success, project_path, context_window, summary, categories, budget, largest_files, recommendations }.