cli-audit-xray

cli-audit-xray is a skill for Claude Code, Codex from Destynova2/cli-code-skills. It costs 150 tokens per session (2,297 once invoked), scanned A, original, MIT.

A code-analysis guide that uncovers hidden meaning, data movement, resource use, and operational behavior before suggesting optimizations.

In plain words
What is it for?
Use it to examine functions, performance-critical code, AI inference pipelines, compilers, runtimes, and DevSecOps pipelines.
Why use it?
It helps avoid unsafe or unproven performance changes by stating assumptions, risks, and ways to check each suggestion.

Skill for Claude CodeCodex

Part of the cli-code-skills plugin — 36 skills 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 skills/destynova2/cli-code-skills/cli-audit-xray
Any agent
npx skills add Destynova2/cli-code-skills --skill cli-audit-xray
Clone the repo
git clone --depth 1 https://github.com/Destynova2/cli-code-skills

Made for: Claude Code, Codex.

Or install cli-code-skills, the plugin that ships this one along with the rest of its 36 skills.

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 cli-audit-xray

README.md
[![agentmods](https://agentmods.dev/badge/skills/destynova2/cli-code-skills/cli-audit-xray.svg)](https://agentmods.dev/skills/destynova2/cli-code-skills/cli-audit-xray)
Your own site
<a href="https://agentmods.dev/skills/destynova2/cli-code-skills/cli-audit-xray"><img src="https://agentmods.dev/badge/skills/destynova2/cli-code-skills/cli-audit-xray.svg" alt="Measured on agentmods" height="20"></a>
Per session 150 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,297 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 $0.00150 $0.02297
Opus 5 $0.00075 $0.01149
Sonnet 5 $0.00030 $0.00459
Haiku 4.5 $0.00015 $0.00230

Measured 3d ago against content hash 7545b3969997, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

cli-audit-xray 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 3d 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.

cli-audit-xray/SKILL.md · 213 lines

How it starts

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

Optimization: This skill uses on-demand loading. Heavy content lives in references/ and is loaded only when needed.

Language rule: Skill instructions are written in English. When generating user-facing output (reports, files, documentation), detect the project's primary language (from README, comments, docs, commit messages) and produce the output in that language. If the project is bilingual, ask the user which language to use before proceeding.

Audit X-Ray — Semantic Optimization Scanner

Reveal what the code is really doing before proposing optimizations. The output is not "make it faster"; it is a ranked set of falsifiable optimization candidates with locations, invariants, validation methods, and handoffs to the skills that can prove or implement the next step.

Core rule:

First reveal structure. Then propose hypotheses. Then classify risk. Then validate.

What This Skill Adds

cli-audit-xray sits between static code quality, topology, drift, and performance work:

  • cli-audit-code finds quality smells; X-Ray finds hidden semantic cost in otherwise acceptable code.
  • cli-audit-tangle finds graph shape; X-Ray adds dataflow, resource flow, and optimization meaning to hot or tangled paths.
  • cli-audit-drift checks code against contracts; X-Ray extracts missing invariants that should become contracts.
  • cli-forge-perf proves runtime gains; X-Ray produces candidates worth benchmarking.

Input

$ARGUMENTS is the target to inspect:

  • Function or file: build a focused Semantic Optimization Graph around that code.
  • Directory: sample likely hot paths, entrypoints, adapters, pipelines, and large loops.
  • Trace/flamegraph/profile path: use the dynamic evidence to focus static inspection.
  • Empty: inspect src/ or the primary source directory at a shallow level.

Mitosis — Scale Analysis to Scope

Reference ../shared/tiering.md for canonical S/M/L/XL semantics.

Scope Tier Behavior
One function / one hot path S Full semantic map + up to 5 optimization cards
One file / small module M Dataflow + resource flow + ranked cards
Directory / service slice L Sample top 10-15 risky paths; use tangle/perf evidence if available
Monorepo / distributed system XL Do not deep-scan everything; produce map of candidate zones and handoffs

Read the full file on GitHub · 213 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 3d ago First seen · 213 lines · 150 tokens per session scan A 7545b3969997

Subscribe to this mod's changes

cli-audit-xray is a skill published in the GitHub repository Destynova2/cli-code-skills (5 stars, last pushed 11d ago), licensed MIT. It adds 150 tokens to every session and 2,297 once invoked, about $0.0007 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-31.