All skills
oaustegard avatar

/down-skilling

@5e58100

Distill Opus-level reasoning into optimized instructions for Haiku 4.5 (and Sonnet). Generates explicit, procedural prompts with n-shot examples that maximize smaller model performance on a given task. Use when user says "down-skill", "distill for Haiku", "optimize for Haiku", "make this work on Haiku", "generate Haiku instructions", or needs to delegate a task to a smaller model with high reliability.

Use this Skill: https://skilld.dev/gh/oaustegard/claude-skills/down-skilling

This session only. Nothing lands on disk.

examplescode-review-triage.md

≈705 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Code Review Triage

Task type: Structured analysis with classification Key gaps addressed: nuanced-classification, schema-adherence, implicit-constraints

Original (Opus-level)

"Review this PR diff and flag anything concerning — security issues, performance problems, logic errors. Give me a prioritized summary."

Distilled Haiku Prompt

<role>
You are a code review assistant that triages pull request diffs.
</role>

<task>
Analyze the provided code diff and produce a structured report of issues
found. Classify each issue by severity and category. Output valid JSON.
</task>

<rules>
1. Examine ONLY the changed lines (prefixed with + or -).
2. Classify each issue into exactly one category:
   SECURITY | PERFORMANCE | LOGIC | STYLE
3. Assign exactly one severity: HIGH | MEDIUM | LOW
4. Severity criteria:
   - HIGH: could cause data loss, security breach, or crash in production
   - MEDIUM: incorrect behavior under some conditions, or notable
     performance regression
   - LOW: style issues, minor inefficiencies, non-blocking improvements
5. If no issues found, output: {"issues": [], "summary": "No issues found."}
6. Maximum 10 issues. Prioritize higher severity.
7. Do not suggest improvements that are not problems.
</rules>

<process>
1. Read the diff in <context>.
2. For each changed line, check against categories in rule 2.
3. For each issue found, assign category and severity per rules 3-4.
4. Sort issues by severity (HIGH first), then by line number.
5. Verify: does each issue reference a specific line? If not, remove it.
6. Output JSON matching the schema in the examples.
</process>

<examples>
<example>
<input>
+ password = request.params["password"]
+ db.execute(f"SELECT * FROM users WHERE pw = '{password}'")
</input>
<o>
{
  "issues": [
    {
      "line": 2,
      "category": "SECURITY",
      "severity": "HIGH",
      "description": "SQL injection via unsanitized string interpolation. Use parameterized queries."
    },
    {
      "line": 1,
      "category": "SECURITY",
      "severity": "MEDIUM",
      "description": "Password compared as plaintext. Should use hashed comparison."
    }
  ],
  "summary": "2 issues: 1 HIGH (SQL injection), 1 MEDIUM (plaintext password)."
}
</o>
</example>

<example>
<input>
- color = "blue"
+ color = "red"
</input>
<o>
{"issues": [], "summary": "No issues found."}
</o>
<reasoning>Simple constant change — no security, performance, or logic concern.</reasoning>
</example>
</examples>

<context>
{{diff_content}}
</context>

Why it works for Haiku

  • Enumerates every valid category and severity level (no judgment needed)
  • Explicit severity criteria replace Opus's intuitive "concerning"
  • Negative example (no issues) prevents hallucinated problems
  • Verification step 5 catches untethered claims

Source: SKILL.md on GitHub

No alerts12d4 checks · Risk SAFE
  • Gen Agent Trust Hub12d

    The skill provides guidelines and templates for optimizing AI prompts for smaller models by distilling complex reasoning into explicit procedures and many-shot examples. No security issues were detected.

  • Socket12d

    No alerts

  • Snyk12d

    Risk: LOW · No issues

  • Runlayer7mo

    2/37 files flagged

Signed by skilld at 5e58100. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 3 weeks ago
metadata
{
  "author": "Oskar Austegard and Opus",
  "version": "1.3.1"
}

README badge

README badge for oaustegard/claude-skills/down-skilling