What You Get
A Cursor rule that teaches the AI agent how to use the CodeAnt CLI. Once installed, you can ask Cursor to:- Fetch unresolved PR review comments and fix them automatically
- Review your local code changes and fix all issues found
Prerequisites
- Cursor installed (download)
- CodeAnt CLI installed and authenticated — follow the CLI setup guide
Installation
Option 1: Clone from Skills Repo (Recommended)
Option 2: Create Manually
Create.cursor/rules/codeant.mdc — see the full rule content in the skills repository.
Usage
Resolve PR Review Comments
The most powerful workflow — fetch all unresolved CodeAnt review comments on a PR and fix them:- Run
codeant pr list --source-branch "<branch>" --state opento find the PR (if no number given) - Run
codeant pr comments --pr-number <N> --codeant-generated trueto fetch comments - Filter to unresolved comments (
resolved: false) - For each inline comment:
- Read the file at the referenced line with surrounding context
- Check the code still matches what the comment describes
- Extract any code suggestion from the comment body
- Validate the suggestion is safe (syntax, scope, no logic breakage)
- Apply only if safe — skip and explain if not
- Flag PR-level comments as needing manual review
Review and Fix Local Changes
Review your local changes and fix all issues found:- Run
codeant reviewwith the appropriate scope flag (--uncommitted,--staged,--last-commit,--base <branch>, etc.) - Parse the findings (each issue has
issue_content,relevant_file,start_line,label) - For each issue, read the file with surrounding context
- Validate each fix won’t break existing logic before applying
- Re-run the review to verify all fixes are clean
Example Workflows
Resolve PR Comments
Review → Fix → Ship
How It Works
The.cursor/rules/codeant.mdc file is a Cursor Rule that is automatically loaded into every AI conversation in your project. It teaches the Cursor agent the two core workflows (resolve PR comments and review local changes), the exact CLI commands and their output formats, and the validation-first approach to applying fixes safely.
The rule has alwaysApply: true, so the agent always knows about CodeAnt — you don’t need to explicitly reference it.
Troubleshooting
“codeant: command not found” Ensure the CLI is installed globally and accessible from Cursor’s terminal:- Verify
.cursor/rules/codeant.mdcexists and hasalwaysApply: truein frontmatter - Restart Cursor after adding the rule
- Be explicit: “Use CodeAnt to review my changes”