Skip to main content
Integrate CodeAnt AI directly into Claude Code to resolve PR review comments, review local changes, and generate custom review rules — all without leaving your terminal.

Video Walkthrough

What You Get

Slash CommandDescription
/codeant:resolve-pr-commentsFetch unresolved CodeAnt review comments on a PR and fix them
/codeant:resolve-quality-gatesParse the CodeAnt CI/CD Quality Gate comment on a PR and fix the SAST, Secrets, and Duplicate Code findings
/codeant:review-localRun a CodeAnt code review on local changes and fix all issues
/codeant:implement-repo-learningsLearn team review patterns from PR history and generate custom rules in .codeant/review.json

Prerequisites

  1. Claude Code v2.0.73 or later — plugin support requires this minimum version (installation guide)
  2. CodeAnt CLI installed and authenticated — follow the CLI setup guide

Installation

Install the CodeAnt plugin from inside Claude Code:
  1. Run /plugin and select Manage plugins
  2. Choose Add plugin and enter the plugin registry URL:
    https://github.com/CodeAnt-AI/skills
    
  3. Go to Install plugin, search for CodeAnt, and install it
  4. 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:
> /codeant:resolve-pr-comments 42
Auto-detect from current branch:
> /codeant:resolve-pr-comments
When auto-detecting, Claude Code will:
  1. Get your current branch name
  2. Run codeant pr list --source-branch "<branch>" --state open to find the matching PR
  3. If multiple PRs match, ask you which one to use
The fix flow:
  1. Fetch comments — runs codeant pr comments --pr-number <N> --codeant-generated true and filters to unresolved comments
  2. Categorize — separates inline code comments (actionable) from general PR-level comments (informational, skipped)
  3. 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
  4. Present summary — shows all comments grouped by verdict with before/after code diffs
  5. Apply safe fixes — applies ACCEPT fixes, asks about LIKELY ACCEPT, skips DO NOT ACCEPT and STALE
  6. Resolve threads — marks applied comments as resolved on the PR via codeant pr resolve (supports GitHub, GitLab, Bitbucket, and Azure DevOps)
  7. Offer to commit — lists changed files and offers to commit and push
Changes are not committed automatically — you review the diffs and decide.

/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:
> /codeant:resolve-quality-gates 42
Auto-detect from current branch:
> /codeant:resolve-quality-gates
When auto-detecting, Claude Code will:
  1. Get your current branch name
  2. Run codeant pr list --source-branch "<branch>" --state open to find the matching PR
  3. If multiple PRs match, ask you which one to use
The fix flow:
  1. Locate the comment — runs codeant pr comments --pr-number <N> --codeant-generated true and picks the most recent one whose body starts with CodeAnt Quality Gate Results
  2. Parse failures — extracts the list of failed gates from the summary table and the per-finding rows from the View Failure Result block (SAST, Secrets, Duplicate Code)
  3. 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
  4. Present summary — groups findings by verdict and gate type, shows before/after diffs
  5. Apply safe fixes — ACCEPT automatically, LIKELY ACCEPT with confirmation, skip the rest
  6. Offer to commit — pushing the fix commit re-triggers CI, which updates the quality gate comment
Coverage by gate:
GateRow-level details in the comment?What the skill does
SASTYes — Severity, File, Line, Rule, MessageParses and drafts fixes
SecretsYes — File, Line, Type, ConfidenceReplaces literal with env var; reminds you to rotate
Duplicate CodeYes — file ↔ file groupsUsually DO NOT ACCEPT unless extraction is tiny and obvious
SCA (Dependencies)No — only aggregated countsOffers to run codeant security-analysis --uncommitted
IACNo — only aggregated countsPoints to the dashboard’s View Full Results link
Changes are not committed automatically — you review the diffs and decide.

/codeant:review-local — Review and Fix Local Changes

