Skip to main content
The detail rules command group lets you create, list, inspect, and download custom analysis rules for your repositories. Rules can be used to enforce codebase guardrails. You can generate a rule from a plain language description, from an existing bug, or from commit SHAs that contain an example bug. An example use case would be: Detail has found a location where your application logs raw secrets, and you want to find any other bugs of this type, fix them all, and prevent them going forward.

detail rules create [REPO]

Submit a rule creation request for a repository. Rule creation takes time; Detail builds your rule in the background and iterates on it based on what it finds in your codebase until the new rule is working well.
Arguments Flags
At least one of --description, --bug-ids, or --commit-shas is required. You can combine them — for example, provide both a description and bug IDs to give Detail richer context.
On success, the command prints a rule creation request ID (rcr_...). Use detail rules requests show <rcr_id> to poll for completion. Examples

detail rules propose [REPO]

Ask Detail to automatically propose rules based on the repository’s existing bug history. Detail reviews your findings and suggests rules that would catch similar patterns in future scans.
Arguments On success, the command prints a rule creation request ID. Poll progress with detail rules requests show. Examples

detail rules requests list [REPO]

List all rule creation requests for a repository and their current status.
Arguments Flags Examples

detail rules requests show <RCR_ID>

Show the status and details of a specific rule creation request. Poll this command until the status is complete or failed.
Arguments The output includes the request status, creation time, completion time (when available), the inputs you provided, and the IDs of any rules that were created. Examples
If the status is still pending, wait a moment and run the command again. Rule creation typically completes within a few minutes.

detail rules list [REPO]

List all completed rules for a repository.
Arguments Flags Examples

detail rules show <RULE_ID>

Show a rule’s name, metadata, and full generated content.
Arguments Examples

detail rules pull <RULE_ID>

Download a rule’s generated files to your local filesystem so you can use them as Claude Code skills.
Arguments Flags The command writes all rule files into a detail-rules/ subdirectory inside the output directory, creating any missing parent directories automatically. Examples
Pulled rules are stored under .claude/skills/detail-rules/ by default and work as Claude Code skills. Commit this directory to your repository so the whole team benefits from the same rules.