Harness X-Ray

A tool that audits the harness of other projects: what it leaves exposed, what it wastes, and what it lacks.

  • Author’s project
  • Open source, MIT
  • Node.js 22+, no npm dependencies

This page describes the repository as of October 26, 2026 (commit 0cdf7c5).

See the repository on GitHub

Harness X-Ray is a project of mine, with its own repository. You give it the path of another project and it reviews its harness: the instructions, permissions, hooks, skills, and tools that decide what a coding agent reads, what it can run, and what it remembers. It does not look for bugs in the program's logic, but for vulnerabilities and parts of the harness that do not quite work.

What it does

It answers three questions about the harness of the project it reviews:

  • What it leaves exposed: destructive commands or secrets that the agent can reach without a barrier, and text written to manipulate it.
  • What it wastes: the context that loads in every session, used or not.
  • What it lacks or what does not work: a way to verify changes, a map of the repository, broken references, or protections that the text promises and nothing enforces.

Its 19 rules are grouped in six axes: instructions, context, security, verification, structure, and code. Each recommendation cites its source, and the result is a report in Markdown and HTML. X-Ray never runs code from the project it reviews and never writes to it. To understand why this matters, read Safe agent execution.

How it works

  1. The scanner measures. A script reads the project as text and uses numbers to decide the rules that can be measured, such as how many tokens load in each session.
  2. The agent judges. It reads only the files the scanner names and applies the judgment rules, such as whether two instructions contradict each other.
  3. The renderer checks. It validates each finding against the rules, the measurements, and the project. If something does not add up, it does not write the report.

It is the same idea as the hooks in this site's harnesses: what code can check is not left to the model's judgment.

It runs from Claude Code, with a skill that guides the audit, and the project it reviews can be any project: one prepared for Claude Code, for another agent, or for none. What depends on how each agent loads its files (the context, permissions, and hooks) is verified only for Claude Code, and the report marks the rest as not verified. It also has a continuous integration mode, with no agent, that applies only the measured rules.

Tests on three public repositories

On October 27, 2026, I ran X-Ray (commit 0cdf7c5) on three public repositories with very different harnesses. An agent did each audit in an unattended session, and that same agent reviewed the findings.

Findings of the standard audit of each repository, by impact. The false broken references are counted under Medium.
RepoHighMediumLowFalse broken references
kube-image-keeper
89c2850
075067 of 67
glances
7daaaeb
03131 of 1
dyad
1be2b4b
423517 of 18
  • kube-image-keeper: the most complete harness of the three, with allow, ask, and deny permissions, hooks, subagents, and skills. In the default mode, no destructive command on X-Ray's list passes without a prompt. What stands out are the Bash wildcard permissions that let code run, and also the noise: 67 of its 75 medium findings are false broken references.
  • glances: a minimal harness. Its 9 deny rules are written as Read: build/** rather than Read(build/**), and its 17 skills are loose files rather than folders with a SKILL.md. Neither is the format Claude Code documents, so they probably have no effect, although this was not checked in a real session.
  • dyad: the most permissive and the only one with high findings, so it was the only one to fail the continuous integration mode with --fail-on high. It allows Bash(git:*) with no ask or deny rule, and the scanner works out that git push --force and git reset --hard pass without a prompt.

What they showed about X-Ray

  • The full flow works. The commands ended with the expected exit code, and every report passed validation on the first try.
  • One rule makes too much noise. RUL-04 reported 86 broken references, and the agent judged 85 of them false: Go imports, names like owner/repo, or syntax like try/except.
  • The scanner does not see everything. It silently accepts badly written permission rules and skills that do not follow the format, and it does not measure hooks that approve commands instead of stopping them. Those problems came up only when reading the files.

These are three repositories and one pass over each: enough to see how X-Ray behaves, not to compare projects or calibrate its thresholds, which remain provisional. The numbers describe the harness at that commit, not the quality of the software, and may have changed. The analysis was static: no code from those projects ran, and no agent session was opened inside them. The full reports are not published.

How to try it

You need Node.js 22 or later and Claude Code. There are no dependencies to install.

git clone https://github.com/brahianDev21/harness-x-ray.git
cd harness-x-ray
claude

Inside Claude Code, ask scan this repo's harness: <path> or use the /xray-scan skill. The project you review must be outside the X-Ray folder, and you should not add it with --add-dir, because Claude Code would load its instructions into the session. The README explains the other options.

Its limits

  • It is a static analysis, not a full security audit: it reads files as text and runs no commands or hooks, so it cannot tell whether a hook really blocks what it promises.
  • Tokens are estimated from characters, not counted.
  • Checking live how a harness behaves is a second function that is in design and has no code yet.