How rules work
Detail rules are enforced via an agent skill that’s stored in your repository, so you can use it flexibly: as a CI check, or to find existing violations and fix them in bulk. Rules work alongside Detail’s built-in bug scanning, so you can turn an individual bug into a guardrail that prevents the whole category of bug from happening. Rule creation is asynchronous and can take about an hour. Detail tests out the rule against your codebase and iterates on it until the results look correct.Creating rules from the CLI
You can create a rule from three kinds of input, or combine them in a single request:Proposing rules automatically
If you’re not sure where to start, let Detail analyze your bug history and propose rules for you:Checking rule creation status
Rule creation runs asynchronously. Use therequests subcommands to track progress:
Viewing and using rules
Once rules are created, you can inspect and manage them with the following commands:detail rules pull writes the rule files into .claude/skills/detail-rules/ in your current directory by default. You can specify a different output directory with --output:
Claude Code Skills integration
Rules pulled withdetail rules pull are written as Claude Code skill files. This means the same patterns Detail uses in your cloud scans can guide your AI coding assistant when writing new code locally — closing the loop between detection and prevention.
Rule creation is asynchronous. After running
detail rules create or detail rules propose, you receive a request ID (rcr_...). Poll progress with detail rules requests show <rcr_id> and retrieve the finished rule with detail rules show <rule_id> once the request completes.
