Video Walkthrough
What You Get
| Slash Command | Description |
|---|---|
/codeant:resolve-pr-comments | Fetch unresolved CodeAnt review comments on a PR and fix them |
/codeant:resolve-quality-gates | Parse the CodeAnt CI/CD Quality Gate comment on a PR and fix the SAST, Secrets, and Duplicate Code findings |
/codeant:review-local | Run a CodeAnt code review on local changes and fix all issues |
/codeant:implement-repo-learnings | Learn team review patterns from PR history and generate custom rules in .codeant/review.json |
Prerequisites
- Claude Code v2.0.73 or later — plugin support requires this minimum version (installation guide)
- CodeAnt CLI installed and authenticated — follow the CLI setup guide
Installation
Install the CodeAnt plugin from inside Claude Code:- Run
/pluginand select Manage plugins - Choose Add plugin and enter the plugin registry URL:
- Go to Install plugin, search for CodeAnt, and install it
- Restart Claude Code for the plugin to take effect
Usage
/codeant:resolve-pr-comments — Resolve PR Review Comments
Fetch all unresolved CodeAnt AI review comments on a pull request and fix them.
With a PR number:
- Get your current branch name
- Run
codeant pr list --source-branch "<branch>" --state opento find the matching PR - If multiple PRs match, ask you which one to use
- Fetch comments — runs
codeant pr comments --pr-number <N> --codeant-generated trueand filters to unresolved comments - Categorize — separates inline code comments (actionable) from general PR-level comments (informational, skipped)
- Analyze and assign verdicts — for each inline comment:
- Reads the file with 30 lines of surrounding context
- Checks the code at the referenced line still matches what the comment describes
- Extracts code suggestions from the comment body
- Validates syntax, variable scope, imports, and that existing logic is not broken
- Assigns a verdict: ACCEPT, LIKELY ACCEPT, DO NOT ACCEPT, or STALE
- Present summary — shows all comments grouped by verdict with before/after code diffs
- Apply safe fixes — applies ACCEPT fixes, asks about LIKELY ACCEPT, skips DO NOT ACCEPT and STALE
- Resolve threads — marks applied comments as resolved on the PR via
codeant pr resolve(supports GitHub, GitLab, Bitbucket, and Azure DevOps) - Offer to commit — lists changed files and offers to commit and push
/codeant:resolve-quality-gates — Fix CI/CD Quality Gate Failures
Locate the CodeAnt Quality Gate comment posted by CI on the current branch’s PR and fix the listed findings.
With a PR number:
- Get your current branch name
- Run
codeant pr list --source-branch "<branch>" --state opento find the matching PR - If multiple PRs match, ask you which one to use
- Locate the comment — runs
codeant pr comments --pr-number <N> --codeant-generated trueand picks the most recent one whose body starts withCodeAnt Quality Gate Results - Parse failures — extracts the list of failed gates from the summary table and the per-finding rows from the
View Failure Resultblock (SAST, Secrets, Duplicate Code) - Analyze and assign verdicts — for each finding:
- Reads the file at the indicated line with 30 lines of context
- Drafts a minimal fix (the comment contains no inline suggestion — the skill designs the fix from the rule / type / window)
- Validates syntax, scope, error handling, and that existing behavior is preserved
- Assigns a verdict: ACCEPT, LIKELY ACCEPT, DO NOT ACCEPT, or STALE
- Present summary — groups findings by verdict and gate type, shows before/after diffs
- Apply safe fixes — ACCEPT automatically, LIKELY ACCEPT with confirmation, skip the rest
- Offer to commit — pushing the fix commit re-triggers CI, which updates the quality gate comment
| Gate | Row-level details in the comment? | What the skill does |
|---|---|---|
| SAST | Yes — Severity, File, Line, Rule, Message | Parses and drafts fixes |
| Secrets | Yes — File, Line, Type, Confidence | Replaces literal with env var; reminds you to rotate |
| Duplicate Code | Yes — file ↔ file groups | Usually DO NOT ACCEPT unless extraction is tiny and obvious |
| SCA (Dependencies) | No — only aggregated counts | Offers to run codeant security-analysis --uncommitted |
| IAC | No — only aggregated counts | Points to the dashboard’s View Full Results link |
/codeant:review-local — Review and Fix Local Changes
Run a CodeAnt AI code review on your local changes and fix all issues found.
| You say | Flag used |
|---|---|
| ”staged” | --staged |
| ”uncommitted” / nothing specific | --uncommitted (default) |
| “last commit” | --last-commit |
| ”last 3 commits” | --last-n-commits 3 |
| ”unpushed” / “committed” | --committed |
| a branch name | --base <branch> |
| a commit hash | --base-commit <hash> |
| ”everything” / “all” | --all |
- Run review — executes
codeant review <scope-flag> - Present findings — shows issues grouped by file with category labels (Security, Code Quality, Performance, Maintainability)
- Analyze and assign verdicts — classifies each issue as ACCEPT, LIKELY ACCEPT, DO NOT ACCEPT, or STALE
- Apply safe fixes — minimal changes only, skips anything that could break existing logic
- Verify — re-runs the review to confirm fixes are clean
- Report — initial findings, fixes applied, fixes skipped (and why), and verification results
/codeant:implement-repo-learnings — Generate Custom Review Rules
Analyze your team’s PR review history to generate custom CodeAnt review rules.
- Fetch PR history — retrieves the last 100 merged PRs
- Extract human feedback — fetches review comments, filters out bots and non-actionable replies
- Analyze bug-fix commits — mines git history for recurring fix patterns
- Read project guidelines — extracts conventions from
.cursorrules,CLAUDE.md,CONTRIBUTING.md, etc. - Cluster patterns — groups feedback into rule candidates with confidence levels (HIGH/MEDIUM)
- Interactive confirmation — presents each rule with evidence for your approval
- Write rules — generates
.codeant/review.jsonwith your approved rules
.codeant/review.json — nothing is overwritten without confirmation.
Verdict System
All fix workflows use a verdict system to classify each suggestion before applying:| Verdict | Meaning | Action |
|---|---|---|
| ACCEPT | Safe to apply — fix is correct, localized, and won’t break anything | Applied automatically |
| LIKELY ACCEPT | Probably correct, but may affect callers or tests | Applied only with user confirmation |
| DO NOT ACCEPT | Could break logic — changes signatures, removes error handling, or over-refactors | Skipped with explanation |
| STALE | Code has changed since the review — comment no longer applies | Skipped with explanation |
Example Workflows
Resolve PR Comments
Review → Fix → Ship
Updating the Plugin
To get the latest skills:Troubleshooting
“codeant: command not found” Ensure the CLI is installed globally:/reload-plugins to refresh without restarting Claude Code.