https://github.com/dubsopenhub/agent-xray
๐ฌ Scan Visor for AI agents. One command scans your fleet, scores 6 vital dimensions, and shows you exactly which suit upgrades to grab. Hit Save. Done. ๐ก๏ธ
https://github.com/dubsopenhub/agent-xray
Last synced: 1 day ago
JSON representation
๐ฌ Scan Visor for AI agents. One command scans your fleet, scores 6 vital dimensions, and shows you exactly which suit upgrades to grab. Hit Save. Done. ๐ก๏ธ
- Host: GitHub
- URL: https://github.com/dubsopenhub/agent-xray
- Owner: DUBSOpenHub
- License: mit
- Created: 2026-02-25T06:21:28.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2026-04-10T17:22:55.000Z (4 months ago)
- Last Synced: 2026-07-07T22:21:29.213Z (23 days ago)
- Language: JavaScript
- Homepage:
- Size: 150 KB
- Stars: 2
- Watchers: 0
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ๐ฌ Agent X-Ray
> *Your agent is about to drop onto a hostile planet. What's their suit status?*
Agent X-Ray scans your AI agent's prompt and reveals exactly which suit upgrades they're missing โ before they get wrecked by Space Pirates.
๐ **[Learn more about Agent X-Ray by reading the blog post โ](BLOG.md)** *"I Didn't Pick the Idea. I Didn't Write the Code. Here's What I Learned."* โ More about Agent X-Ray and how it was built: 14 AI models competing for the idea, Dark Factory assembling it in 19 minutes, and the accidental recursive loop that followed.
---
๐ **Works in any terminal.** Scans any `.md` agent prompt โ Copilot, ChatGPT, Claude, LangChain, CrewAI, or your own custom agents. Zero dependencies. Just Node.js.
๐ญ **v1.0 built with [Dark Factory](https://github.com/DUBSOpenHub/dark-factory)** โ 6 AI agents, [sealed-envelope testing](https://github.com/DUBSOpenHub/shadow-score-spec), 0% gap score. [Read the build log โ](DARK-FACTORY.md)
```
node agent-xray.js my-agent.md
```
```
๐ฌ agent-xray: my-agent.md (1848 words)
๐ฅ Role Clarity [ 75] โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ ๐ข๐ข๐ข๐ขโฌ
๐ก๏ธ Constraint Density [ 70] โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ ๐ข๐ข๐ข๐ขโฌ
๐ก Hallucination Guardrails [ 26] โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ ๐ดโฌโฌโฌโฌ
๐บ๏ธ Output Specificity [ 48] โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ ๐ก๐กโฌโฌโฌ
๐ฏ Testability [ 31] โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ ๐ด๐ดโฌโฌโฌ
โก Escape Hatches [ 12] โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ ๐ดโฌโฌโฌโฌ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ฌ Composite [ 44] โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ ๐ก๐กโฌโฌโฌ
โ ๏ธ Suit incomplete. Visit the Chozo Statue.
```
> โก **Get started fast!** Clone and run in one line:
> ```bash
> git clone https://github.com/DUBSOpenHub/agent-xray.git && cd agent-xray && node agent-xray.js my-agent.md
> ```
## Why This Tool?
Ever send your agent on a mission and they come back with completely fabricated data? Or freeze when they hit something unexpected? That's an agent with no suit upgrades.
Agent X-Ray activates the **Scan Visor** on your agent's prompt. Did you tell them not to make things up? That's their ๐ก Scan Visor โ separating real data from hallucinations. Did you tell them what to do when they're stuck? That's their โก Energy Tank โ keeping them alive when things go sideways. Did you define their output format? That's their ๐บ๏ธ Area Map โ so they don't wander through uncharted territory.
Most agents ship with half their suit systems offline. They work โ until they don't. Agent X-Ray reveals the empty upgrade slots so you can power up before your agent gets space-wrecked in production.
Scan. Upgrade. Rescan. Full energy. ๐ข๐ข๐ข
## ๐ Quick Start
```bash
git clone https://github.com/DUBSOpenHub/agent-xray.git
cd agent-xray
# Scan any agent prompt
node agent-xray.js path/to/my-agent.md
# Scan an entire folder of agents
node agent-xray.js --fleet ~/.copilot/agents/
```
That's it. Point it at any `.md` file with agent instructions. No dependencies. No setup. Just answers.
## ๐บ๏ธ The 6 Dimensions
Think of your AI agent dropping onto a hostile planet.
**Without Agent X-Ray**, your agent lands with no beam weapon, no suit shielding, no scan visor, and no map data. They might survive โ but one ambush from a Space Pirate and they're done.
**Agent X-Ray activates the Scan Visor on your prompt and shows you what's missing โ so you know exactly which upgrades to grab:**
| Dimension | Metroid Equivalent | What Happens Without It |
|-----------|-------------------|------------------------|
| ๐ฅ **Role Clarity** | Power Beam | Your agent has no primary weapon โ they're punching Space Pirates bare-handed |
| ๐ก๏ธ **Constraint Density** | Varia Suit | No shielding = no defense. Every bad input burns through |
| ๐ก **Hallucination Guardrails** | Scan Visor | Nobody stops your agent from fabricating fake scan data |
| ๐บ๏ธ **Output Specificity** | Area Map | Without it, your agent wanders โ output is random, uncharted |
| ๐ฏ **Testability** | Lock-On Targeting | Can you even tell if your agent hit the target? |
| โก **Escape Hatches** | Energy Tank | When your agent takes a critical hit mid-task, there's nothing to keep them alive |
**Run the scan. Grab the missing upgrades. Send your agent back in with a fully powered suit.**
Each dimension: **0โ100**. Composite: **arithmetic mean**.
## ๐ฎ More Missions
### ๐ฌ Scan one agent
```bash
node agent-xray.js my-agent.md
```
### ๐
Forge a Badge
```bash
node agent-xray.js my-agent.md --badge badge.svg
```
### ๐ก JSON output for CI
```bash
node agent-xray.js my-agent.md --json
```
```json
{
"file": "my-agent.md",
"scores": {
"roleClarity": 75,
"constraintDensity": 70,
"hallucinationGuards": 26,
"outputSpecificity": 48,
"testability": 31,
"escapeHatches": 12
},
"composite": 44
}
```
### ๐ฎ X-Ray Scope โ self-test your Copilot agents
```bash
node agent-xray.js --self-test
```
Scans `~/.copilot/agents/`. Exits 0 if all agents score โฅ 50, exits 1 if any are below. Put it in CI โ gate your agents like Mother Brain.
## โก Energy Meter
| Score | Energy | Status |
|-------|--------|--------|
| 0โ39 | ๐ด๐ด๐ด | Critical energy โ one hit from a Space Pirate and they're done |
| 40โ69 | ๐ก๐ก๐ก | Partial suit โ survivable but vulnerable |
| 70โ100 | ๐ข๐ข๐ข | Full power โ ready for Ridley |
## ๐๏ธ Visit the Chozo Statue
Your agent scored low? The Chozo have left upgrades for you.
```
โโโโโ
โ โ โ
โโโ โโโ
โ โโโโโบ โ
โ โฑ โฒ โ
โโโฑ โฒโโ
โช da da da DA DAAAA โช
```
Paste the lines below into your agent prompt. Each one powers up a different suit system.
---
### ๐ฅ POWER BEAM ACQUIRED โ Role Clarity
- *"You are a [specific role]. Your job is to [specific task]."*
- *"Your responsibilities include [list]. You do not handle [exclusions]."*
- *"Act as an expert in [domain]."*
### ๐ก๏ธ VARIA SUIT ACQUIRED โ Constraint Density
- *"Never perform destructive operations without confirmation."*
- *"You must stay within the scope of [boundary]."*
- *"Do not access files outside the current working directory."*
### ๐ก SCAN VISOR ACQUIRED โ Hallucination Guardrails
- *"Do not fabricate data or error messages."*
- *"If you are unsure, say so explicitly."*
- *"Only cite verified sources."*
### ๐บ๏ธ AREA MAP ACQUIRED โ Output Specificity
- *"Format all output as markdown with headings."*
- *"Limit response to a maximum of 100 lines."*
- *"Start your response with a one-line summary."*
### ๐ฏ LOCK-ON ACQUIRED โ Testability
- *"Given input X, the expected output is Y."*
- *"For example: if asked to [task], respond with [format]."*
- *"The output should be deterministic โ same input, same result."*
### โก ENERGY TANK ACQUIRED โ Escape Hatches
- *"If you cannot complete the task, escalate to the user."*
- *"When uncertain, default to read-only mode."*
- *"Fall back to reporting the error without attempting a fix."*
---
Rescan. Watch the energy tanks fill up. ๐ข๐ข๐ข
### ๐ Where are my agent files?
| Platform | Path |
|----------|------|
| Copilot CLI agents | `~/.copilot/agents/*.agent.md` |
| Repo-level instructions | `.github/copilot-instructions.md` |
| Custom agents (repo) | `.github/agents/*.md` |
Open the file, paste the lines above, save, rescan. That's it.
## โ๏ธ How It Works
No magic. No AI. Just pattern matching. Think of it as the Scan Visor โ it locks on to keywords in your prompt and tells you what's really there.
It searches for patterns like `"you are"`, `"never"`, `"do not fabricate"`, `"for example"`, `"if you cannot"` and scores based on their presence and density.
**Deterministic**: same file โ same score, every time. No RNG on this space station.
## ๐ Requirements
- Node.js 18+
- macOS, Linux, or Windows
- Works in any terminal โ no GitHub Copilot CLI required
- That's it. No side missions.
## License
MIT
---
๐ญ **v1.0 built with [Dark Factory](https://github.com/DUBSOpenHub/dark-factory)** โ 6 AI agents, [sealed-envelope testing](https://github.com/DUBSOpenHub/shadow-score-spec), 0% gap score. [Read the build log โ](DARK-FACTORY.md)
---
## ๐ Created with ๐ by [@DUBSOpenHub](https://github.com/DUBSOpenHub) with the [GitHub Copilot CLI](https://docs.github.com/copilot/concepts/agents/about-copilot-cli).
Let's build! ๐โจ