/codacy-skills:codacy-code-reviewfrom codacy-skills
Enriches pull request code reviews with Codacy data including quality issues, security findings, coverage, and duplication. Works alongside other review tools to layer Codacy-specific analysis on PRs.
Ships in codacy-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Glossary: See glossary.md for shared definitions of Codacy concepts (issues, findings, severity, coverage, tools, patterns, etc.).
This skill enriches code reviews with Codacy data. It works alongside any existing code review process (a code-review skill, CodeRabbit, manual review, etc.) — it adds Codacy-specific data on top.
codacy-analysis) — for fast local analysis. See codacy-analysis-cli for setup.codacy) — for coverage data, quality gate status, and ignoring issues. See codacy-cloud-cli for setup.Both CLIs share credentials at ~/.codacy/credentials, so a single login covers both.
This skill uses two complementary analysis sources:
| Source | What it provides | Speed |
|---|---|---|
| Analysis CLI (local) | Issues and security findings on PR changes | Instant — no push or remote analysis needed |
| Cloud CLI (remote) | Coverage delta, quality gate, duplication, issue management (ignore/unignore) | Requires the PR to be pushed and analyzed by Codacy |
Prefer local analysis for issue detection — it runs immediately on the current working tree with --pr and doesn't require waiting for remote analysis. Use the Cloud CLI to supplement with coverage data and quality gate status, and to manage issues (ignore/unignore).
The Analysis CLI may not support every tool that Codacy Cloud runs. If the project uses tools not available locally (check with codacy-analysis analyze --inspect --output-format json), flag that some findings may only appear in the Cloud results.
codacy-analysis analyze --pr compares the current branch against the PR's target branch, catching issues even before pushing.codacy pull-request <provider> <org> <repo> <prNumber> --reanalyze-and-wait to trigger reanalysis and block until it completes (polls every 10 seconds, up to 20 minutes). For fire-and-forget, use --reanalyze instead and re-check manually.codacy pull-request <prNumber> work without explicit parameters.When reviewing a pull request, follow these steps. Always complete all steps — do not skip.
Code Review Progress:
- [ ] Step 1: Gather PR context (title, description, linked ticket)
- [ ] Step 2: Run local analysis on PR changes
- [ ] Step 3: Fetch Cloud PR data (coverage, quality gate)
- [ ] Step 4: Check introduced issues
- [ ] Step 5: Check coverage
- [ ] Step 6: Verify alignment with ticket and PR description
- [ ] Step 7: Propose test plan and check coverage gaps
- [ ] Step 8: Summarize and suggest improvements
Fetch the pull request metadata from the source provider (GitHub, GitLab, Bitbucket):
If there is a linked ticket, fetch its content as well.
Run the Analysis CLI to get immediate results on the changed files — no need to wait for remote analysis:
# If the PR already exists (compares against the PR's target branch)
codacy-analysis analyze --pr --fail-if-missing --output-format json
# If the PR hasn't been created yet (compares against the merge base of the current branch)
codacy-analysis analyze --diff --fail-if-missing --output-format json
Use --pr when the pull request exists, --diff when you're reviewing changes on a branch before the PR is opened. Both run all locally available tools on the changed files only.
--fail-if-missing matters here: without it an unavailable scanner is silently skipped and the run still exits 0 with no issues — reaching the reviewer as "no issues introduced" when nothing was scanned.
If the run is blocked (errors[].kind == "UnavailableTools") or the project isn't initialized, install first, then re-run the strict command (the two flags can't be combined):
codacy-analysis init # only if not initialized
codacy-analysis analyze --pr --install-dependencies --output-format json
codacy-analysis analyze --pr --fail-if-missing --output-format json
Parse the local results for issues — available immediately, covering the bulk of the review. Before concluding a PR introduced no issues, confirm toolResults is non-empty (empty means nothing was scanned) and carry any capability.unavailable or cloud-only tools into Analysis coverage.
Coverage, quality gate status, and duplication metrics are only available from Codacy Cloud:
codacy pull-request <provider> <org> <repo> <prNumber>
This returns: up-to-standards status, coverage delta, complexity delta, duplication delta, and changed files.
For the annotated diff with inline coverage annotations:
codacy pull-request <provider> <org> <repo> <prNumber> --diff
If the remote analysis is stale or missing, trigger a reanalysis and wait for completion:
codacy pull-request <provider> <org> <repo> <prNumber> --reanalyze-and-wait
This blocks until reanalysis finishes (up to 20 minutes) and reports the delta. While waiting, continue the review using local results from Step 2. For fire-and-forget reanalysis, use --reanalyze instead.
Combine findings from both local analysis (Step 2) and Cloud data (Step 3):
If issues look like false positives, suggest ignoring them via the Cloud CLI:
# Ignore a specific issue in this PR
codacy pull-request <provider> <org> <repo> <prNumber> --ignore-issue <issueId> --ignore-reason FalsePositive
# Ignore all issues Codacy identified as potential false positives in one go
codacy pull-request <provider> <org> <repo> <prNumber> --ignore-all-false-positives
# Unignore if needed
codacy pull-request <provider> <org> <repo> <prNumber> --unignore-issue <issueId>
If the same false positive pattern keeps appearing across PRs, suggest disabling the pattern via configure-codacy instead.
Coverage data comes from the Cloud CLI (Step 3). Review:
--diff output to see which specific lines lack coverage (✘ markers)Flag files with new uncovered lines as needing tests.
With the ticket/issue: Check that the code changes address the stated requirements. Note any functionality described in the ticket that is not present in the changes. Note any changes that go beyond the scope of the ticket.
With the PR description: Verify the description accurately reflects what was changed. Note discrepancies.
If the ticket or PR description is missing, incomplete, or inaccurate, note specific improvements to suggest.
Based on the changed code and coverage data:
Present a structured review summary:
## Codacy Review Summary
### Quality gate
[Pass / Fail — from Codacy PR analysis]
### Issues introduced
[List issues by severity, or "None — see Analysis coverage"]
### Analysis coverage
[Tools that ran; any skipped (with reason) or cloud-only]
### Coverage
[Delta, uncovered lines in new code]
### Alignment
- Ticket: [aligned / gaps noted]
- PR description: [accurate / suggestions]
### Test plan
[Proposed scenarios and whether tests exist]
### Suggested improvements
- PR description: [if applicable]
- Ticket/issue: [if applicable]
If a code review skill (e.g. code-review skill, CodeRabbit) has already performed a review, add a Codacy data section to that review rather than replacing it. Follow steps 2–7 above and append the Codacy findings.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
codacy, code-review, pr-analysis, code-quality, security-findings
npx claudepluginhub codacy/codacy-skills --plugin codacy-skills6 skills in this plugin
/codacy-analysis-cliUses the Codacy Analysis CLI to run local static analysis on repositories or specific files. Handles installation, initialization, dependency management, dry-runs, and analysis with JSON output. Use whenever the user wants to analyze code locally, run static analysis, scan for bugs or security issues, lint files, check code quality without pushing to Codacy, or run tools like ESLint, Ruff, Semgrep, RuboCop, or any other supported analyzer on their machine. Also trigger when the user asks to analyze staged changes, scan a PR locally, or set up local Codacy analysis./codacy-cloud-cliUses the Codacy Cloud CLI to query repositories, issues, security findings, pull requests, tools, and patterns on Codacy Cloud. Use whenever the user mentions Codacy, asks about code quality metrics, wants to check issues or findings in a repo, inspect a pull request analysis, browse security vulnerabilities, enable or disable tools, search patterns, trigger a reanalysis, or interact with any remote Codacy data — even if they don't say "Codacy CLI" explicitly./configure-codacyTailors Codacy configuration to a project by discovering its stack, enabling the right tools and patterns, running analysis, and intelligently reducing noise — disabling irrelevant or noisy patterns, tuning thresholds, and excluding files that shouldn't be analyzed. Produces a machine-readable summary of all changes. Use whenever the user wants to configure Codacy, reduce noise, fix false positives, enable or disable tools or patterns, tune code quality rules, deal with too many warnings, or align Codacy with their project's conventions. Also trigger when the user complains about irrelevant issues, noisy linters, or wants to set up Codacy for the first time on a repo./configure-codacy-cloudTunes an existing Codacy Cloud repository's configuration directly on the cloud, without local analysis, by importing the current config, suggesting higher-signal tools and patterns, reanalyzing, and iteratively reducing noise across two tuning passes. Requires the repository to already be on Codacy with at least one finished analysis. Uses the Codacy Analysis CLI only for config-file operations and the Codacy Cloud CLI for everything else. Produces a machine-readable JSON summary of pattern, tool, category, and severity changes plus conflicts and recommended path ignores. Use when the user wants to configure or tune Codacy directly on the cloud, reduce noise on a repository already analyzed by Codacy, optimize cloud patterns and tools, or improve the signal of cloud issues without running local analysis./setup-coverageSets up test coverage reporting in a repository and configures upload to Codacy. Detects testing frameworks, CI/CD pipelines, and coverage gaps, then adds the missing pieces to generate and upload coverage reports. Use whenever the user wants to set up coverage, add coverage reporting, integrate coverage with Codacy, fix missing coverage uploads, troubleshoot coverage not showing up, or configure CI to send coverage data. Also trigger when the user mentions test coverage, code coverage, coverage reports, or wants to know why Codacy shows no coverage for their repo.Other plugins' skills for the same job