skill-eval
Test and iterate on a skill using parallel eval runs. Spawns with-skill and baseline runs, grades results, and helps improve the skill based on feedback. Use when testing skill quality or iterating on skill improvements.
What this skill does
# Skill Eval
Test a skill with parallel eval runs and iterate based on results.
## Input
```
SKILL_PATH = $ARGUMENTS
```
If empty: `AskUserQuestion("Which skill do you want to test? Provide the path.")`
## Workflow
### Step 1: Validate Skill Exists
```
If not exists(SKILL_PATH/SKILL.md):
ERROR "No SKILL.md found at SKILL_PATH"
SKILL_CONTENT = Read(SKILL_PATH/SKILL.md)
SKILL_NAME = extract name from frontmatter
SKILL_DESCRIPTION = extract description from frontmatter
```
### Step 2: Load or Create Evals
```
EVALS_PATH = SKILL_PATH/evals/evals.json
If exists(EVALS_PATH):
EVALS = Read(EVALS_PATH)
Present evals to user, ask: "Use these evals, modify, or create new ones?"
Else:
Generate 2-3 realistic test prompts based on SKILL_CONTENT
Each prompt should be what a real user would actually say
Include enough detail: file paths, context, specific requests
Present to user: "Here are test cases I'd like to try. Look right, or want changes?"
```
Wait for user confirmation before proceeding.
**Eval format:**
```json
{
"skill_name": "SKILL_NAME",
"evals": [
{
"id": 1,
"prompt": "User's realistic task prompt",
"expected_output": "Description of expected result",
"expectations": [
"The output includes X",
"The skill used approach Y"
]
}
]
}
```
Save confirmed evals to EVALS_PATH.
### Step 3: Set Up Workspace
```
WORKSPACE = SKILL_PATH-workspace
ITERATION = find highest iteration-N in WORKSPACE + 1, or 1 if none
ITER_DIR = WORKSPACE/iteration-ITERATION
mkdir -p ITER_DIR
```
### Step 4: Spawn All Runs
For each EVAL in EVALS, spawn TWO subagents in the SAME turn:
**With-skill run:**
```
Agent(prompt: """
Execute this task:
- Read the skill at: SKILL_PATH/SKILL.md
- Follow the skill's instructions to complete this task: EVAL.prompt
- Save all outputs to: ITER_DIR/eval-EVAL.id/with_skill/outputs/
""")
```
**Baseline run (no skill):**
```
Agent(prompt: """
Execute this task (no special instructions):
- Task: EVAL.prompt
- Save all outputs to: ITER_DIR/eval-EVAL.id/without_skill/outputs/
""")
```
Launch ALL runs (with-skill + baseline for every eval) in parallel.
### Step 5: Draft Assertions While Runs Execute
While runs are in progress, draft quantitative assertions for each eval:
- Assertions must be objectively verifiable
- Give each a descriptive name
- Skip assertions for subjective outcomes (writing style, design quality)
Write `eval_metadata.json` for each eval directory:
```json
{
"eval_id": 1,
"eval_name": "descriptive-name",
"prompt": "The user's task prompt",
"assertions": ["Output includes X", "File is valid JSON"]
}
```
Explain assertions to user while waiting.
### Step 6: Grade Results
Once all runs complete:
For each run (with_skill and without_skill):
```
Agent(prompt: """
Read agents/skill-grader.md and follow its instructions.
- expectations: EVAL.expectations
- transcript_path: ITER_DIR/eval-EVAL.id/CONFIG/transcript.md
- outputs_dir: ITER_DIR/eval-EVAL.id/CONFIG/outputs/
- eval_prompt: EVAL.prompt
""", subagent_type: "majestic-tools:agents:skill-grader")
```
### Step 7: Present Results
For each eval, show:
- Prompt
- With-skill pass rate vs baseline pass rate
- Key differences in outputs
- Any eval feedback from grader
Summary table:
```
| Eval | With Skill | Baseline | Delta |
|------|-----------|----------|-------|
| 1 | 85% | 35% | +50% |
```
Ask user: "How do these look? Any specific feedback on the outputs?"
### Step 8: Iterate (if needed)
```
If user has feedback:
1. Analyze feedback — generalize, don't overfit to specific cases
2. Improve the skill (Edit SKILL.md)
3. Explain changes made and why
4. Ask: "Want to rerun the evals with the updated skill?"
5. If yes: goto Step 3 (new iteration)
If user is satisfied:
"Skill looks good!"
```
## Improvement Guidelines
When rewriting skills based on feedback:
- **Generalize** — don't overfit to the 2-3 test cases; the skill will be used many times
- **Keep it lean** — remove instructions that aren't pulling their weight
- **Explain the why** — tell the model why things matter instead of rigid MUSTs
- **Look for repeated work** — if all runs wrote similar helper scripts, bundle the script in the skill
- **Read transcripts** — check if the skill wastes time on unproductive steps
## Error Handling
| Condition | Action |
|-----------|--------|
| Subagent run times out | Note timeout, grade available outputs |
| No outputs produced | FAIL all expectations for that run |
| Skill has syntax errors | Fix before running evals |
| User wants to stop iterating | Accept and summarize current state |
Related in Code Review
gstack
IncludedFast headless browser for QA testing and site dogfooding. Navigate pages, interact with elements, verify state, diff before/after, take annotated screenshots, test responsive layouts, forms, uploads, dialogs, and capture bug evidence. Use when asked to open or test a site, verify a deployment, dogfood a user flow, or file a bug with screenshots. (gstack)
startup-due-diligence
IncludedLegal due diligence review for seed-stage and Series A startups (US, Delaware C-Corp focus). Supports both investor and founder perspectives. Capabilities include: (1) Interactive document review and issue spotting; (2) Document request list generation; (3) Cap table and SAFE/convertible note analysis; (4) Red flag identification with severity ratings; (5) Diligence report generation. TRIGGERS: due diligence, DD, startup investment, cap table review, Series A, seed round, investor diligence, legal review startup, SAFE analysis, convertible note, 409A, founder vesting.
interview-master
IncludedThis skill should be used when the user asks to "generate interview questions", "prepare for interview", "optimize resume", "conduct mock interview", "analyze git commits for resume", "generate resume from code", "review my resume", or mentions interview preparation, career assistance, or extracting project experience from git history. Provides comprehensive interview and career development guidance for both job seekers and interviewers.
fix-issue
IncludedFixes GitHub issues using parallel analysis agents for root cause investigation, code exploration, and regression detection. Reads issue context from gh CLI, searches codebase and memory for related patterns, generates a fix with tests, and links the resolution back to the issue via PR. Includes prevention analysis to avoid recurrence. Use when debugging errors, resolving regressions, fixing bugs, or triaging issues.
sf-apex
IncludedGenerates and reviews Salesforce Apex code with 150-point scoring. TRIGGER when: user writes, reviews, or fixes Apex classes, triggers, test classes, batch/queueable/schedulable jobs, or touches .cls/.trigger files. DO NOT TRIGGER when: LWC JavaScript (use sf-lwc), Flow XML (use sf-flow), SOQL-only queries (use sf-soql), or non-Salesforce code.
swift-development
IncludedComprehensive Swift development for building, testing, and deploying iOS/macOS applications. Use when Claude needs to: (1) Build Swift packages or Xcode projects from command line, (2) Run tests with XCTest or Swift Testing framework, (3) Manage iOS simulators with simctl, (4) Handle code signing, provisioning profiles, and app distribution, (5) Format or lint Swift code with SwiftFormat/SwiftLint, (6) Work with Swift Package Manager (SPM), (7) Implement Swift 6 concurrency patterns (async/await, actors, Sendable), (8) Create SwiftUI views with MVVM architecture, (9) Set up Core Data or SwiftData persistence, or any other Swift/iOS/macOS development tasks.