When I look back at a working day, the code itself is rarely the slow part. The slow parts are the things around it.
Writing the commit message. I know what I changed, I just don't want to decide for the tenth time today whether this is refactor or chore, and whether the scope is task or task-list.
Writing the PR description. This one is worse, because a bad description costs somebody else time, not me. I used to write a short description because usually there was no time for more, and the reviewer had to work out the rest from the diff.
Catching the dumb stuff before a reviewer does. Most of it isn't about the framework at all. Every project has its own rules that the team agreed on and that are hard to enforce with anything but a review: what a UI component may import, how files are named, where logic belongs. Framework traps are one more example: in Angular, an array mutated in place can leave a signal-based list showing stale data, which compiles, passes a thin test suite and breaks later.
Applying review comments. Half of them are real, some are stale because I already fixed that line, some are simply wrong, and one contradicts a rule we wrote down months ago.
None of this is hard. It's the same small decisions made the same way every time, and I get sloppy at them by late afternoon, which is why I wrote them down as skills.
What is a skill, and why keep it in the repository?
A skill is a folder with one SKILL.md file. The format started at Anthropic and is now an open standard, Agent Skills, read by Claude Code, OpenAI Codex, Gemini CLI, GitHub Copilot, Cursor and dozens of other agents. This is the layout the specification defines:
skill-name/
├── SKILL.md # required: metadata + instructions
├── scripts/ # optional: executable code
├── references/ # optional: documentation
└── assets/ # optional: templates, resourcesAnd a SKILL.md skeleton built from it. The block between the two --- lines is the frontmatter: the metadata the agent reads before anything else. Only name and description are required, and the three body sections are the ones the spec recommends:
---
name: skill-name # 1–64 chars: lowercase letters, digits, hyphens; must match the folder name
description: What this skill does and when to use it. # up to 1,024 chars
---
# Skill name
## Instructions
1. First step.
2. Second step.
## Examples
Input: ...
Output: ...
## Edge cases
- What to do when ...The description is what decides when the skill gets picked up, so it says both what the skill is for and what it's not for. In Claude Code you can also call a skill explicitly by typing /skill-name.
The part that matters for a team is the location. Because the folder sits in the repo, it goes through review like any other file, it is versioned, and a new person gets the team's conventions on the first clone instead of on the third PR comment.
Where you put a skill decides who gets it. For a team, three places matter:
| Where the skill lives | Who gets it | Use it for |
|---|---|---|
| the repo: .claude/skills/ | everyone who clones it | the team's commit format, review bar, PR template |
| a library folder: libs/task/.claude/skills/ | everyone, once the agent works in that folder | rules for one part of a monorepo |
| your home folder: ~/.claude/skills/ | only you, in every project | personal habits nobody else should inherit |
The paths are Claude Code's, and other agents use their own folder names. VS Code with Copilot, for example, also reads .claude/skills/ and .agents/skills/ (VS Code docs). There are a few more places for special cases: organization-wide skills, plugins, your claude.ai account and skills built into the agent (Claude Code docs). Our /code-review replaces the built-in one with the same name, but the built-in /review alias still runs the original.
The library-folder option took me a while to find. Claude Code loads such a skill only once the agent works on files in that folder. For a skill in the root folder, the paths field comes close: paths: libs/task/** limits auto-invocation to that part of the tree (Claude Code docs). Unlike a nested skill, it always shows up in the menu you get by typing /, so you can call it at any time. The pattern is relative to where you start Claude Code, so start it from the repo root. Our four sit in the root folder on purpose: commits, reviews and PRs work the same way in every library.
Our four skills are deliberately self-contained. Each one ends with a short "Conventions" section, which is the main place you edit when you fork it for another repo. If the repo's project rules file says something different (CLAUDE.md in our case, AGENTS.md in many other agents), that file wins. That rule is written into the skills themselves, so there's no ambiguity about which document is the authority.
How a skill reaches the model
This is the part I wish I'd known before writing my first skill: a skill is loaded on demand, not all at once.
When a session starts, the agent only sees the name and the description of each skill. That's enough for it to know the skill exists. The full instructions are read only when a task matches the description or you call the skill by name, and extra files next to it are opened only when the instructions point to them. Agents that let you mark a skill as manual-only, such as Claude Code with disable-model-invocation: true, never run it unless you call it, and Claude Code also keeps its description out of the model's context.
So a skill costs almost nothing until the moment you need it.
That changes how you write one:
- The description does the most work. It's usually the only part the agent sees up front, so it decides when the skill is used. Say what the skill is for and what it's not for.
- Keep the main file short. The standard recommends under 500 lines, with long reference material moved to separate files that are opened only when needed.
- Write the instructions as standing rules. In a long skill, put the important ones at the top, since in a long session the agent may not keep the whole file in view.
The four skills in the base setup
| Skill | Input | What it produces | Where it stops |
|---|---|---|---|
| /code-review | uncommitted changes, the branch, or a PR diff | a table of findings marked BLOCKING, WARNING or SUGGESTION, each with a fix | does not fix or post anything |
| /git-commit | working changes | a Conventional Commits message (the type(scope): description format) plus the actual commit | does not push, does not open a PR |
| /generate-pr | the branch diff | a PR title and description, then the PR | asks before pushing and before creating; does not review or merge |
| /fix-pr-comments | a PR number | fixes, a commit through /git-commit, replies on the threads | asks before pushing and before replying |
Each skill does one job and leaves the next one alone, so I can stop after any step and the repo is still in a sane state.
Our full versions are tied to our repo and our tools, so each skill section below shows a minimal version to start from, plus a list of what's worth adding later.
How the four skills fit together
- Work on the branch.
- /code-review on the local diff.
- The agent fixes the findings you agree with and runs lint, typecheck and tests.
- /git-commit.
- /generate-pr.
- PR review, by a person or an AI code review tool.
- /fix-pr-comments, which commits through /git-commit and asks before pushing.
- Back to step 6 for the next review round.
The first review runs on the local diff, before anyone else sees the code. I ask the agent to fix the findings that hold up and to run lint, typecheck and tests, then check the result myself.
At any step I can stop or finish it by hand, and for me that's worth more than the full automation.
/code-review: what stops it from inventing findings?
This is the skill I was most skeptical about, because I've read enough automated reviews that comment on import order and miss the leak.
The minimal version keeps it honest with one rule: check the codebase before claiming anything, and report only what you verified, each finding with a fix. The team's own rules come first: whatever is written in the project rules file applies to every review and wins over the agent's own idea of good code.
---
name: code-review
description: Review the changed code and report findings with a fix for each. Use when the user asks for a review or to check their changes. Not for fixing.
---
1. Pick the diff: uncommitted changes (staged, unstaged and new
files) if there are any, otherwise the branch against main.
If it is unclear, ask.
2. Skip images, lock files and generated files.
3. Check every change against the project rules file first:
naming, structure, what may import what. Then look
for, most important first: bugs and regressions
(including callers of changed exports), security holes,
performance problems, missing error handling, dead or
duplicated code, leftover debug logs, missing tests.
Before you flag a pattern, check how the codebase does it.
Report only what you verified. Drop guesses.
4. Report a table: # | file:line | severity | issue and fix.
If there are no findings, say so. Then stop: fix nothing
without an explicit yes.
## Conventions
- Severity: BLOCKING, WARNING or SUGGESTION.
- Review only changed code and the code it affects.
- Skip what the compiler, linter or formatter already catches.
- If the project rules file disagrees, it wins.On an early version of the sort-order branch, a report could look like this:
# | file:line | severity | issue and fix
1 | task-list.store.ts:42 | BLOCKING | reverse() mutates the tasks array in place; copy it first: [...tasks].reverse()
2 | task-sort-toggle.component.ts:12 | WARNING | imports TaskDto from data-access; UI components use the domain Task typeWorth adding later:
- your team's hard rules as a list the review enforces without checking, such as member order, naming suffixes, or what UI components may import;
- framework rules, for example for Angular signals: readonly everywhere, protected for template-only state, public input() and output();
- a "what not to check" list for the false positives your team keeps getting;
- posting chosen findings to the PR through a form, if you use the skill for interactive PR reviews, with nothing posted unless you tick it.
In practice, two things matter more than anything written in the file. It does best on small PRs, one feature or one bug each. And even with that rule, it always tries to find something. So before anything goes to the PR, I check every finding myself, most carefully the ones that would go out as request changes.
/git-commit: how do you stop arguing with yourself about commit messages?
The minimal version: stage everything, draft a Conventional Commits message from what is staged, ask, commit. It never pushes and never opens a PR: it does one job and stops. Staging everything means every change in the working tree goes into the commit, so run it at the end of each stage of work, while the tree holds only changes that belong together. A branch can carry several such commits, one per stage.
---
name: git-commit
description: Commit current changes with a Conventional Commits message after the user confirms. Not for pushing.
---
1. Run git add -A, then git status and git diff --cached.
If nothing is staged, stop.
2. Draft one message from the staged diff: <type>(<scope>): <description>
3. Show it and ask for a yes. On no, ask what to change.
4. On yes, run git commit. Never push.
## Conventions
- Types: feat, fix, refactor, chore, test, docs.
- Imperative, lower case, under 80 characters.
- No AI attribution in the message.
- If the project rules file disagrees, it wins.In Claude Code the attribution line alone is not reliable, because the built-in commit instructions add a Co-Authored-By trailer and a PR footer by default. To turn both off, set {"attribution": {"commit": "", "pr": ""}} in .claude/settings.json; that covers /generate-pr too.
Worth adding later:
- a ticket number in the message, if your team requires one;
- a table that maps paths to scopes, and one that maps kinds of change to commit types (a new component is feat, a bug fix is fix);
- the rest of Conventional Commits, if your team uses it: a body that explains why, and breaking changes marked with ! after the type or a BREAKING CHANGE: footer, which release tools such as semantic-release read to pick the next version;
- a few real commit messages from your history as examples;
- a confirmation form instead of a plain question (AskUserQuestion in Claude Code);
- staging only the files that belong to this commit instead of everything;
- a warning for files that look like secrets, such as .env files or keys;
- an allowed-tools list, which pre-approves commands but doesn't block anything else;
/generate-pr: what should the PR title and description say?
In our setup the description is written from the diff and the ticket, not from the commit log.
Commit messages are terse, batched, reworded during a rebase, or sometimes literally say wip. A branch of sloppy commits and a branch of careful ones should produce the same PR description, because the code is the same. So the skill reads the diff for the what and the ticket for the why.
Here's an example. The branch feat/sort-order is a single commit, feat(task): add a sort order toggle to the task list, touching four libraries. This is what the AI agent generated:
Adds a newest-first / oldest-first sort order to the task list. Ordering is a
view concern, so it stays out of the API query and flipping it makes no request.
TaskListStore holds the choice in a signal, and tasks is now a computed
that copies the array before reversing it.That's the shape we aim for: short, written for a person, saying what changed and why. It leaves out what the PR page already shows, such as the list of files or changed lines, and anything obvious. What it does point out is the detail worth a second look: tasks changed from a plain signal to a computed, and that's the one line a reviewer needs to look at twice. It's the stale-array trap from the intro: reverse() changes the array in place, so without the copy the list can keep showing the old order.
The minimal version checks that the branch is ready, writes the title and description, and opens the PR only after a yes:
---
name: generate-pr
description: Open a pull request for the current branch with a title and description written from the diff. Use when the user asks to create or open a PR.
---
1. Check the branch: it is not the target branch and has commits
ahead of it. If files are uncommitted, ask whether to continue.
2. If the branch is not on the remote, ask before pushing.
3. If an open PR already exists for the branch, stop and show it.
4. Write a title that sums up the whole change, and the description
from the diff: what changed and why, kept short.
5. Show the title, target branch and description. Ask before creating.
6. Create the PR and report its link.
## Conventions
- Target branch: main, unless the user names another.
- Title: a short summary of the whole change, not a copy of a commit.
- Description from the diff, not from the commit log.
- Write it the way you'd explain the change to the reviewer:
plain and a little spare.
- Skip lock files, generated files and translations.
- One or two sentences of summary; bullets only when the
change needs them.
- No file lists, line numbers, "This PR" openers or filler such as
"Additionally" or "robust".
- No closing summary, test plan or notes on what to review.
- If the project rules file disagrees, it wins.Worth adding later:
- updating an open PR on the same branch instead of stopping, for example to refresh its description after new commits;
- a link to the ticket named in the branch (in Jira, for example), with the why pulled from it when there is one;
- your team's own style: a few real PR descriptions from your repo as examples, and the words your team likes or avoids;
- reviewers from the host's defaults, with the author left out.
/fix-pr-comments: what does it do with a comment it disagrees with?
The idea behind it: applying every comment without thinking is also a kind of laziness. So before it changes anything, it asks whether each comment really improves the code, and says so when it disagrees.
---
name: fix-pr-comments
description: Apply review comments from a given PR. Use only when the user runs /fix-pr-comments <PR number>.
---
1. If there are uncommitted changes, ask before going on.
2. Check out the PR branch and read its open review comments.
Skip resolved threads and automated CI comments.
3. For each comment, read the code around it, not just the line.
If you disagree with a comment, say why before changing anything.
4. Apply the fixes you agreed on, in every place they affect.
Do not touch unrelated code.
5. Commit with /git-commit. Ask before pushing.
6. Ask before replying on the PR. Reply only about fixes that
are pushed, and give the reason for every comment you skipped.
## Conventions
- One or two sentences per reply: what changed, or why not.
- If the project rules file disagrees, it wins.Step 5 has to come before step 6: a reply that describes a fix still sitting on my machine points the reviewer at something they can't see.
Worth adding later:
- a blast-radius check: for renames, moves and API changes, find and update every usage;
- lint, typecheck and tests after the fixes, before the commit;
- a warning when a comment points at a line that no longer matches, which usually means a stale branch;
- walking nested replies up to the thread root, and paging through PRs with many comments;
- a closing list of what the comments asked for but this PR won't do, such as out-of-scope requests or topics for the team, so they don't get lost when the threads are resolved;
- disable-model-invocation: true in Claude Code, so it runs only when you call it.
Pros and cons of this setup
| Works well | Costs something |
|---|---|
| The team's conventions live in skills and rules files that go through review, instead of in many people's heads | Somebody has to maintain those files, and a stale skill is worse than none |
| Commit and PR format stop being a per-person preference | Repo-level skills are a shared decision, so changing one is a small negotiation |
| Nothing outward-facing happens without an explicit yes | You confirm things, which is slower than pure autopilot |
| /code-review can catch contract-level breakage across libraries because it checks the callers of changed APIs, which a thin test suite will not | It still misses things, and passing tests plus a clean review is not proof of correctness |
| A minimal skill fits on one screen, so anyone on the team can read and change it | Every feature you add (tickets, scope tables, tool lists) is one more thing to keep in sync with the repo |
| New people get the bar on day one | A vague skill produces confident nonsense, so the writing quality of SKILL.md limits the quality of everything it produces |
The failure mode I hit most often is my own: the repo moves on, and a skill's "Conventions" section slowly drifts away from what the team does. Fixing that is cheap, though, and "Making the skills your own" below shows how.
When a skill gets it wrong
Demos show the happy path. These are the situations I actually run into more often.
"I don't like this commit message"
The proposal comes back as refactor(task): copy the array before reversing it. It's a fix, not a refactor: the list was showing a stale order. I say no and tell it what's wrong, and it drafts again: fix(task): stop the task list from showing a stale order. It doesn't argue for its first version or explain why it chose refactor. It just asks again.
The minimal version stages everything by default, so it doesn't split a change on its own. If a change is really two things, I just ask for two commits, and the agent stages and commits each part separately. The steps in the skill are only a default.
"The description is technically true and completely misses the point"
Here the approval step pays off. The title and body get shown in chat before the PR exists, so a description that describes the mechanics instead of the intent costs me one message, not a notification to five people plus a CI run.
Usually the missing piece is the why. The diff doesn't contain it, and a ticket often has little more than a title. Then I paste the reason from a chat thread, and it rewrites the description and shows it again.
"This review comment contradicts our own rules"
It doesn't happen often, but it's the case I care about most. If a comment contradicts our rules, the skill doesn't silently comply and doesn't silently ignore it either. It tells me about the conflict before changing anything, follows the documented standard unless I say otherwise, and explains why in its reply on the thread. I can still override it. For example, our rule is that UI components in libs/task/ui are typed with the domain model, never a DTO. If a reviewer asks to pass the API DTO straight into a component, the skill flags the conflict and keeps the domain type.
Where to start if you set this up today
Write the first skill for the task you do most often and like least. For most people that's the commit message. Start from its minimal version and adapt it as described below. Put every outward-facing step behind a confirmation. Once it works well on your real changes, add the next skill.
Making the skills your own
The minimal versions work as they are, but they pay off once they fit your repo. Three things help:
- Start with the "Conventions" section. Put in your own commit types and scopes, your target branch and your severity levels. Facts about the repo itself, such as the folder layout or build commands, go in CLAUDE.md, which every skill already defers to.
- Turn repeated corrections into rules. If you keep telling the agent the same thing, it belongs in the skill. After the refactor vs fix exchange above, the line to add would be: a change that fixes visible behavior is fix, even when the code looks like a refactor. At the end of a session you can ask the agent to make the edit, and you read the diff before committing it.
- Add one thing at a time and test it. Treat the "Worth adding later" lists as a menu for when a real problem shows up. Run the old and the new version on two or three real branches before you merge, and remove rules that no longer apply. A skill change goes through review like any other file, because it changes everyone's results at once.
How this setup has worked for me so far
The skill I use most is /git-commit. It's the simplest of the four and it gives me the most. It saves me a lot of time, and the history stays clean: every commit follows Conventional Commits and the name fits what actually changed.
This isn't our real log, but it shows the shape: small commits, one clear type and scope each.
a3f91c2 feat(task): add a sort order toggle to the task list
5e27d14 feat(task-list): show an empty state when no task matches the filter
7d0e4b8 fix(task-list): tear down the route params subscription
b09c3e6 feat(task-ui): add a due date badge to TaskCard
4b9c7aa chore(deps): update Nx to the latest minorPart of that is on me. It works best with small commits, so I make more of them. The same goes for PRs: one feature or one bug per PR. At that size the AI handles review and fixing very well. It's the same for a person: the more changes in a PR, the harder it is to look at. The time the skills save is nice, but the bigger win for me is staying in control of the code and getting the same result every time, even on a day when I'm tired.
What carries over to an agent other than Claude Code
Not everything above is portable. If someone on the team runs a different agent, this is what carries over:
| Part of the setup | Carries over? | What to check |
|---|---|---|
| SKILL.md with name and description | yes, it is the standard | which folder the agent reads |
| steps and conventions | yes, it is plain Markdown | nothing |
| allowed-tools | partly, the field is experimental in the standard | the agent's syntax and whether it honors the list |
| confirmation forms (AskUserQuestion, a Claude Code tool that shows clickable options instead of a plain question) | no, it is a Claude Code tool | the skill has to ask in plain chat instead |
| disallowed-tools, paths, when_to_use, disable-model-invocation | no, these are Claude Code fields | the agent's own settings for the same thing |
| PR access through an MCP server (the plug-in protocol agents use to talk to GitHub and other tools) or a CLI such as gh or glab | depends on the agent | that the agent has one of them set up |