Course contents
Pairing rules and skills: why presets install both
On this page
Two halves, two jobs
A rule and a skill for the same stack shouldn't say the same thing twice. They answer different questions:
| Rule (standards) | Skill | |
|---|---|---|
| Question it answers | "How should code look here?" | "How do I do this job?" |
| When it's active | While the agent edits matching files | When the job is requested |
| Shape | Conventions, versions, never-generate list, one example | Numbered steps, checks, an output format, a stop condition |
| Example | "Server Actions check the session before any write." | "Review each write: is the session checked first? Is the tenant from the session? Report a high finding if not." |
The rule prevents mistakes during normal work. The skill catches the ones that got through, using a structured checklist and a consistent report.
Why not just one?
Only a rule: the agent writes better code, but a review is improvised. You get a different format every time, and the long checklist you'd need would load on every edit.
Only a skill: the agent may never open it. Vercel measured a skill going unused in 56% of runs. During ordinary coding there's often no moment where the agent decides "I should check the skill first".
Both: the conventions are always present where they matter, and the procedure is there when you need depth. That's why npx presets-dev add <stack> installs both by default.
Keep the overlap small
It's easy for a skill to end up restating most of its rule. That wastes tokens when both load, and the two copies drift apart over time. A good split:
- The rule owns the facts. Versions, conventions, the never-generate list.
- The skill owns the procedure. It refers to the facts ("check each write against the session rule") instead of restating them, and adds what a rule shouldn't hold: order of steps, severity levels, output format, when to stop.
- The skill keeps a short fallback. Because a skill might run in a project without the rule installed, keep the handful of checks it can't work without, as one-liners.
Connect them with a pointer
Add one line to the always-on layer that tells the agent the skill exists and when to use it:
- For a Next.js code review or pre-merge check, use the `nextjs-code-review` skill. Explore the changed files first.
That line costs a few tokens and is the most reliable way to make a skill run when it should. Vercel's evals found that "explore first, then use the skill" works better than "you must use the skill first".
When to install only one half
The presets CLI lets you choose:
npx presets-dev add supabase --only standardsnpx presets-dev add supabase --only skillInstall only standards when:
- You already have a review process and just want the agent to write code the right way.
- You're tight on always-on budget and the tool doesn't support globs (Codex).
Install only the skill when:
- Your team already has its own rules for the stack and you want the review or audit procedure.
- You want an on-demand check in a repo where the stack is a small part, like one Supabase function in a large app.
Community presets can be one half
Only the 30 official stacks are guaranteed to have both halves. A community contribution can be just a rule or just a skill; the frontmatter type says which. If a stack has only one half today, install what exists. See Contribute a preset.
Common mistakes
- Copying the rule into the skill. Point to it instead and keep only a short fallback.
- A skill without a pointer. Without one line in the always-on layer, it may never run.
- A rule that tries to be a procedure. If it has numbered steps and an output format, it's a skill.
Recap
- Rules own conventions and facts; skills own procedures and output.
- Install both by default; the rule prevents, the skill checks.
- Keep overlap small, and connect them with a one-line pointer.
- Use
--only standardsor--only skillwhen you need just one half.
Next step
Scale it to a team: Multi-tool repos.