Agent Mentor Learn
Claude Code Skills: Build Your Own AI Workflows · Lesson 5 of 6

Lesson 5: Case Study: Building a Code Review Skill

Learning goals:

  • Learn how to organize a multi-step workflow
  • Understand how the checklist pattern applies
  • Get comfortable using supporting files
  • Build one complex Skill that's ready for real use

Prerequisites: << Lesson 4 | Next: Lesson 6 >>

Why Code Review Makes a Good Case Study

Code review is a textbook structured workflow:1

  • The steps are fixed: check conventions, look for problems, propose changes
  • The standards are measurable: every check item either passes or it doesn't
  • It repeats constantly: every PR needs one
  • It suits a Skill: write your team's review standards into a Skill and every review holds the same bar

This case study shows you:

  • How to break a complex workflow into clear steps
  • How to organize instructions around a checklist
  • How to handle several output dimensions at once

Step 1: Define the Review Scope

Before writing anything, decide what this Skill is responsible for checking.

Our code review Skill covers three dimensions:

  1. Conventions: naming, formatting, comments
  2. Potential problems: error handling, edge cases, security risk
  3. Maintainability: duplicated code, function length, logical complexity

What it deliberately doesn't check:

  • Whether the business logic is actually correct (that needs real knowledge of the requirements)
  • Algorithmic efficiency (that needs performance testing)
  • UI/UX design (out of scope for code review)

Step 2: Create the Directory Structure

This time we'll use supporting files to organize the review rules:2

Why split the files:

  • SKILL.md stays short and holds only the core flow
  • The detailed check rules live in separate files, loaded on demand2
  • Your team can maintain each checklist independently without touching the main file

Step 3: Write the Main SKILL.md

Step 4: Write the Supporting Files

checklists/naming.md:

checklists/error-handling.md:

Step 5: Test a Messy Case

Prepare a snippet with several problems in it:

Invoke the Skill:

/code-review
[paste the code above]

The output should include:

  • ⚠️ Naming: process, data, x, and y are all too generic
  • ⚠️ Uses var instead of const/let
  • ⚠️ Uses == instead of ===
  • ⚠️ Never checks whether data is null or not an array
  • ⚠️ Never checks whether item.value exists
  • Suggestion: the function can be split into smaller pure functions

Step 6: Iterate

What the first run tends to surface:

  • Misses (real problems it didn't catch) → add check rules
  • Output too long → tighten the output format so it reports only what matters
  • False positives (normal code flagged as a problem) → add a "needs confirmation" category

Keep improving it:

  1. After each review, note which problems slipped past
  2. Update the checklists
  3. Test again
  4. A month in, the Skill gets genuinely accurate.3

Recap

  • Code review is a natural fit for a Skill: fixed steps, measurable standards, high repetition
  • Organize the flow as a checklist: conventions, error handling, potential problems, maintainability
  • Supporting files keep the Skill maintainable: the main file stays short, detailed rules live on their own
  • Grading the output matters: passed, worth a look, must fix — so the reviewer knows what to do first
  • Keep iterating: add the checks you missed after each review, and a month in it'll be accurate

In the next lesson we move on to advanced patterns: personal versus project skills, version control, and team collaboration.

Lesson 6 >>

Footnotes

  1. Anthropic engineering blog: Equipping agents for the real world with Agent Skills — https://www.anthropic.com/engineering/equipping-agents-for-the-real-world-with-agent-skills

  2. Anthropic platform docs: Agent Skills overview — https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview 2

  3. Claude Code skills: .NET workflows and reusable prompts — https://codewithmukesh.com/blog/skills-claude-code/

Exercises

01

Pick a domain you know well — frontend code, API design, SQL queries, documentation — and build a review Skill for it.

Level 1: Build Your Own Review Skill

Requirements:

  1. At least 3 review dimensions
  2. 3-5 concrete check items per dimension
  3. A clear output format (passed, worth a look, must fix)
  4. Test it on at least 2 real cases
Done criteria · checked locally
02

Take one piece of code and review it twice:

Level 2: Compare a Human Review Against the Skill's
  1. By hand, yourself
  2. With the code-review Skill

Compare what each found, and write down:

  • Which problems the Skill caught that you missed
  • Which problems you caught that the Skill missed
  • Which of its findings were false positives (flagged as problems but actually fine)
Done criteria · checked locally