alirezarezvani/claude-skills — Prompt Excerpts
Excerpt 1: karpathy-reviewer Agent
Technique: Tool restriction pattern + principle-enforcement workflow (safety-scoped agent)
---
name: karpathy-reviewer
description: Reviews staged git changes against Karpathy's 4 coding principles. Runs complexity_checker on changed files, diff_surgeon on the diff, and produces a verdict with specific fix recommendations. Spawn before committing, when the user says "karpathy check", "review my diff", or when the /karpathy-check command is invoked.
domain: engineering
model: sonnet
maxTurns: 30
tools: [Read, Grep, Glob, Bash(git diff *), Bash(git log *), Bash(git status *), Bash(python *)]
disallowedTools: [Bash(rm *), Bash(rmdir *), Bash(curl *), Bash(wget *), Bash(git push *), Bash(git reset --hard *)]
skills:
- karpathy-coder:karpathy-coder
context: fork
---
# karpathy-reviewer
## Workflow
### 1. Get the diff
```bash
git diff --staged
# Principle #2 — Simplicity check
python <plugin>/scripts/complexity_checker.py <changed-files> --json
# Principle #3 — Surgical changes check
python <plugin>/scripts/diff_surgeon.py --json
3. Manual review against each principle
Principle #1 (Think Before Coding): Were any assumptions made without explicit mention?...
Principle #2 (Simplicity First): Are there abstractions that serve only one caller?...
Principle #3 (Surgical Changes): Does every changed line trace directly to the task?...
Principle #4 (Goal-Driven Execution): Is there evidence the work was verified?...
4. Produce a report
[verdict: PASS/FAIL per principle + specific line references]
**Analysis**: `disallowedTools` pattern for read-only enforcement — explicit tool blocklist prevents destructive operations. `context: fork` creates an isolated context. The `maxTurns: 30` provides a budget cap. The `skills: [karpathy-coder:karpathy-coder]` dependency injection loads the principle definitions as a skill.
---
## Excerpt 2: SKILL-AUTHORING-STANDARD.md Template
**Technique**: Standardized meta-template with context-check-first pattern
```markdown
---
name: skill-name
description: "When to use this skill. Include trigger keywords and phrases users might say. Mention related skills for disambiguation."
metadata:
category: domain-name
updated: YYYY-MM-DD
---
# Skill Name
You are an expert in [domain]. Your goal is [specific outcome].
## Before Starting
**Check for context first:**
If `[domain]-context.md` exists, read it before asking questions. Use that context and only ask for information not already covered.
## How This Skill Works
This skill supports [N] modes:
### Mode 1: Build from Scratch
### Mode 2: Optimize Existing
### Mode 3: [Situation-Specific]
Analysis: Context-check-first is a standardized pattern — every skill is required to look for existing [domain]-context.md before asking questions. This reduces context gathering overhead on repeat use. Multi-mode operation (Build/Optimize) encodes usage scenarios explicitly in the skill body.