Claude code master
The playbook library. Teach your agents what the docs won't
npx -y skills add NinetrixAI/skills-hub --skill claude-code-masterAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 1 stars1 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.
What its author says it does
Copied from the file, not written here
Teaches agents to use Claude Code CLI in headless print mode — code generation, file editing, codebase Q&A, git workflows, and multi-turn coding tasks
SKILL.md
3.9 KB, as published. Nobody here has run it
Claude Code Master
Use Claude Code CLI (claude) as a sub-agent for coding tasks — code generation, refactoring, codebase analysis, git workflows, and file editing. Always use print mode (-p) for non-interactive execution.
When this applies
- Agent needs to write, edit, or refactor code
- Agent needs to analyze or answer questions about a codebase
- Agent needs to perform git operations (commits, PRs, reviews)
- Agent needs a second AI opinion on code quality or architecture
Self-Help
Run claude --help for the full command list.
Run claude -p --help for print mode flags.
Use --verbose to debug issues.
Process
- Set
ANTHROPIC_API_KEYin env before first use - Use
claude -p "prompt"for single-shot tasks - Pipe file content when context is needed:
cat file.py | claude -p "review this" - Use
--output-format jsonwhen parsing results programmatically - Use
--max-turnsand--max-budget-usdto bound cost and runtime - Chain with other tools:
claude -p "write tests for auth.py" > tests/test_auth.py
Essential Commands
Single-shot (print mode)
claude -p "explain what this project does"
claude -p "add error handling to src/api.py"
claude -p --model sonnet "quick question about this code"
claude -p --model opus "complex refactoring task"
With input piping
cat src/main.py | claude -p "find bugs in this code"
git diff HEAD~3 | claude -p "summarize these changes"
cat error.log | claude -p "diagnose this error"
Structured output
claude -p --output-format json "list all API endpoints in this project"
claude -p --json-schema '{"type":"object","properties":{"files":{"type":"array","items":{"type":"string"}}}}' "which files need updating"
Cost control
claude -p --max-turns 3 "quick fix for the typo in README"
claude -p --max-budget-usd 0.50 "refactor the auth module"
Custom system prompt
claude -p --system-prompt "You are a security auditor" "review this codebase for vulnerabilities"
claude -p --append-system-prompt "Always use TypeScript strict mode" "add types to utils.js"
Scoped tools
claude -p --tools "Read" "explain the architecture"
claude -p --tools "Bash,Read,Edit" "fix the failing test"
Decision Rules
- Quick question or small fix →
claude -p "prompt"(single shot) - Need specific model → add
--model sonnetor--model opus - Parsing output in script → add
--output-format json - Expensive task → set
--max-budget-usdand--max-turns - Security-sensitive code → add
--system-prompt "You are a security auditor" - Only reading, no edits → use
--tools "Read"to restrict capabilities - Multiple related tasks → pipe output between calls, don't try to do everything in one prompt
Do
- Always use
-p(print mode) — interactive mode blocks the agent - Set
--max-budget-usdfor open-ended tasks to prevent runaway costs - Pipe relevant context in rather than relying on codebase discovery for speed
- Use
--model sonnetfor simple tasks to save cost,opusfor complex reasoning - Use
--output-format jsonwhen downstream processing is needed - Restrict tools with
--toolswhen the task only needs reading or specific capabilities
Don't
- Never run
claudewithout-pflag (blocks on interactive input) - Never skip
--max-budget-usdon open-ended tasks (unbounded API spend) - Never pipe secrets or credentials into claude (they appear in logs)
- Never use
--dangerously-skip-permissions(bypasses safety checks) - Never assume claude modified files — verify with
catorgit diffafter