claude-code-mastery
Optimizes CLAUDE.md files, scaffolds skills and subagents, wires hooks and measures context budget for Claude Code
Install / Use
npx skills add borghei/Claude-Skills --skill claude-code-masteryInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
AutomationSupported Platforms
Our assessment of claude-code-mastery
claude-code-mastery scores 84/100 on our quality scale, 2099th of 2,769 Automation skills we index.
Its SKILL.md is 7.6 KB long, well organised into 13 sections with 1 code example: a thorough specification that gives an agent plenty to work with.
It has 817 GitHub stars, a meaningful sign that others use it.
Maintenance, license and trust
- The repository was last updated about 2 months ago, so claude-code-mastery is actively maintained.
- Our last check on 2026-10-11 found the source still online.
- No license is declared. By default that means all rights are reserved: you can read it, but reusing or redistributing it is not clearly permitted. Ask the author before building on it commercially.
- Its trust signals score 88/100, with 1 caution from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.
AI review by kimi-k2.7-code on 2026-10-07. Automated pattern scan on 2026-10-07. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
claude-code-mastery compared with similar skills
All 4 of these similar skills score higher than claude-code-mastery; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| claude-code-mastery (this skill)by borghei | 84 | 817 | 57d ago | SKILL.md |
| Agent-Reachby Panniantong | 100 | 112.7k | 9d ago | CLAUDE.md |
| rufloby ruvnet | 100 | 82.0k | today | CLAUDE.md |
| Claude-Code-Game-Studiosby Donchitos | 100 | 39.9k | 8d ago | CLAUDE.md |
| Scraplingby D4Vinci | 100 | 103.9k | today | MCP Server |
Frequently asked questions
- How do I install claude-code-mastery?
- Run
npx skills add borghei/Claude-Skills --skill claude-code-mastery. The install tabs above show the steps for each supported agent. - Which AI agents does claude-code-mastery work with?
- It is written for Claude Code, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is claude-code-mastery safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It declares no license and scores 88/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is claude-code-mastery still maintained?
- The repository was last updated about 2 months ago, so claude-code-mastery is actively maintained.
Skill content
View source on GitHubname: claude-code-mastery description: > Use when the user asks to "optimize CLAUDE.md", "create a new skill", "write a custom agent", "configure hooks", "manage context window", "set up MCP servers", "scaffold a skill package", "analyze token budget", "create subagents", "configure permissions", "set up worktrees", or "integrate Claude Code with editors". Covers Claude Code CLI mastery, skill authoring, context engineering, hooks automation, subagent creation, and development workflow optimization. license: MIT metadata: version: 1.1.0 author: borghei category: engineering domain: development-tools updated: 2026-06-17 tags: [claude-code, skill-authoring, subagents, hooks]
Claude Code Mastery
Expert skill for Claude Code CLI -- CLAUDE.md optimization, skill authoring, subagent creation, hooks automation, and context engineering.
Keywords: 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
Core Capabilities
- CLAUDE.md optimization — audit, restructure, compress, and hierarchize config files for token efficiency.
- Skill authoring — scaffold and write discoverable skill packages with correct layout and frontmatter.
- Subagent creation — write
.claude/agents/<name>.mdfiles with atoolsallowlist and a Markdown-body system prompt. - Hooks automation — wire
PreToolUse/PostToolUse/Stoplifecycle scripts via.claude/settings.json. - Context engineering — measure and manage the context-window token budget across a codebase.
When to Use
- Authoring, structuring, or optimizing a CLAUDE.md file for any project.
- Scaffolding a new skill package or creating a Claude Code subagent.
- Configuring hooks for automated quality, security, or workflow steps.
- Auditing and reducing context-window consumption.
Clarify First
Before scaffolding or optimizing, confirm these inputs. If any is unknown or vague, ASK — do not assume:
- [ ] Which task — scaffold a new skill, optimize a CLAUDE.md, create a subagent, or analyze context budget (selects
skill_scaffolder.pyvsclaudemd_optimizer.pyvscontext_analyzer.py) - [ ] Target identity — for a new skill: its name, domain, and one-line description; for optimization: the file or project path (the inputs the scripts require)
- [ ] Token budget — the target ceiling (sets
--token-limitand what counts as over-budget)
Stop rule: ask only the 2-3 that most change the output. If the user says "just draft it," proceed and list your assumptions at the top of the artifact.
Quick Start
# 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
Tools
| Tool | Purpose | Command |
|------|---------|---------|
| skill_scaffolder.py | Scaffold a new skill package with correct structure + frontmatter | python scripts/skill_scaffolder.py my-skill -d engineering --description "Does X" |
| claudemd_optimizer.py | Score a CLAUDE.md for structure, tokens, and redundancy with recommendations | python scripts/claudemd_optimizer.py CLAUDE.md --token-limit 4000 |
| context_analyzer.py | Estimate context-window consumption by file category with a budget breakdown | python scripts/context_analyzer.py /path/to/project --max-depth 4 |
All tools support --json. See references/tool-reference.md for full parameter tables and output formats.
References
Load the reference that matches the task — keep this file lean and pull detail on demand:
- references/workflows.md — the five numbered playbooks: optimize a CLAUDE.md, author a skill, create a subagent, configure hooks, and manage the context budget. Read when executing any of those tasks step-by-step.
- references/quick-reference.md — slash commands, permission modes, CLAUDE.md loading order, MCP servers, the troubleshooting table, and success criteria. Read for at-a-glance lookups or when debugging configuration.
- references/tool-reference.md — full parameter tables and output formats for the three Python tools. Read when scripting the tools or interpreting their JSON output.
- references/skill-authoring-guide.md — comprehensive reference for writing effective skills, from YAML frontmatter to structure. Read when authoring a skill in depth.
- references/subagent-patterns.md — guide to creating and using subagents for parallel work and scoped tasks. Read when designing a subagent.
- references/hooks-cookbook.md — practical hook recipes for code quality, security enforcement, and workflow automation. Read when building hooks.
Templates: assets/skill-template.md, assets/agent-template.md
Scope & Limitations
This skill covers:
- Authoring, structuring, and optimizing CLAUDE.md files for any project
- Scaffolding new skill packages with correct directory layout and frontmatter
- Creating and configuring Claude Code subagents with scoped tool access
- Analyzing and managing context window token budgets across a codebase
This skill does NOT cover:
- Writing application source code or implementing business logic (see senior-fullstack, senior-backend)
- MCP server development or custom transport protocols (see mcp-server-builder)
- Advanced prompt engineering techniques for LLM applications (see senior-prompt-engineer)
- CI/CD pipeline configuration or deployment automation (see senior-devops, ci-cd-pipeline-builder)
Integration Points
| 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 .md file; 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 system prompts (the agent file body) |
| 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 |
Related Skills
Agent-Reach
112.7kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
ruflo
82.0k🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated
Claude-Code-Game-Studios
39.9kTurn Claude Code into a full game dev studio — 49 AI agents, 75 workflow skills, and a complete coordination system mirroring real studio hierarchy.
Scrapling
103.9k🕷️ The BEST Web Scraping framework that handles everything from a single request to a full-scale crawl! Don't be shy, join here: https://discord.gg/EMgGbDceNQ and follow here for daily tips and tricks: https://x.com/Scrapling_dev
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
