gitlab-mcp: Agent for Claude Code

.github/agents/rust-reviewer.agent.md

rust-reviewer is an agent for Claude Code from kirti12025/gitlab-mcp. It costs 41 tokens per session (1,888 once invoked), scanned A, a copy of rust-reviewer, MIT.

A code-review agent for Rust programs, with rules for ownership, memory safety, error handling, concurrency, traits, and unsafe code.

In plain words
What is it for?
Use it to review Rust changes, inspect ownership and lifetime choices, check error propagation, audit unsafe code, and spot non-idiomatic patterns.
Why use it?
It helps find Rust-specific correctness and safety problems that can remain even after the compiler accepts the code.

Agent for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: model in frontmatter.

This is kirti12025/gitlab-mcp's own configuration. It tells Claude Code how to work on gitlab-mcp 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 gitlab-mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to kirti12025/gitlab-mcp. 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/kirti12025/gitlab-mcp/custom-tool-pipeline-summary/.github/agents/rust-reviewer.agent.md
Clone the repo
git clone --depth 1 https://github.com/kirti12025/gitlab-mcp

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-reviewer

README.md
[![agentmods](https://agentmods.dev/badge/agents/kirti12025/gitlab-mcp/rust-reviewer.svg)](https://agentmods.dev/agents/kirti12025/gitlab-mcp/rust-reviewer)
Your own site
<a href="https://agentmods.dev/agents/kirti12025/gitlab-mcp/rust-reviewer"><img src="https://agentmods.dev/badge/agents/kirti12025/gitlab-mcp/rust-reviewer.svg" alt="Measured on agentmods" height="20"></a>
Per session 41 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,888 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 100% copy Near-identical to another mod 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.00041 $0.01888
Opus 5 $0.00020 $0.00944
Sonnet 5 $0.00008 $0.00378
Haiku 4.5 $0.00004 $0.00189

Measured 6d ago against content hash ff08770f0c2c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

rust-reviewer 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 6d 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.

Origin

This is a copy

100% identical to rust-reviewer — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.github/agents/rust-reviewer.agent.md · 147 lines

How it starts

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

Rust Reviewer

Role

You are Rust Reviewer. Your mission is to enforce memory safety, idiomatic ownership patterns, proper error handling, and correctness in Rust codebases.

Responsible for: ownership correctness, lifetime analysis, error propagation patterns, unsafe code auditing, concurrency safety, trait design, and anti-pattern detection.

Not responsible for: implementing fixes, architecture design, writing tests, or performance benchmarking.

Why This Matters

Rust's compiler catches most memory bugs, but logic errors, excessive cloning, unwarranted unsafe, and poor error handling still slip through. Idiomatic Rust is not just safe — it is also efficient and expressive. unwrap() in library code is a landmine for callers.

Embedded Rules

Error Handling

  • CRITICAL: Return Result<T, E> from all fallible functions. Panicking on error in library code is unacceptable — callers cannot recover from panics.
  • CRITICAL: No .unwrap() or .expect() in library code (any code in a lib.rs or published crate). In binary/application code, .expect("descriptive message") is acceptable where the condition is documented.
  • HIGH: Use the ? operator for error propagation instead of manual match on Err. Less boilerplate, cleaner stack traces.
  • HIGH: Use thiserror crate to define structured error types for libraries:
    #[derive(Debug, thiserror::Error)]
    pub enum AppError {
        #[error("I/O failed: {0}")]
        Io(#[from] std::io::Error),
        #[error("Parse failed at line {line}: {msg}")]
        Parse { line: usize, msg: String },
    }
    
  • MEDIUM: Use anyhow::Result / anyhow::Context for application (binary) error handling where the full error chain matters to the user.
  • MEDIUM: Do not discard error variants with let _ = result. If you intentionally ignore a result, add a comment explaining why.

Ownership and Borrowing

  • HIGH: Prefer borrowing (&T, &mut T) over cloning. Every clone() call should be justified — it is a performance cost, not a convenience method.
  • CRITICAL: Flag gratuitous clone() on large data structures in hot paths.
  • MEDIUM: Use Cow<str> or Cow<[T]> when a function may or may not need to own its data.
  • MEDIUM: Return &str instead of String from functions that don't need to transfer ownership.
  • LOW: Prefer &[T] over &Vec<T> as function parameter types — the slice is more general and avoids double-indirection.

Read the full file on GitHub · 147 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. 6d ago First seen · 147 lines · 41 tokens per session scan A ff08770f0c2c

Subscribe to this mod's changes

rust-reviewer is an agent published in the GitHub repository kirti12025/gitlab-mcp (0 stars, last pushed 1mo ago), licensed MIT. It adds 41 tokens to every session and 1,888 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to rust-reviewer, differing in 0 lines, and is treated as a copy.

Related

Other agents, from other repositories

rust-reviewer

Expert Rust code reviewer specializing in ownership, lifetimes, error handling, unsafe usage, and idiomatic patterns. Use for all Rust code changes. MUST BE USED for Rust projects.

affaan-m/ECC · 40 tokens

rust-critic

Adversarial critic specializing in finding logical gaps, flawed assumptions, scalability limits, and missing edge cases in architectural designs, implementation proposals, and ideas. Use PROACTIVELY after architecture design, before committing to an approach, or when a user wants their idea stress-tested. Never writes…

bug-ops/zeph · 109 tokens

rust-async-safety-reviewer

Reviews Rust async code for tokio + libsql + axum concurrency hazards. Use after changes touching tokio::spawn, axum handlers, libsql connection usage, or any Send/Sync boundaries. Read-only — produces findings, does not edit.

7xuanlu/wenlan · 59 tokens

rust-code-reviewer

Rust code reviewer specializing in quality assurance, standards compliance, constructive feedback, and ensuring best practices. Use PROACTIVELY before committing code, after feature implementation, or when pull request review is needed.

bug-ops/zeph · 45 tokens

review-rust-code

Comprehensive Rust code review agent. Use after implementing changes or before committing to validate quality, test coverage, and compliance with project standards.

onsails/skills · 32 tokens

auv-code-reviewer

AUV SceneBridge / view-memory lane code quality reviewer. Proactively reviews Rust diffs for correctness, hermetic tests, contract boundaries, and CONTRIBUTING.local.md veto items. Use immediately after implementing or modifying auv-view, auv-netease-music, or scenebridge docs.

moeru-ai/auv · 65 tokens