mcpbeat Sign in

Claude Code Mastery Skill for Claude

32k tokens
context cost
the whole folder, loaded on every use
12
files
ships runnable scripts
0
copies elsewhere
how many repositories repackaged it
447
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/borghei/Claude-Skills --skill claude-code-mastery

What comes with it

120 875 bytes besides the instruction
assets/agent-template.md
assets/skill-template.md
references/hooks-cookbook.md
references/quick-reference.md
references/skill-authoring-guide.md
references/subagent-patterns.md
references/tool-reference.md
references/workflows.md
scripts/claudemd_optimizer.py
scripts/context_analyzer.py
scripts/skill_scaffolder.py

What it tells the agent to use

found in the instruction text
Task spawns other agents

The instruction itself

9 sections, as written by the author

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 — define scoped agents with allowed-tools and structured custom instructions.
  • Hooks automation — wire PreToolUse/PostToolUse/Stop lifecycle 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.py vs claudemd_optimizer.py vs context_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-limit and 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 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 |

Other skills for the same job

different authors, same section of the catalogue
Hook Development
by anthropics
vendor ×2

This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.

16k tokens scripts
Hook Development
by anthropics
vendor ×2

This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.

16k tokens scripts
Copilot SDK
by christophacham
×2

Build agentic applications with GitHub Copilot SDK. Use when embedding AI agents in apps, creating custom tools, implementing streaming responses, managing sessions, connecting to MCP servers, or creating custom agents. Triggers on Copilot SDK, GitHub SDK, agentic app, embed Copilot, programmable agent, MCP server, custom agent.

6k tokens
Cass
by Dicklesworthstone
×2

Coding Agent Session Search - unified CLI/TUI to index and search local coding agent history from Claude Code, Codex, Gemini, Cursor, Aider, ChatGPT, Pi-Agent, Factory, and more. Purpose-built for AI agent consumption with robot mode.

6k tokens
Dcg
by Dicklesworthstone
×2

Destructive Command Guard - High-performance Rust hook for Claude Code that blocks dangerous commands before execution. SIMD-accelerated, modular pack system, whitelist-first architecture. Essential safety layer for agent workflows.

4k tokens
Makepad Skills
by ComeOnOliver
×2

Makepad UI development skills for Rust apps: setup, patterns, shaders, packaging, and troubleshooting.

2k tokens
Varlock Claude Skill
by ComeOnOliver
×2

Secure environment variable management ensuring secrets are never exposed in Claude sessions, terminals, logs, or git commits

3k tokens
Create Agentsmd
by github
vendor ×1

Prompt for generating an AGENTS.md file for a repository

2k tokens

How to use it

Copy the folder

Take borghei/claude-code-mastery from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.