harness-codebase-health-analyst

harness-codebase-health-analyst is an agent for Claude Code from Intense-Visions/harness-engineering. It costs 22 tokens per session (14,191 once invoked), scanned A, original, MIT.

A codebase health analyst that searches for structural weaknesses, tightly connected modules, performance problems, security issues, and architecture that has drifted over time.

In plain words
What is it for?
Use it for weekly health checks, before major refactoring, or when changes repeatedly cause problems elsewhere. It can use a history-based knowledge graph when one exists, or fall back to static code analysis.
Why use it?
It reveals risky areas before they cause incidents or make refactoring unexpectedly break unrelated parts of the system.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the harness-claude plugin — 85 skills, 89 commands, 17 agents, 4 hooks, 4 MCP servers shipped together

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 agents/intense-visions/harness-engineering/harness-codebase-health-analyst
Clone the repo
git clone --depth 1 https://github.com/Intense-Visions/harness-engineering

Made for: Claude Code.

Or install harness-claude, the plugin that ships this one along with the rest of its 85 skills, 89 commands, 17 agents, 4 hooks, 4 MCP servers.

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 harness-codebase-health-analyst

README.md
[![agentmods](https://agentmods.dev/badge/agents/intense-visions/harness-engineering/harness-codebase-health-analyst.svg)](https://agentmods.dev/agents/intense-visions/harness-engineering/harness-codebase-health-analyst)
Your own site
<a href="https://agentmods.dev/agents/intense-visions/harness-engineering/harness-codebase-health-analyst"><img src="https://agentmods.dev/badge/agents/intense-visions/harness-engineering/harness-codebase-health-analyst.svg" alt="Measured on agentmods" height="20"></a>
Per session 22 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 14,191 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.00022 $0.14191
Opus 5 $0.00011 $0.07096
Sonnet 5 $0.00004 $0.02838
Haiku 4.5 $0.00002 $0.01419

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

Security

Grade A, and why

harness-codebase-health-analyst 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.

.antigravity-extension/agents/harness-codebase-health-analyst.md · 1,302 lines

How it starts

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

Role

Run health checks, detect hotspots, analyze impact, surface risks before they become incidents

Skills

  • harness-hotspot-detector
  • harness-dependency-health
  • harness-impact-analysis
  • cleanup-dead-code
  • harness-perf
  • harness-security-scan

Steps

  1. Run harness graph status (always)
  2. Run harness check-deps (always)
  3. Run harness check-perf (always)
  4. Run harness check-security (always)

Methodology

Harness Hotspot Detector

Identify modules that represent structural risk via co-change and churn analysis.

When to Use

  • Weekly scheduled analysis to track codebase risk
  • Before major refactoring — find the riskiest areas
  • When investigating why changes keep breaking unrelated features
  • NOT for finding dead code (use cleanup-dead-code)
  • NOT for checking architecture rules (use enforce-architecture)

Prerequisites

A knowledge graph at .harness/graph/ with git history enables full analysis. If no graph exists, the skill uses static analysis fallbacks (see Graph Availability section). Run harness scan to enable graph-enhanced analysis.

Graph Availability

Before starting, check if .harness/graph/graph.json exists.

If graph exists: Use graph tools as primary strategy. (Staleness sensitivity: Low — never auto-refresh. Git-based churn data in the graph remains useful even when slightly stale.)

If graph exists and is fresh (or refreshed): Use graph tools as primary strategy.

If no graph exists: Output "Running without graph (run harness scan to enable full analysis)" and use fallback strategies for all subsequent steps.

Process

Phase 1: CO-CHANGE — Analyze Co-Change Patterns

Query the graph for co_changes_with edges (created by GitIngestor):

query_graph(rootNodeIds=[all file nodes], includeEdges=["co_changes_with"])

Identify file pairs that frequently change together:

  • Co-located pairs (same directory): Normal — they share a concern.
  • Distant pairs (different modules): Suspicious — may indicate hidden coupling.

Read the full file on GitHub · 1,302 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 · 1,302 lines · 22 tokens per session scan A 15472c459948

Subscribe to this mod's changes

harness-codebase-health-analyst is an agent published in the GitHub repository Intense-Visions/harness-engineering (20 stars, last pushed yesterday), licensed MIT. It adds 22 tokens to every session and 14,191 once invoked, about $0.0001 per session on Opus 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-30.