templates/skills/cli/claude-code/SKILL.md
Tool: Anthropic Claude Code CLI (`npm install -g @anthropic-ai/claude-code`)
npx skillsauth add hivellm/rulebook Claude CodeInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Tool: Anthropic Claude Code CLI (npm install -g @anthropic-ai/claude-code)
export ANTHROPIC_API_KEY=your_key
claude --model claude-sonnet-4-20250514
# Always read AGENTS.md and CLAUDE.md first
claude "Read AGENTS.md and CLAUDE.md, then implement [feature] with tests"
# Key flags:
--model claude-sonnet-4-20250514 # Model selection (default: sonnet)
--dangerously-skip-permissions # Skip permission prompts (use with caution)
--verbose # Debug mode
MANDATORY: When editing multiple files, Claude Code MUST edit files SEQUENTIALLY, one at a time.
Claude Code's Edit tool uses exact string matching for replacements. When multiple files are edited in parallel:
✅ CORRECT (Sequential):
1. Edit file A → Wait for confirmation
2. Edit file B → Wait for confirmation
3. Edit file C → Wait for confirmation
❌ WRONG (Parallel):
1. Edit files A, B, C simultaneously → Failures likely
MANDATORY: When implementing tests, Claude Code MUST write complete, production-quality tests.
// ❌ NEVER do this - placeholder tests
it('should work', () => {
expect(true).toBe(true);
});
// ❌ NEVER do this - skipped tests
it.skip('should handle edge case', () => {});
// ❌ NEVER do this - incomplete assertions
it('should return data', () => {
const result = getData();
expect(result).toBeDefined(); // Too weak!
});
// ❌ NEVER do this - "simplify" by removing test cases
// Original had 10 test cases, don't reduce to 3
// ✅ CORRECT - complete test with proper assertions
it('should return user data with correct structure', () => {
const result = getUserById(1);
expect(result).toEqual({
id: 1,
name: 'John Doe',
email: '[email protected]',
createdAt: expect.any(Date),
});
});
// ✅ CORRECT - test edge cases and error paths
it('should throw NotFoundError when user does not exist', () => {
expect(() => getUserById(999)).toThrow(NotFoundError);
});
// ✅ CORRECT - test all branches
describe('validateEmail', () => {
it('should return true for valid email', () => {...});
it('should return false for missing @', () => {...});
it('should return false for missing domain', () => {...});
it('should return false for empty string', () => {...});
});
npm run lint && npm testBefore completing any task:
Critical: Reference AGENTS.md and CLAUDE.md in prompts for consistent code generation.
<!-- CLAUDE_CODE:END -->research
Create structured analyses with numbered findings, execution plans, and task materialization
research
Author a rulebook task spec interactively — research, draft, ask the user clarifying questions, confirm, then create the tasks in rulebook ready for /rulebook-driver. Use when the user wants to plan/spec a feature before implementing.
development
Behavioral guidelines to reduce common LLM coding mistakes — overcomplication, sloppy refactors, hidden assumptions, weak goals. Use when writing, reviewing, or refactoring code. Auto-applies; invoke explicitly via /karpathy-guidelines or 'follow karpathy discipline'.
data-ai
Autonomous AI agent loop for iterative task implementation (@hivehub/rulebook ralph)