← Back to list

Create Agent Skills for Code Review

With agent skills, we can package the repeatable tasks and reuse them. Also, we can encapsulate the domain knowledge into agent skills…

Jen-Hsuan Hsieh (Sean) in ALayman · 2026-02-14 13:46 · 2 claps · 3.6 min read paywalled
#software-development #anthropic-claude #agent-skills #code-review #sub-agents
Open on Medium ↗
Wiki topics: LLM · Large Language Models AGT · AI Agents 💻 · Programming

Create Agent Skills for Code Review

Introduction

With agent skills, we can package the repeatable tasks and reuse them. Also, we can encapsulate the domain knowledge into agent skills.

This article is the note of Agent Skills with Anthropic. Besides, we create a code reviewer with skills and sub-agent.

Agenda

Why We Need Skills?

Progressive Disclosure

The remarkable feature of skills is progressive disclosure.

  • Metadata (name, description) are always loaded
  • Only load instructions or additional files when the skill is triggered to avoid polluting the context with additional tokens that are not necessary

The following table is a comparison between skills, prompts, projects, sub-agents, and tools.

[embed]source: https://claude.com/blog/skills-explained

Use Cases

There are a few use cases of skills.

  • Domain expertise ( e.g., brand guidelines and templates, legal review processes, data analysis methodologies, etc)
  • Repeatable workflow (e.g., weekly marketing campaign review, customer call prep workflow, quarterly business review, etc)
  • New capabilities (e.g., creating presentations, generating Excel sheets or PDF reports, building MCP servers, etc)

Skill Structure of Skills

A skill is a folder of organized files consisting of instructions, scripts, assets, and resources that agents can discover to perform a specific task accurately.

There are two major components, SKILL.md and optional directories.

SKILL.md

  • Metadata (YAML formatter)
  • name: should match the name of the parent folder
  • description: what the skills are and when to use this skill (specific keywords)
  • Body content (markdown)
  • step-by-steps instructions
  • input format & output format

Optional Directories

  • Can be /scripts, /references, or /assets
  • Keep one level deep from SKILL.md
  • Link to advanced or domain-specific content

Evaluate and Improve Custom Skill

In the Claude Code, we can use skill creator in evaluate and improve our custom skill.

Install example-skills

  • Type /plugin and choose claude-plugins-official from Marketplaces

  • Type anthropics/skills as the marketplace source

  • Choose example-skills

Use Skill Creator

  • Evaluate the custom skills with the following prompt
use skill-creator to evaluate how well my skills /
in @../skills/have followed the best practices./
Use three subagents in parallel, each subagent evaluates one
  • Improve the custom skill with the following prompt
use skill-creator to improve the workflow description and conciseness for/
@../skills/code-review-standard according to the best practices.

Example Custom Skill: Code Reviewer

For a standalone task like the code reviewer, we can just load the code into the sub-agent’s context.

Then create a skill to instruct the sub-agent how to review the code. The folder structure looks like the following diagram.

There are a few differences between skills and sub-agents.

  • subagents have their own isolated context and tool permissions
  • The agent can delegate a task to the specialized subagent, which works independently and returns results
  • Skills can provide expert knowledge to the main agent or any of its subagents
  • However, Skills still use the agent’s context

Example Files

  • code-reviewer.md

[embed]

  • SKILL.md

[embed]

  • examples.md

[embed]

  • fundamentals.md

[embed]

  • output-templates.md

[embed]

Use Code Reviewer

  • Update memory.md by using the following prompt
Please update the memory.md with the following content

Code Review Process (Mandatory)
When a user requests a code review, you must trigger two tool calls simultaneously in the same message:

Skill("code-review-standards") — Load the review standards
Task(subagent_type="code-reviewer") — Launch the agent to perform the review

Never trigger only one of the two. Do not use the Explore agent as a substitute for the code-reviewer agent.
  • Trigger the code reviewer
Please code review for the files under src/

Summary

Thanks for your patient. I am Sean. I work as a software engineer.

This article is my note. Please feel free to give me advice if any mistakes. I am looking forward to your feedback.

  • Subscribe me

[embed]Join Medium with my referral link — Jen-Hsuan Hsieh (Sean) As a Medium member, a portion of your membership fee goes to writers you read, and you get full access to every story…medium.com

  • Recommended places for digital nomads

[embed]A Layman Emoji cafe is founded by the Taiwan Digital Nomad Association (TDNA) on 2023. Sometimes I like to worked for my side…seanhs.blogspot.com

  • The Daily Learning website

[embed]Search Articles for Web Development | ALayman Daily Learning ALayman Daily learning provides articles, challenges, or videos to people who are also self-learner for programming.www.alayman.io


메타데이터
post_id
9dc76b104b7d
slug
create-agent-skills-for-code-review-9dc76b104b7d
url
https://medium.com/a-layman/create-agent-skills-for-code-review-9dc76b104b7d
canonical_url
https://medium.com/a-layman/create-agent-skills-for-code-review-9dc76b104b7d
author_url
https://medium.com/@seanhsieh_63050
status
ok
fetched_at
2026-06-10 08:17:25