Why a skill
Your team may already keep its security rules as an agent skill, for coding assistants. A custom agent can follow the same skill in code review: it opens the skill when the change needs it, reads its reference files, and quotes the rule each finding applies. When the skill changes on the main branch, the agent follows the new version with no settings change. The example is a multi-tenant scheduling API where every query must be scoped to the caller’s workspace.Step 1 — The skill in the repository
.claude/skills/tenant-isolation/SKILL.md
.claude/skills/tenant-isolation/references/tenant-tables.md
name must match, and description is required.
Step 2 — Import it as an agent
1
Open the repository's settings
Pick the repository in the scope picker, then What to review → Custom agents → New agent.
2
Import from repository
The tab lists the skills found on the default branch. Click tenant-isolation.
3
Check the result
The agent is created off, named Tenant isolation reviewer, with the skill linked and these instructions:
Step 3 — Sharpen the instructions
Keep the skill reference and add what proof a finding needs:Instructions
Step 4 — Optional: a plugin
If your issue tracker is installed as a plugin, turn it on under Tools → Plugins. Only read tools are offered. When a pull request description links a ticket, the agent can read it and check the change against what it asks.Step 5 — Comments
Click Save.
Step 6 — Try it
Run Try it on a pull request that adds an endpoint. Check:- Skills opened lists
.claude/skills/tenant-isolation, andreferences/tenant-tables.mdwhen the agent needed it. - Kept findings quote a rule from the skill:
- Dropped findings show their reason. A general security remark the skill doesn’t cover is dropped as outside the agent’s focus, which is what you want here.
@kody -v tenant-isolation-reviewer.
Checklist
-
SKILL.mdhasnamematching its folder and adescription - Reference files sit one folder below the skill at most
- Instructions say what proof a finding needs
- Minimum severity matches how loud the agent should be
- Tried on a pull request with a known gap