AI Code Health Check
AI 代码体检 — your coding agent wrote it. Who checks it?
Paste a public GitHub repository and get a five-dimension health score for its frontend code — the failure modes AI coding tools are known for: giant functions, duplicated logic, zero tests. No install, no sign-up, no API keys.
Open source — the scanner is the frontend-harness-cli on GitHub. This page runs its scan engine; the repo is where the code, the rules and the full CLI live.
Public frontend repositories only (JS/TS/React/Next/Vue). Archives up to 20MB and 3,000 files. Scanning usually takes a few seconds.
Run the full workflow — one prompt
The health check tells you where your agent's code is rotting. The harness is what stops the rot while the agent works — and using it takes exactly one prompt. No plugin to install, no config to write, no new tool to learn: your agent runtime does the setup, then works under rubric gates.
1. Paste it
One prompt into Claude Code, Codex, or any agent runtime that can run shell commands. That is the entire install.
2. It sets itself up
The agent clones the open-source CLI, initializes your repo for your stack (Next.js, React, Vue or Node), and installs the protocol, the three role agents and the skills pack.
3. Name a feature
Describe the feature — or hand over a PRD file and it is imported as-is. The harness drives clarify → implement → evaluate → verify → done, asking you only at the confirmation and if it pauses.
Set up frontend-harness-cli in this project and use it for all feature work from now on. 1. Get the CLI: if a `harness` command is not available, run git clone https://github.com/XingMXTeam/frontend-harness-cli.git ~/.frontend-harness-cli and use `node ~/.frontend-harness-cli/bin/harness.js` wherever the steps below say `harness`. 2. Initialize this repo (do not overwrite files that already exist): harness init --stack <pick what this repo uses: nextjs | react | vue | node> --host <claude-code if you are Claude Code, codex if you are Codex, otherwise generic> 3. Follow the harness protocol from now on: - Your first action for any feature work is `harness next <feature>`; do exactly the action it returns. - Never edit .harness/tasks/*/state.json by hand — every state change goes through a harness command. - Never declare a feature done yourself; only a passing `harness eval` plus the delivery gate can set done. 4. Ask me which feature to start. Create it with `harness new <feature>` — or `harness new <feature> --prd <file>` if I give you a PRD document — then drive it through clarify -> implement -> evaluate -> verify -> done. Ask me only at the clarify confirmation, and again if the harness pauses.
Needs git and Node.js 20+. Everything runs on your machine — your code never leaves it. Prefer to drive it yourself? The same CLI runs unattended with harness run <feature> — see the GitHub repo.
The workflow, visualized — 工作流全景
The scan above is one instrument. The full harness is a state machine your coding agent runs inside: five phases, three roles, and gates that are code, not promises. It grew out of a classic eight-stage flow — the stages did not disappear, they changed jobs: stages became kernel states, and skills became per-stage tools named after what they produce. Click a phase to see who works there and what stops the line.
Evaluate can route back: fail → Implement (fix only the open items, or replan first). Budgets cap every loop — when they run out the harness pauses and a human decides. Nothing loops forever, and nothing passes itself.
Clarify · planner
Turn a one-line request — or a finished PRD you import with `harness new --prd` — into a locked, testable contract. The planner interviews you only until open questions hit zero (with an imported PRD: only the gaps), then writes the contract files in a fixed order.
- Produces
- prd.md · vision.md · tech-design.md · pages.json · tasks.json · rubric.json · e2e-cases.json
- Gate
- clarify-done coverage gate: every requirement needs an essential check, an anchored quality item (or a written waiver), and e2e cases across six categories. No coverage, no code.
- Skills
clarify-requirementswrite-prdwrite-quality-visionwrite-tech-designwrite-dev-planwrite-acceptance-criteria
From the classic 8 stages to this kernel — 八阶段对照
If you learned the old flow (one skill per stage), this is the translation table. The remediation loop you may remember as its own skill now lives inside Evaluate → Implement as the fix-from-report action.
| Classic stage | What it was | Where it lives now |
|---|---|---|
| init | ait-init skill | `harness init` — a kernel command, no skill needed |
| clarify | ait-clarify skill | Clarify phase: clarify-requirements + the five-step write-* authoring chain (or a --prd import + gap-only clarifying) |
| generate | ait-generate skill | Implement phase: the developer agent + implement-task, one verified commit per task |
| docs | ait-docs skill | The artifacts are the docs — prd.md / tech-design.md / plan.md written during Clarify; sync-overview folds them into the project overview at Done |
| evaluation | ait-evaluation skill | Evaluate phase: `harness eval` runs deterministic items as commands; judge items scored from fresh evidence by a separate evaluator |
| verify | ait-verify skill (4 gates) | Verify phase: a fresh-context confirmation pass + the stable-pass requirement; the gates became kernel rules (vetoes, coverage, freshness) |
| publish | ait-publish skill | Done: the kernel's delivery gate (your build/test/lint commands) + `harness report` |
| evolve | ait-evolve skill | Two guarded loops: `harness skills eval` (a golden set scores the skills themselves) and rubric-refinement suggestions the planner must answer — tightening only, loosening needs a human |
Sample report — we scored this site first
This is the real scan of the repository that serves this page. It is not a flattering score, and that is the point.
XingMXTeam/maoxunxing-aiSample
22 source files · static analysis only
structure is the weakest dimension at 0/100 — Function spans 626 lines (limit 50). Long generated functions are where bugs hide.
Fix first — biggest points at stake
- function-too-long×23Structure138 pts at stake
- low-test-presence×1E2E / Tests60 pts at stake
- file-too-long×6Structure48 pts at stake
Issues by dimension
Structure · 3
- function-too-long Function spans 626 lines (limit 50). Long generated functions are where bugs hide.app/xiaohongshu-cover-maker/CoverMaker.tsx:39
- file-too-long File has 1391 lines (limit 300). Split into smaller modules, each with a single responsibility.app/xiaohongshu-cover-maker/layouts.ts:301
- function-too-long Function spans 396 lines (limit 50). Long generated functions are where bugs hide.app/habit-tracker-printable/HabitTrackerTool.tsx:79
UI · 1
- raw-hex-colors 68 raw hex colors outside design-token files (limit 3). A raw hex looks right and silently forks the palette — use a token.app/habit-tracker-printable/HabitTrackerTool.tsx
E2E / Tests · 1
- low-test-presence Only 0/22 source files have a sibling test (target ratio 0.5).
What the five dimensions measure
- Structure
- Oversized files and functions, tangled architecture — the shape AI-generated code rots into first.
- Data
- Hardcoded secrets, insecure URLs, un-namespaced storage keys — the mistakes agents make most confidently.
- Logic
- Leftover console.log, TODO pile-ups, forbidden patterns — unfinished work pretending to be done.
- UI
- Raw hex colors bypassing design tokens and basic accessibility discipline.
- E2E / Tests
- How much of the code has a sibling test. Untested generated code is a promise, not a result.
Total scores are banded for a quick read: 85+ Healthy · 65–84 Watch · 40–64 At risk · below 40 Critical. The band is a summary, not a grade — the five dimensions are the report.
Honest limits
- A score is a diagnostic signal, not a quality verdict. It tells you where to look first; it does not prove code is good or bad.
- The scan is purely static: it reads source files as text. Your code is never executed, compiled, or installed, and nothing is stored after the report is generated.
- Scope is frontend code (JS/TS/React/Next/Vue). Compilation is not verified, and test scoring uses test presence, not a live test run.
- Scores are deterministic and reproducible: run the open-source CLI locally and you will get the same numbers.
Questions
- Is the AI Code Health Check free?
- Yes. Checking a public GitHub repository on this page is free, with no sign-up, no install and no API keys. The same scanner is built into the open-source frontend-harness-cli, which is also free to run locally or in CI.
- How does the check work?
- Paste a public GitHub repository URL. The service downloads a snapshot of the default branch, reads the source files as text, and scores five dimensions — structure, data, logic, UI and test presence — from deterministic rules. You get a total score, the weakest dimension, and the top issues with file and line references.
- Is my code executed or stored?
- No. The scan is purely static: repository code is never executed, compiled or installed, and the downloaded snapshot is deleted as soon as the report is generated. Nothing about your code is kept. The page only accepts public repositories, so it never asks for access to anything private.
- Which repositories can it check?
- Public GitHub repositories with frontend code (JavaScript, TypeScript, React, Next.js, Vue). The web version accepts snapshots up to 20 MB and 3,000 files; larger repositories should use the CLI locally, which has no such limits.
- How is the score calculated?
- Each dimension starts at 100 and loses points for concrete findings — for example oversized files and functions in structure, hardcoded secrets in data, leftover console.log statements in logic, raw hex colors in UI, and missing sibling tests in E2E. The rules and thresholds are the ones in the open-source CLI, so the score is fully reproducible: run it locally and you will get the same numbers.
- Does a low score mean my code is bad?
- Not by itself. The score is a diagnostic signal, not a quality verdict. It shows where AI-generated code tends to rot first — giant functions, duplicated patterns, zero tests — so you know where to look. Well-kept generated code scores high; the sample on this page scores 66 because we publish our own result, good or bad.
- Can it check a private repository?
- Not on this page, by design — it never asks for your GitHub credentials or access tokens. For private code, run the open-source frontend-harness-cli on your own machine, where the code never leaves your computer.
- How is this different from SonarQube or an AI code reviewer?
- Those tools usually review pull-request diffs and need repository access and setup. This check scores the health of a whole frontend repository in one paste, with zero setup, and its rules target the specific failure modes of AI-generated code. It answers a different question: not "is this diff OK?" but "is this codebase staying maintainable as an agent keeps writing it?"
- How do I run the full harness with Claude Code or Codex?
- Paste the single setup prompt from this page into your agent runtime. The agent clones the open-source CLI, initializes your repository, and from then on works under the harness protocol: it asks the kernel for the next action, builds one task at a time, and only a passing rubric evaluation plus the delivery gate can mark a feature done. You stay in the loop at exactly two points — confirming the plan during clarify, and deciding when the harness pauses.
- My score is low. What should I do next?
- Start with the weakest dimension in your report — the top issues are listed with file and line references, and fixing the worst few usually moves the score most. To stop the score sliding back as your coding agent keeps working, the frontend-harness-cli adds rubric gates that check every change before it lands.