- Home
- Skills
- Code Quality & Review
- Risk Annotator for AI Code Changes
Works with the AI Agents you already use
Risk Annotator for AI Code Changes
Shows your AI agent which lines of a git diff are riskiest, so you review sensitive paths, deleted tests and untested code first.
Free
Risk Annotator for AI Code Changes
Example session with this skill installed
Check the risk level of my current changes against the main branch and check the coverage report in ./reports/lcov.info.
- Read your context and instructions
- Compiled the risk annotator
I have analyzed the diff between your current branch and main using the local coverage report. The analysis identified 4 risky hunks that require your attention before merging.
Risk Annotation Report
| Range | Level | Reason | Evidence Source |
|---|---|---|---|
src/auth/service.ts:L42-58 | HIGH | Sensitive path heuristic (Auth/Crypto) | Path Heuristic (E) |
tests/user_test.ts:L110-115 | HIGH | Removed test lines | Path Heuristic (F) |
src/utils/parser.ts:L204-220 | MED | Changed lines in file with 0% coverage | Coverage Report (B) |
package.json:L12-13 | MED | New direct dependency detected | Dependency Manifest (D) |
Next steps
- Review
src/auth/service.tsto ensure the logic changes don't bypass existing security controls. - Verify if the deleted lines in
tests/user_test.tswere redundant or if they decrease your total test surface. - Add unit tests for the new logic in
src/utils/parser.tsto clear the MED risk flag.
Connects securely to your tools. The creator never sees your data.
About this skill
Large diffs and agent-generated code often hide critical regressions or security lapses. This skill provides an automated, local risk assessment of your git diffs before you commit or merge. It flags sensitive file paths, deleted tests, and zero-coverage hunks so you can focus your review where it matters most.
What it does
- Risk classification Categorizes hunks into HIGH, MED, or LOW risk levels based on deterministic heuristics.
- Sensitive path detection Flags changes to auth, crypto, secrets, keys, and database migrations.
- Coverage integration Cross-references diffs with LCOV or JSON coverage reports to highlight changes in untested code.
- Historical analysis Identifies files involved in recent hotfixes or incidents using git logs.
- Test integrity checks Specifically alerts when test lines are removed from the codebase.
- Dependency monitoring Detects new direct dependencies and manifest-lockfile drift.
How it works
- Analyze diff The agent runs
risk-annotateagainst your current branch, a specific commit range, or a PR base. - Scan heuristics The tool checks git history, coverage files, and path patterns locally.
- Generate report You receive a line-by-line annotation of risky hunks including the reason and evidence source.
- Targeted review Use the high-risk flags to jump directly to the most dangerous parts of the code.
Frameworks & tools
This tool requires Node.js 20+ and Git. It works with standard coverage formats including lcov.info and coverage-final.json. It runs via npx for zero-install operation.
Why this beats prompting it yourself
Generic prompts often miss subtle risks like missing coverage or historical bug density. This skill uses a deterministic CLI that verifies local file metadata and git history, providing factual risk signals that an LLM cannot see through context alone.
Use cases
- Agent oversight Audit code generated by other AI agents for hidden regressions.
- PR pre-flight Identify high-risk changes in a large PR before starting a manual review.
- Coverage gap analysis Find new logic introduced into files with zero test coverage.
- Security sanity check Ensure no sensitive infra or auth files were modified unintentionally.
Known limitations
Requires a local git repository with at least one commit. Does not perform static analysis or logic verification; it identifies risk areas, not specific bugs.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Code Quality & Review.
Requires Node.js 20+, Git, and a repository with at least one commit. Heuristic-based signals only; an empty result does not guarantee code safety.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
1 use
Times used to date
Free to use
No account required to browse
Trust & safety
Security scan
Security scan passed 25 days ago
- Free with an Agensi account
- Software
Node.jsrisk-annotate
Git