Rules
Rules are coding standards and guidelines that the client applies based on file type or path. Unlike skills, rules do not wait to be triggered — they're always on when their scope matches.
When to use a rule
Directory layout
---
name: testing
description: >-
Enforce testing best practices: load the test-writer skill, use pytest with
database reuse, leverage fixtures and factories, and mock external calls
with vcrpy.
globs: "**/*.py"
---
# Testing rules
- Use pytest with `--reuse-db` unless migrations changed.
- Prefer factories (`factory_boy`) over ad-hoc dict fixtures.
- Mock HTTP calls with `vcrpy`; commit cassettes alongside tests.
- Load the `test-writer` skill when writing new tests.Rules vs skills
Skill
Rule
Creating a rule
Client compatibility
Discovered rules
Last updated
Was this helpful?