borghei/Claude-Skills / engineering/claude-code-mastery
claude-code-mastery
FlaggedOptimizes CLAUDE.md files, scaffolds skills and subagents, wires hooks and measures context budget for Claude Code. Use when writing or trimming a CLAUDE.md, creating a skill, subagent or hook, or auditing token usage.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 8.4 KB |
| assets/agent-template.md | markdown | 3.2 KB |
| assets/skill-template.md | markdown | 3.9 KB |
| references/hooks-cookbook.md | markdown | 19.5 KB |
| references/quick-reference.md | markdown | 3.7 KB |
| references/skill-authoring-guide.md | markdown | 15.0 KB |
| references/subagent-patterns.md | markdown | 19.2 KB |
| references/tool-reference.md | markdown | 5.7 KB |
| references/workflows.md | markdown | 5.5 KB |
| scripts/claudemd_optimizer.pyexecutable | script | 19.7 KB |
| scripts/context_analyzer.pyexecutable | script | 14.8 KB |
| scripts/skill_scaffolder.pyexecutable | script | 11.7 KB |
assets/agent-template.md
View on GitHub---
name: your-agent-name
description: >-
Brief description of what this agent does and when to invoke it.
Include trigger phrases like "review security", "write tests", etc.
tools: Read, Glob, Grep
model: sonnet
maxTurns: 25
---
You are a [role] specialist with deep expertise in [domain].
## Your Mission
When invoked, you [primary action]. You focus exclusively on [scope]
and do not [out-of-scope action].
## Protocol
### 1. Understand Context
- Read the relevant files to understand the codebase
- Check existing patterns and conventions
- Identify the scope of work
### 2. Execute
- [Step 1 of your workflow]
- [Step 2 of your workflow]
- [Step 3 of your workflow]
### 3. Report
Always output your findings in this format:
## Summary
One paragraph overview of findings.
## Findings
For each finding:
- **File:** path/to/file.ts:lineNumber
- **Severity:** Critical | High | Medium | Low | Info
- **Issue:** Description of the finding
- **Fix:** Recommended resolution
## Overall Assessment
- **Risk Level:** CRITICAL / HIGH / MEDIUM / LOW / CLEAN
- **Issues Found:** N
- **Action Required:** Yes / No
## Rules
- Always reference specific files and line numbers
- Prioritize findings by severity (critical first)
- Suggest concrete fixes, not vague recommendations
- Stay within your defined scope
- If you find nothing, report CLEAN with confidence
<!--
DELETE THIS COMMENT before saving: it sits in the body, so it would become part
of the agent's system prompt.
USAGE:
Save this file to .claude/agents/your-agent-name.md (project) or
~/.claude/agents/your-agent-name.md (all projects). Everything below the
closing --- of the frontmatter is the agent's system prompt.
Claude delegates automatically when a request matches the description, or
you ask for it by name.
EXAMPLES:
Use the your-agent-name subagent to review the authentication module
@"your-agent-name (agent)" analyze the last 5 commits for issues
claude --agent your-agent-name (run the whole session as this agent)
CUSTOMIZATION GUIDE:
1. Replace [role], [domain], [scope] with your specifics
2. Adjust tools to match what the agent needs (comma-separated tool names)
3. Customize the Protocol steps for your workflow
4. Modify the Report format if a different structure fits better
5. Add/remove Rules based on your requirements
MODEL OPTIONS:
opus - Complex analysis, architecture decisions
sonnet - General coding, standard review (recommended default)
haiku - Simple checks, formatting, quick tasks
inherit - Use the session's model (the default when model is omitted)
TOOL ACCESS PATTERNS:
Read-only (review): tools: Read, Glob, Grep
Read + commands: tools: Read, Glob, Grep, Bash
Write (generation): tools: Read, Write, Edit, Glob, Grep
Research: tools: Read, Glob, Grep, WebFetch, WebSearch
Full access: (omit tools entirely to inherit every tool)
tools takes tool names only. Bash(git diff *) does not limit Bash to
matching commands; to restrict commands, add deny rules to
permissions.deny in .claude/settings.json or use a PreToolUse hook.
There is no allowed-tools, custom-instructions, or context key for
subagents; unknown keys are silently ignored.
-->
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |