GitCortex: Agent for Claude Code

.claude/agents/rust-build-fixer.md

rust-build-fixer is an agent for Claude Code from bharath03-a/GitCortex. It costs 60 tokens per session (601 once invoked), scanned A, original, MIT.

A Rust code-fixing agent for the GitCortex workspace. It handles compiler errors, Clippy warnings, and rustfmt problems with small targeted changes.

In plain words
What is it for?
Use it when cargo check, cargo clippy, or cargo fmt fails, then recheck the workspace until the required checks pass.
Why use it?
It removes repetitive debugging work while preserving the existing design and avoiding broad refactoring.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

This is bharath03-a/GitCortex's own configuration. It tells Claude Code how to work on GitCortex itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything GitCortex configures →

Reuse

Borrowing it

Nothing to install: this file belongs to bharath03-a/GitCortex. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/bharath03-a/GitCortex/main/.claude/agents/rust-build-fixer.md
Clone the repo
git clone --depth 1 https://github.com/bharath03-a/GitCortex

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for rust-build-fixer

README.md
[![agentmods](https://agentmods.dev/badge/agents/bharath03-a/gitcortex/rust-build-fixer/github.svg)](https://agentmods.dev/agents/bharath03-a/gitcortex/rust-build-fixer)
Your own site
<a href="https://agentmods.dev/agents/bharath03-a/gitcortex/rust-build-fixer"><img src="https://agentmods.dev/badge/agents/bharath03-a/gitcortex/rust-build-fixer/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for rust-build-fixer

Your own site · 80×15
<a href="https://agentmods.dev/agents/bharath03-a/gitcortex/rust-build-fixer"><img src="https://agentmods.dev/badge/agents/bharath03-a/gitcortex/rust-build-fixer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 60 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 601 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00060 $0.00601
Opus 5.5 $0.00024 $0.00240
Sonnet 5.5 $0.00012 $0.00120
Haiku 4.5 $0.00006 $0.00060

Measured 2mo ago against content hash 5266e903266e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

rust-build-fixer 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 2mo 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/agents/rust-build-fixer.md · 40 lines

How it starts

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

You fix Rust build, clippy lint, and rustfmt errors in the GitCortex workspace. Minimal diffs. No refactors.

Operating loop

  1. Run failing command exactly as user reported (or cargo check --workspace --all-targets if none given).
  2. Parse first failure. Read referenced files at the line.
  3. Apply smallest fix that compiles and respects existing style.
  4. Re-run. Repeat until clean.
  5. After clean, run cargo fmt --all -- --check and cargo clippy --workspace --all-targets -- -D warnings. Fix any drift.

Hard rules

  • Never add #[allow(...)] to silence a lint unless the user explicitly authorised it. Fix the underlying issue.
  • Never introduce .unwrap() or .expect() in library code (crates/gitcortex-{core,indexer,store}). Use ? with the crate's error type. CLI/MCP entry points may use .unwrap() only in main or already-established patterns.
  • Never delete tests to make them pass. If a test is wrong, say so and stop.
  • Never bump dependency versions to fix a build. Surface the constraint to the user.
  • Match existing error type: GitCortexError in gitcortex-core. Each crate has its own error.rs.
  • Respect workspace dep declarations — add new deps via Cargo.toml workspace entry, then { workspace = true } in member.

Known traps (GitCortex specific)

  • gitcortex-mcp/build.rs does include_bytes! on viz/dist. If build fails with missing viz assets, stop and tell the user to cd viz && npm ci && npm run build — do not patch around it.
  • KuzuDB MSVC link errors on Windows are unfixable from Rust side. CI dropped Windows builds. If user is on Windows asking for fix, surface this — do not invent workarounds.
  • tokio lives only in gitcortex-mcp. Do not add async/tokio to core, indexer, or store.

When to stop and ask

  • Failure requires changing public API of GraphStore trait.
  • Failure indicates a missing parser/schema feature, not a code bug.
  • More than 10 iterations without convergence.

Output: brief summary of each fix as a one-liner. No essays.

Read the full file on GitHub · 40 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. 2mo ago First seen · 40 lines · 60 tokens per session scan A 5266e903266e

Subscribe to this mod's changes

rust-build-fixer is an agent published in the GitHub repository bharath03-a/GitCortex (8 stars, last pushed 2d ago), licensed MIT. It adds 60 tokens to every session and 601 once invoked, about $0.0002 per session on Opus 5.5. 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.

Related

Other agents, from other repositories

rust-build-resolver

Rust build, compilation, and dependency error resolution specialist. Fixes cargo build errors, borrow checker issues, and Cargo.toml problems with minimal changes. Use when Rust builds fail.

affaan-m/ECC · 41 tokens

rust-general-engineer

Rust development: features, debugging, code review, performance. Modern Rust 2024 edition patterns.

notque/vexjoy-agent · 25 tokens

rust-performance-engineer

Rust performance optimization specialist specializing in macOS optimizations (sccache, XProtect), profiling with flamegraph, benchmarking with criterion, and build speed improvements. Use when performance concerns are mentioned, slow code identified, build times need optimization, or macOS-specific optimization needed.

bug-ops/zeph · 60 tokens

rust-debugger

Rust debugging and troubleshooting specialist focused on systematic error diagnosis, runtime debugging with LLDB/GDB, panic analysis, async debugging, memory issues, and production incident investigation. Use PROACTIVELY when encountering compilation errors, runtime panics, unexpected behavior, performance anomalies…

bug-ops/zeph · 61 tokens

rust-fix-agent

Rust specialized build/clippy error fixing agent. Use when cargo build or cargo clippy errors occur. Makes practical fixes following YAGNI principle. USE PROACTIVELY when encountering Rust compilation or clippy errors.

nwiizo/ccswarm · 48 tokens

rust-engineer

Write, debug, and harden idiomatic systems code. TRIGGER WHEN: writing or implementing Rust: ownership patterns, async with tokio, trait design, error handling, FFI, performance optimization, or unsafe code review. DO NOT TRIGGER WHEN: the task is Tauri-specific (use tauri-desktop or tauri-mobile).

acaprino/daodan · 73 tokens