Agent skill · software engineering · borghei

claude-code-mastery

claude-code-mastery — an agent skill for coding agents.

Why this skill is useful

Adds 3 executable scripts for optimizing CLAUDE.md files and managing context budgets that aren't in public docs.

What it needs

Requires python installed locally. About 3k tokens when loaded. Last updated 2026-07-21. 462 stars on the source repository.

What this skill does

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 skillscaffolder.py vs claudemdoptimizer.py vs contextanalyzer.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. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills borghei/claude-code-mastery

View the source on GitHub

Browse the @skills marketplace