Run a CodeAnt AI code review on your local changes and fix all issues found.
> /codeant:review-local
You can specify the review scope:
> /codeant:review-local staged files only
> /codeant:review-local last commit
> /codeant:review-local against the develop branch
The skill selects the right flag based on your request:
You sayFlag 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
The fix flow:
  1. Run review — executes codeant review <scope-flag>
  2. Present findings — shows issues grouped by file with category labels (Security, Code Quality, Performance, Maintainability)
  3. Analyze and assign verdicts — classifies each issue as ACCEPT, LIKELY ACCEPT, DO NOT ACCEPT, or STALE
  4. Apply safe fixes — minimal changes only, skips anything that could break existing logic
  5. Verify — re-runs the review to confirm fixes are clean
  6. Report — initial findings, fixes applied, fixes skipped (and why), and verification results
Changes are not committed automatically — you review the diffs and commit when ready.

/codeant:implement-repo-learnings — Generate Custom Review Rules

Analyze your team’s PR review history to generate custom CodeAnt review rules.
> /codeant:implement-repo-learnings
The workflow:
  1. Fetch PR history — retrieves the last 100 merged PRs
  2. Extract human feedback — fetches review comments, filters out bots and non-actionable replies
  3. Analyze bug-fix commits — mines git history for recurring fix patterns
  4. Read project guidelines — extracts conventions from .cursorrules, CLAUDE.md, CONTRIBUTING.md, etc.
  5. Cluster patterns — groups feedback into rule candidates with confidence levels (HIGH/MEDIUM)
  6. Interactive confirmation — presents each rule with evidence for your approval
  7. Write rules — generates .codeant/review.json with your approved rules
Rules are merged with any existing .codeant/review.json — nothing is overwritten without confirmation.

Verdict System

All fix workflows use a verdict system to classify each suggestion before applying:
VerdictMeaningAction
ACCEPTSafe to apply — fix is correct, localized, and won’t break anythingApplied automatically
LIKELY ACCEPTProbably correct, but may affect callers or testsApplied only with user confirmation
DO NOT ACCEPTCould break logic — changes signatures, removes error handling, or over-refactorsSkipped with explanation
STALECode has changed since the review — comment no longer appliesSkipped with explanation

Example Workflows

Resolve PR Comments

> /codeant:resolve-pr-comments

Found PR #42: "Add payment processing" (feature/payments → main)

6 unresolved CodeAnt comments:

ACCEPT — Safe to apply (3):
  src/auth.ts:34 — SQL injection in login query
    Fix: parameterize the query → safe, no API change
  src/auth.ts:78 — Missing rate limiting
    Fix: add rate limiting middleware → safe, additive only
  src/api/users.ts:45 — Magic number should be a constant
    Fix: extract to named constant → safe, no behavior change

LIKELY ACCEPT — Verify callers (1):
  src/api/users.ts:12 — Unvalidated input
    Fix: add validation → callers may depend on permissive behavior

DO NOT ACCEPT (0)
STALE (0)

I will apply the 3 ACCEPT fixes now. Want me to also apply
the LIKELY ACCEPT fix, or skip it for now?

> apply all

✓ Applied src/auth.ts:34 — parameterized the SQL query
✓ Applied src/auth.ts:78 — added rate limiting middleware
✓ Applied src/api/users.ts:45 — extracted magic number to constant
✓ Applied src/api/users.ts:12 — added input validation

Resolving applied comments on PR...
✓ 4 comments resolved

Changes ready for review. Would you like me to commit and push?

Review → Fix → Ship

> Implement the user authentication endpoint

(Claude implements the feature)

> /codeant:review-local

Found 3 issues:
  Security: Missing input sanitization (src/auth.ts:15)   — ACCEPT
  Code Quality: Unused variable (src/auth.ts:8)            — ACCEPT
  Code Quality: Missing error handling (src/auth.ts:42)    — ACCEPT

All 3 fixes applied. Verification passed — no remaining issues.

> git add -A && git commit -m "Add auth endpoint"

Updating the Plugin

To get the latest skills:
/plugin marketplace update CodeAnt-AI/skills

Troubleshooting

“codeant: command not found” Ensure the CLI is installed globally:
npm install -g codeant-cli
codeant --version
“Not authenticated” or “Could not detect remote”
codeant login                           # CodeAnt API auth
codeant set-token github <your-token>   # SCM auth for PR features
“Could not detect repo name” Ensure you’re in a git repository with a remote:
git remote get-url origin
Plugin not appearing after install Run /reload-plugins to refresh without restarting Claude Code.