Interactively create a new Detail rule for a repository — gather context, submit the creation request, wait for completion, review the results, and pull them locally. Use when asked to "create a rule", "add a rule", "propose rules", "create/propose a Detail rule", or similar.
72
89%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Guide the user through creating one or more new rules for their repository.
The Detail CLI infers the repository from the git or jj remote; if the user specifies a different repo, pass it explicitly to the CLI commands.
The Detail CLI must be installed. If it is not available, install it with:
curl --proto '=https' --tlsv1.2 -LsSf https://cli.detail.dev | shThe user must be authenticated. Assume that the user is authed and run commands directly. If a command fails with an authentication error, run detail auth login and guide the user through the process.
Ask the user what they want to do:
bug_...) or commit SHAs that illustrate the pattern.For a specific rule, build the command from whatever context the user provided. At least one of --description, --bug-ids, or --commit-shas is required:
detail rules create [--description "<description>"] [--bug-ids <id1,id2>] [--commit-shas <sha1,sha2>]For AI-proposed rules:
detail rules proposeBoth commands return a request ID (rcr_...). Save it — you will need it to poll for status.
Rule creation can take anywhere from a few minutes to roughly an hour. Poll the request status every 60 seconds until it is no longer pending:
detail rules requests show <request_id>After each poll, show the user the current status. Keep polling until the status is completed or failed. If it fails, report the error to the user and stop.
Once completed, the request output lists all rule IDs that were created. Show each one to the user:
detail rules show <rule_id>Walk the user through each rule's name and content. Ask if they're satisfied or if they'd like to submit another request with additional context.
Ask the user if they want to write the rule files to the repository. If yes, pull every rule that was created:
detail rules pull <rule_id>Repeat for each rule ID. This writes files into .claude/skills/detail-rules/ by default. Use --output <dir> if the user wants a different location.
Once all rules are pulled, confirm the files written and suggest committing them.
5e8ba56
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.