cli-audit-xray — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited cli-audit-xray (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
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.
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.
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.$ARGUMENTS is the target to inspect:
src/ or the primary source directory at a shallow level.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 |
Bias down when unsure. A noisy X-Ray report is worse than a narrow one with strong evidence.
Before producing findings:
../gotchas.md if it exists.../shared/optimization-card.md for the canonical card contract.../shared/triage.md for tier/confidence semantics.../shared/done-gate.md and ../shared/gate-ladder.md when a candidate requires proof or benchmark..claude/tangle-partition.json to focus on god functions, cycles, and boundary functions.CONTRACTS.md before proposing rewrites that depend on behavior or invariants.Use references/semantic-optimization-graph.md for node types and mapping rules.
Extract:
Use references/optimization-families.md when looking for patterns.
Lift imperative regions into maps, filters, reductions, scans, joins, state machines, tensor operations, graph traversals, policy decisions, or equations. Do not force math when it adds no decision value.
Look for:
For each candidate, answer:
Use references/risk-rules.md for floating point, side effects, concurrency, and security boundaries.
Produce a Markdown report and, when running under cli-cycle or when writing files is allowed, emit .claude/cli-audit-xray.json following ../shared/result-schema.md.
# Semantic X-Ray Audit — {project-or-scope}
**Target**: {file/directory/hot path} | **Language**: {detected} | **Date**: {date}
**Scope tier**: S/M/L/XL | **Candidate count**: N
## Executive Summary
- Hidden structure found:
- Highest-leverage candidate:
- Highest-risk assumption:
- Next proof step:
## Semantic Map
### Dataflow
### Control Flow
### Resource Flow
### Trust / Security Boundaries
## Hidden Invariants
| Invariant | Evidence | Missing? | Downstream use |
## Optimization Candidates
{optimization cards using ../shared/optimization-card.md}
## Handoffs
| Target skill | Scope | Reason |
## Validation Plan
Map candidates to unit tests, property tests, benchmarks, trace comparisons, or contracts.| Condition detected | Recommend | Why |
|---|---|---|
| Candidate requires runtime measurement, profile, or A/B proof | /cli-forge-perf | Use native benchmark protocol and significance gate |
| Candidate depends on an implicit behavior invariant | /cli-audit-drift | Promote the invariant into CONTRACTS.md or verify existing contract |
| Candidate sits in a god function, cycle, or unclear boundary | /cli-audit-tangle | Restructure or isolate before optimizing |
| Candidate needs new property/unit/negative tests | /cli-audit-test | Validate equivalence and prevent regressions |
| Semantic graph is useful to humans (> 12 nodes or cross-boundary flow) | /cli-forge-schema | Render Mermaid from the semantic map |
| Candidate touches auth, DLP, audit logs, retry, backpressure, or failover | /cli-forge-resilience | Treat it as operational risk, not only optimization |
| Candidate needs a CI perf gate or reproducible baseline | /cli-forge-pipeline | Make the validation repeatable in CI |
Rule: Recommend, don't auto-execute. Phrase as: "Consider running /cli-forge-perf — candidate X needs a reproducible A/B benchmark."
When running under cli-cycle, audit targets that usually run earlier (cli-audit-tangle, cli-audit-drift, cli-audit-test) are report-only recommendations if they already ran. Do not emit backward automatic handoffs that create a cycle; use their existing outputs when available.
file:line evidence when source is available.| Skill | Relationship |
|---|---|
cli-forge-perf | X-Ray proposes benchmarkable candidates; perf proves or rejects them |
cli-audit-code | Code quality can flag local smells that X-Ray turns into semantic-cost candidates |
cli-audit-tangle | Tangle supplies topology and boundary functions; X-Ray supplies data/resource meaning |
cli-audit-drift | Drift supplies contracts; X-Ray supplies missing invariants and rewrite preconditions |
cli-audit-test | X-Ray identifies equivalence/property tests required by optimizations |
cli-forge-schema | Renders semantic maps and resource-flow diagrams |
cli-forge-pipeline | Turns recurring validation into CI gates |
cli-cycle | Can run X-Ray as an adaptive Wave 2/3 audit and aggregate its JSON envelope |
cli-audit-tangle for call graph partitioning.cli-audit-drift to check intention vs implementation.~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.