agentsclimarketplace

Claude code mastery

Skill ToruAI/toru-claude-agents/skills/claude-code-mastery

Design better agents, skills and hooks for Claude Code, checking the current spec instead of guessing at fields.From its SKILL.md

Install
npx -y skills add ToruAI/toru-claude-agents --skill claude-code-mastery

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 15 stars15 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

4.5 KB, ~1.1k tokens by cl100k_base, as published. Nobody here has run it

Claude Code Mastery - Building Better AI Systems

Use the cc-docs skill to read the official Claude Code documentation before you design anything against it — the spec moves, and this file is a map, not a substitute for it.

Use this knowledge to continuously improve how you work.

Core Capabilities

Subagents

Location: ~/.claude/agents/ (user) or .claude/agents/ (project)

Key fields:

---
name: agent-name
description: When Claude should delegate here
tools: Read, Grep, Glob, Bash, Edit, Write
model: sonnet | opus | haiku | inherit
permissionMode: default | acceptEdits | bypassPermissions
skills: skill-1, skill-2
hooks:
  PreToolUse: [...]
  PostToolUse: [...]
---

System prompt content here...

Use subagents when:

  • Task needs isolated context
  • Different tools/permissions needed
  • Specialized behavior required

Skills

Location: ~/.claude/skills/ (user) or .claude/skills/ (project)

Structure:

skill-name/
├── SKILL.md          # Required - main instructions
├── reference.md      # Optional - detailed docs
└── scripts/          # Optional - utilities

Key fields:

---
name: skill-name
description: When to apply this skill (triggers auto-loading)
allowed-tools: Read, Grep, Glob  # Optional tool restriction
context: fork  # Optional - run in subagent
---

Instructions here...

Use skills when:

  • Knowledge should auto-apply based on task
  • Pattern repeats across projects
  • Want to inject expertise without delegation

Hooks

Location: .claude/settings.json or subagent frontmatter

Events:

  • PreToolUse - Before tool executes (can block)
  • PostToolUse - After tool executes
  • SubagentStart - When subagent begins
  • SubagentStop - When subagent completes
  • SessionStart - When session begins

Example:

{
  "hooks": {
    "PostToolUse": [{
      "matcher": "Edit|Write",
      "hooks": [{
        "type": "command",
        "command": "./scripts/auto-lint.sh"
      }]
    }]
  }
}

Use hooks when:

  • Deterministic action needed (not AI judgment)
  • Automation on every occurrence
  • Validation before allowing operations

MCP Servers

Configuration: ~/.claude.json or .mcp.json

Access external tools:

  • megg (memory)
  • shadcn (UI components)
  • perplexity (research)
  • Custom servers

Improvement Patterns

Pattern: Repeated Context Loading

Problem: Same context loaded every session Solution: Create a skill that auto-applies

---
name: project-context
description: Apply when working on [project]. Auto-loads conventions.
---

Pattern: Manual Validation

Problem: Manually checking things before commit Solution: Create PreToolUse hook

{
  "hooks": {
    "PreToolUse": [{
      "matcher": "Bash(git commit:*)",
      "hooks": [{"type": "command", "command": "./scripts/pre-commit-check.sh"}]
    }]
  }
}

Pattern: Complex Delegation

Problem: Unclear when to use which agent Solution: Improve agent descriptions, add proactive triggers

description: Use proactively when [specific trigger]. Handles [specific task].

Pattern: Lost Knowledge

Problem: Decisions forgotten between sessions Solution: megg_remember after every significant decision

Documentation Reference

Fetch these with the cc-docs skill rather than trusting a remembered field list:

TopicURL
Subagentshttps://code.claude.com/docs/en/sub-agents
Skillshttps://code.claude.com/docs/en/skills
Hookshttps://code.claude.com/docs/en/hooks-guide
MCPhttps://code.claude.com/docs/en/mcp
Headless modehttps://code.claude.com/docs/en/headless
Settingshttps://code.claude.com/docs/en/settings
CLI referencehttps://code.claude.com/docs/en/cli-reference

Self-Improvement Checklist

When improving workflows:

  1. Identify the friction point
  2. Check docs for existing solution
  3. Choose right tool (skill vs hook vs subagent)
  4. Implement minimal version
  5. Test it works
  6. Document in megg
  7. Consider if others need it (project vs user scope)

Anti-Patterns

  • Over-engineering: Don't create skills for one-time tasks
  • Premature automation: Prove manual workflow first
  • Isolated improvements: Log all changes in megg
  • Ignoring scope: User skills for personal, project for team

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Gives 0 of the 12 instructions most context ai engineering skills give in ~1.1k tokens

Counted across 1,328 of the 2,349 authors here whose files we hold, read 2026-09-06

  • Dispatch a fresh subagent for each taskin 76 of 1328, across 59 files
  • Perform spec compliance review before code quality reviewin 44 of 1328, across 34 files
  • Dispatch a final code reviewer after all tasksin 38 of 1328, across 26 files
  • Answer subagent questions before allowing implementationin 36 of 1328, across 26 files
  • Use the least powerful model capable of the taskin 33 of 1328, across 26 files
  • Create a TodoWrite list for all tasksin 32 of 1328, across 22 files
  • Perform a task review after each implementationin 31 of 1328, across 24 files
  • Extract all tasks and context from the planin 29 of 1328, across 20 files
  • Provide full task text to subagentsin 28 of 1328, across 20 files
  • Use git worktrees for isolated workspacesin 25 of 1328, across 20 files
  • Specify the model explicitly when dispatching a subagentin 23 of 1328, across 18 files
  • Execute all tasks from the plan without stoppingin 21 of 1328, across 16 files

Said here and by no other author read

  • use subagents for isolated context
  • use hooks for deterministic automation
  • use megg to remember significant decisions
  • prove manual workflows before automating
  • log all changes in megg
  • use user scope for personal tasks

Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.