Skip to main content
The detail rules command group lets you create, list, inspect, and download custom analysis rules for your repositories. Rules teach Detail what patterns to look for in future scans — you can generate them from a plain language description, from existing bug IDs, or from commit SHAs that contain the pattern you want to catch.

detail rules create [REPO]

Submit a rule creation request for a repository. Rule creation is asynchronous — Detail processes your input and builds the rule in the background.
detail rules create [OPTIONS] [REPO]
Arguments
ArgumentDescription
REPORepository as owner/repo, bare repo name, or omitted to infer from the origin git remote.
Flags
FlagDescription
--description <TEXT>Plain language description of the pattern to detect.
--bug-ids <IDS>Bug IDs to learn from. Comma-separated or repeat the flag.
--commit-shas <SHAS>Commit SHAs to examine for patterns. Comma-separated or repeat the flag.
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
# Create a rule from a plain language description
detail rules create --description "Flag any console.log in production code"

# Create a rule from existing bug findings
detail rules create --bug-ids bug_abc123,bug_def456

# Combine a description with commit SHAs
detail rules create --commit-shas abc1234,def5678 --description "SQL injection pattern"

# Target a specific repository explicitly
detail rules create owner/my-repo --description "Detect unvalidated redirects"

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.
detail rules propose [REPO]
Arguments
ArgumentDescription
REPORepository as owner/repo, bare repo name, or omitted to infer from the origin git remote.
On success, the command prints a rule creation request ID. Poll progress with detail rules requests show. Examples
# Propose rules for the repo inferred from git remote
detail rules propose

# Propose rules for an explicit repo
detail rules propose owner/my-repo

detail rules requests list [REPO]

List all rule creation requests for a repository and their current status.
detail rules requests list [OPTIONS] [REPO]
Arguments
ArgumentDescription
REPORepository as owner/repo, bare repo name, or omitted to infer from the origin git remote.
Flags
FlagDescriptionDefault
--format <FORMAT>Output format: table or json.table
Examples
detail rules requests list
detail rules requests list owner/my-repo --format json

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.
detail rules requests show <REQUEST_ID>
Arguments
ArgumentDescription
REQUEST_IDRule creation request ID in rcr_... format.
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
detail rules requests show rcr_abc123
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.
detail rules list [OPTIONS] [REPO]
Arguments
ArgumentDescription
REPORepository as owner/repo, bare repo name, or omitted to infer from the origin git remote.
Flags
FlagDescriptionDefault
--format <FORMAT>Output format: table or json.table
Examples
detail rules list
detail rules list owner/my-repo --format json

detail rules show <RULE_ID>

Show a rule’s name, metadata, and full generated content.
detail rules show <RULE_ID>
Arguments
ArgumentDescription
RULE_IDRule ID in rule_... format.
Examples
detail rules show rule_abc123

detail rules pull <RULE_ID>

Download a rule’s generated files to your local filesystem so you can use them as Claude Code skills.
detail rules pull [OPTIONS] <RULE_ID>
Arguments
ArgumentDescription
RULE_IDRule ID in rule_... format.
Flags
FlagDescriptionDefault
--output <DIR>Directory to write the detail-rules/ folder into. Accepts a relative or absolute path..claude/skills/
The command writes all rule files into a detail-rules/ subdirectory inside the output directory, creating any missing parent directories automatically. Examples
# Pull a rule into the default Claude skills location
detail rules pull rule_abc123

# Pull a rule into a custom directory
detail rules pull rule_abc123 --output ./my-rules/
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.