fix-deepsource-issues

A command that uses DeepSource, a code-quality checking service, to find open issues in a project and fix them.

In plain words
What is it for?
Use it to list DeepSource issues, inspect their details and counts, check overall code-health metrics, and fix the reported problems.
Why use it?
It avoids manually searching through DeepSource reports and deciding which reported problems to address. It can also check issues for a specific branch or for the whole project.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/sapientpants/deepsource-mcp-server/fix-deepsource-issues
Clone the repo
git clone --depth 1 https://github.com/sapientpants/deepsource-mcp-server

Made for: Claude Code.

Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,085 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.02085
Opus 5 $0.00000 $0.01043
Sonnet 5 $0.00000 $0.00417
Haiku 4.5 $0.00000 $0.00209

Measured 2d ago against content hash 3d735ffd7c3f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

fix-deepsource-issues scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/fix-deepsource-issues.md · 239 lines

How it starts

The opening of the file, as written. The whole thing — 239 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Fix DeepSource Issues

Analyze and fix all open issues reported by DeepSource for this project using the DeepSource MCP server.

Steps

  1. Identify Project and Check for Issues

    • Use MCP tool projects to list available projects
    • Find the project key matching this repository
    • For branch-specific issues: Use recent_run_issues with the current branch name
    • For overall project issues: Use project_issues to query all open issues
    • Note: recent_run_issues may return very large responses - use runs to check issue counts first
    • If no issues found: Report "✅ No DeepSource issues found!" and exit
  2. Get Detailed Issue Analysis

    • When working on a specific branch (e.g., for a PR):
      • Use runs to find the latest run for your branch and check issue counts
      • Use run with the run ID to get summary information
      • Note: recent_run_issues responses can exceed token limits even with first: 1
      • If API responses are too large, check the DeepSource dashboard directly
    • For main branch or overall project:
      • Use project_issues with pagination (default branch is main)
    • Use quality_metrics to understand overall code health
    • Check dependency_vulnerabilities for security issues in dependencies
  3. Analyze Retrieved Issues

    • Group by severity: BLOCKER, CRITICAL, MAJOR, MINOR, INFO
    • Categorize by analyzer:
      • JavaScript/TypeScript: JS-* issues
      • Test Coverage: TCV-* issues
      • Security: SEC-* issues
      • Dependencies: DEP-* issues
    • Note issue occurrences (how many times each issue appears)
    • Report detailed summary with issue codes and descriptions
  4. Create Feature Branch (only if issues exist)

    git checkout -b fix/deepsource-issues-$(date +%Y%m%d)
    
  5. Fix Issues by Priority

    • Start with BLOCKER severity
    • Then CRITICAL
    • Then MAJOR
    • Then MINOR
    • Finally INFO
    • Group similar issues to fix them together efficiently

Read the full file on GitHub · 239 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 239 lines · 0 tokens per session scan A 3d735ffd7c3f

Subscribe to this mod's changes

fix-deepsource-issues is a command published in the GitHub repository sapientpants/deepsource-mcp-server (7 stars, last pushed 10mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,085 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.