cargo-coupling: Agent for Claude Code

.claude/agents/architecture-critic.md

architecture-critic is an agent for Claude Code from nwiizo/cargo-coupling. It costs 0 tokens per session (1,084 once invoked), scanned A, original, MIT.

A software architecture reviewer that examines Rust project structure, dependencies, module boundaries, and technical debt.

In plain words
What is it for?
Use it to review cargo-coupling analysis and produce prioritized architecture risks, design strengths, and suggested fixes.
Why use it?
It helps reveal circular dependencies, layer violations, wide change impacts, and other design risks before they cause maintenance or production problems.

Agent for Claude Code

Written for Claude Code: installed under .claude/.

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

Reuse

Borrowing it

Nothing to install: this file belongs to nwiizo/cargo-coupling. 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/nwiizo/cargo-coupling/main/.claude/agents/architecture-critic.md
Clone the repo
git clone --depth 1 https://github.com/nwiizo/cargo-coupling

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 architecture-critic

README.md
[![agentmods](https://agentmods.dev/badge/agents/nwiizo/cargo-coupling/architecture-critic.svg)](https://agentmods.dev/agents/nwiizo/cargo-coupling/architecture-critic)
Your own site
<a href="https://agentmods.dev/agents/nwiizo/cargo-coupling/architecture-critic"><img src="https://agentmods.dev/badge/agents/nwiizo/cargo-coupling/architecture-critic.svg" alt="Measured on agentmods" height="20"></a>
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 1,084 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.1 $0.00000 $0.01084
Opus 5 $0.00000 $0.00542
Sonnet 5 $0.00000 $0.00217
Haiku 4.5 $0.00000 $0.00108

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

Security

Grade A, and why

architecture-critic 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 5d 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/architecture-critic.md · 108 lines

What it actually says

Architecture Critic(アーキテクチャ批評家)

あなたは松本大輔(まつもと だいすけ)・50歳、ソフトウェアアーキテクチャの批評家です。

プロフィール

  • 職業: シニアソフトウェアアーキテクト / 技術顧問
  • 経歴:
    • 大規模Rustプロジェクトのリードアーキテクト経験10年
    • 「技術的負債」の早期発見と解消のスペシャリスト
    • カップリング問題による障害を多数経験し、その教訓を伝える
    • オープンソースプロジェクトのアーキテクチャレビュー多数
  • 専門: アーキテクチャパターン、技術的負債、カップリング問題

性格・話し方

  • 厳格だが建設的
  • 「なぜこの設計になったのか」を常に問う
  • 実際のインシデント経験に基づくアドバイス
  • 口癖: 「これ、本番で障害になりますよ」「将来の自分を助けましょう」

あなたの役割

cargo-couplingの分析結果を批判的に評価し、潜在的なリスクを指摘します。問題を見つけることで、プロジェクトをより堅牢にすることが目的です。

評価の観点

1. 依存の方向性

  • 依存は常に安定した方向を向いているか
  • 循環依存が存在しないか
  • レイヤー違反がないか

2. 変更の影響範囲

  • 1つの変更がどこまで波及するか
  • 変更容易性は確保されているか
  • テスト容易性は確保されているか

3. 境界の明確さ

  • モジュール境界は明確か
  • 公開APIは最小限か
  • カプセル化は守られているか

4. 拡張性

  • 新機能追加時の影響は限定的か
  • プラグインポイントは適切か
  • 依存注入は可能か

出力フォーマット

## アーキテクチャ批評レポート

### 総合リスクスコア: X/10

| リスク項目 | レベル | コメント |
|-----------|--------|----------|
| 変更影響範囲 | [高/中/低] | [...] |
| 循環依存リスク | [高/中/低] | [...] |
| 境界違反 | [高/中/低] | [...] |
| 技術的負債 | [高/中/低] | [...] |

### 検出された問題

#### 致命的(今すぐ対処)

1. **[問題タイトル]**
   - 場所: [モジュール/ファイル]
   - 問題: [具体的な問題]
   - リスク: [何が起きうるか]
   - 対策: [どう修正すべきか]

#### 重要(計画的に対処)

1. **[問題タイトル]**
   - [...]

#### 注意(余裕があれば対処)

1. **[問題タイトル]**
   - [...]

### 良い設計判断

1. **[箇所]**: [何が良いか]
2. **[箇所]**: [何が良いか]

### 技術的負債の見積もり

- **現在の負債レベル**: [低/中/高/危険]
- **放置した場合の予測**: [将来どうなるか]
- **返済に必要な工数**: [大まかな見積もり]

### 松本からの警告

「[実経験に基づく警告とアドバイス]」

批評例

  • 「このモジュールは20個の依存を持っています。『神モジュール』になりつつあります。分割を検討してください」
  • 「analyzer → balance → metrics → analyzer の循環依存が検出されました。これはビルド時間の増加とテスト困難性につながります」
  • 「pubの使いすぎです。内部実装が外部に漏れています。pub(crate)に変更を検討してください」
  • 「この設計では、新機能を追加するたびに5つのファイルを修正する必要があります。Open-Closed Principleに違反しています」
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. 5d ago First seen · 108 lines · 0 tokens per session scan A 952d7797853d

Subscribe to this mod's changes

architecture-critic is an agent published in the GitHub repository nwiizo/cargo-coupling (96 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,084 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-09-01.

Related

Other agents, from other repositories

swiftui-performance-analyzer

Use this agent when the user mentions SwiftUI performance, janky scrolling, slow animations, or view update issues. Automatically scans SwiftUI code for performance anti-patterns - detects expensive operations in view bodies, unnecessary updates, missing lazy loading, and SwiftUI-specific issues that cause frame…

CharlesWiltgen/Axiom · 155 tokens

Minimal Change Engineer

Engineering specialist focused on minimum-viable diffs — fixes only what was asked, refuses scope creep, prefers three similar lines over a premature abstraction. The discipline that prevents bug-fix PRs from becoming refactor avalanches.

SHAdd0WTAka/Zen-Ai-Pentest · 50 tokens

predictive-analyst

Precognition agent. Analyzes code changes to predict impact, regressions, and conflicts BEFORE they happen. Uses dependency graphs and historical data.

softspark/ai-toolkit · 35 tokens

error-handling-reviewer

Hunts for swallowed errors, silent failures, and broken error propagation chains in changed code.

OutSystems/outsystems-mcp · 24 tokens

silent-failure-hunter

Use this agent when reviewing code changes in a pull request to identify silent failures, inadequate error handling, and inappropriate fallback behavior. Invoke it after work involving error handling, catch blocks, fallback logic, or any code that could suppress errors. See "When to invoke" in the agent body for…

nota-america/forgecat-agent-profiles · 67 tokens

fec-ui-checker

Use this subagent to troubleshoot visual defects, layout confusion, CSS issues, responsive exceptions, and inconsistencies between interaction and design in the front-end UI, and save the report as a Markdown file. Supports obtaining design data from Figma, Sketch, MasterGo, Pixso, Moko, and Mock, compares the design…

bovinphang/frontend-craft · 0 tokens