Agent skill

Xray

by majiayu000 in majiayu000/spellbook

Investigate how a concept, code path, application, network flow, system, incident, document, or local artifact actually works, then deliver a two-depth visual HTML explainer with a dead-simple…

MITAuto-check passedSecurity

Install Xray

skills CLI
$ npx skills add majiayu000/spellbook --skill xray -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install majiayu000/spellbook xray --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/majiayu000/spellbook.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/xray .claude/skills/xray && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
xray
GitHub stars
287
Token cost
~3.4k tokens
SKILL.md length
1,768 words
Files
12 (incl. scripts, references, assets)
Skills in repo
97
Repo updated
First seen
Licence
MIT

At a glance

Investigate how a concept, code path, application, network flow, system, incident, document, or local artifact actually works, then deliver a two-depth visual HTML explainer with a dead-simple…

  • Works in 7 steps: Frame the teaching question → Acquire ground truth → Form the causal model → …
  • The user invokes $xray
  • SKILL.md covers Operating Boundary, Investigate, Done When and Gotchas, plus 1 more section
  • Runs Shell scripts from its folder

What it does

Xray is an agent skill from majiayu000/spellbook. Investigate how a concept, code path, application, network flow, system, incident, document, or local artifact actually works, then deliver a two-depth visual HTML explainer with a dead-simple big-picture first layer and source-backed technical depth behind it. Use when the user invokes $xray, asks how something works under the hood, wants a module or app behavior traced across boundaries, requests web, code, network, or safe static artifact research before explanation, or asks for an evidence-backed explainer…

Its SKILL.md is about 3.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 16 other files, including scripts, reference files and assets (for example `agents/openai.yaml`, `evals/evals.json` and `references/chinese-writing.md`).

It sits in Security, covering Reverse engineering and malware and Authorization and RBAC. The repository describes itself as: Cross-runtime skills for Claude Code, Codex, and multi-agent workflows. The licence is MIT.

When your agent uses it

  • The user invokes $xray
  • Asks how something works under the hood
  • App behavior traced across boundaries
  • Safe static artifact research before explanation

Example prompts

  • “/xray”

Requirements

  • A Bash shell

Workflow steps

7 steps, taken from the step headings in SKILL.md.

  1. Frame the teaching question
  2. Acquire ground truth
  3. Form the causal model
  4. Design the visual story
  5. Write for a person
  6. Render the artifact
  7. Verify before delivery

What it can do on your machine

Read from SKILL.md and the folder at commit ed52af7. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Shell), which the agent can run.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Xray loads about 3.4k tokens when it runs, and up to ~11k if it reads all its reference files. Until then it costs about 169 tokens; SKILL.md has 1,768 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~169
When it runs · the whole SKILL.md, loaded when a task matches
~3.4k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~11k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from majiayu000/spellbook at commit ed52af7, republished under its MIT licence (© majiayu000). 1,768 words, ~3,387 tokens.

Download SKILL.mdSave it as .claude/skills/xray/SKILL.md (or your agent's skills folder). This skill also uses 11 other files; get the full folder from GitHub.
name
xray
description
Investigate how a concept, code path, application, network flow, system, incident, document, or local artifact actually works, then deliver a two-depth visual HTML explainer with a dead-simple big-picture first layer and source-backed technical depth behind it. Use when the user invokes $xray, asks how something works under the hood, wants a module or app behavior traced across boundaries, requests web, code, network, or safe static artifact research before explanation, or asks for an evidence-backed explainer. Do not use for answer-only definitions, general web design, full codebase audits, or invasive binary reverse engineering without explicit authorization.

X-Ray Explainer

Investigate first and explain second. The HTML is a projection of verified understanding, not decoration around an early guess.

Operating Boundary

  • Directly perform read-only research, repository inspection, log/config examination, source archaeology, and creation of the requested explainer artifact.
  • When the user asks to analyze a clearly identified app, CLI, or local compiled artifact they are entitled to inspect, include safe read-only static inspection when it can answer the teaching question. Record identity and hash first; inspect metadata, signatures, dependencies, imports, recoverable symbols, strings, entitlements, and bundled resources without modifying or executing the target.
  • For an authorized native binary or compiled CLI, load $claude-code-reverse first and use its tested extract.sh workflow as the canonical identity, hash, cache, and safe static baseline. Do not duplicate that baseline inside X-Ray.
  • When the canonical static baseline cannot establish the requested mechanism, or the authorized target is an APK, JavaScript bundle, or protocol flow, read reverse-core.md. Load only the matching specialist adapter, use tools already available in the environment, and return its evidence to the ordinary X-Ray causal model. Reverse Core is an internal depth route, not a second user-facing skill or a reason to install a full security pack.
  • Ask before executing an unknown binary, attaching a debugger, intercepting or decrypting traffic, patching an artifact, installing reverse-engineering tools, using a paid endpoint, touching production, accessing credentials, or changing product code.
  • Never bypass access controls, fabricate evidence, or treat agreement between models as corroboration.
  • If the target, revision, authorization, or intended audience would materially change the investigation, clarify that one fact before acting.

Investigate

Read research-routing.md, then choose the narrowest route that can answer the question.

TargetDefault route
Stable concept with adequate supplied materialExplain from supplied evidence; verify pivotal facts only
Current, niche, disputed, or unfamiliar topicSearch the web; prefer primary and authoritative sources
Repository, module, app behavior, API path, or architectureTrace the reachable path across code, network, persistence, and background work
Incident or wrong runtime behaviorInspect persisted state, logs, metrics, running revision, then code
Clearly identified local app, CLI, or compiled artifactUse $claude-code-reverse for the native static baseline, then load one Reverse Core specialist adapter only if the question remains unresolved

Do not invoke extra agents or external AI systems by default. Add them only when the user requests delegation or a separate workflow explicitly requires it.

Announce each stage in one line as it begins: the stage name, what is being checked, and the next visible output. A long investigation must never go silent while the user waits.

1. Frame the teaching question

Write one sentence naming what the reader must understand or decide after viewing the explainer. Default to a curious adult who is new to the topic; never infantilize the reader.

2. Acquire ground truth

Read evidence-contract.md. For code or runtime targets, also read code-archaeology.md.

  • Establish the exact target and relevant version before explaining it.
  • For a compiled target, record the artifact path, cryptographic hash, architecture, and signature before drawing conclusions. Treat strings, imports, symbols, and decompiled fragments as clues until another observation establishes their role.
  • For authorized specialist reverse work, keep the reverse phase bounded to the teaching question. Prefer one reachable path over exhaustive decompilation, and bring exact addresses, symbols, tool versions, and uncertainty back into the same evidence model.
  • Search the local target before searching the web for explanations of it.
  • Use web research for current, niche, disputed, unfamiliar, or explicitly source-backed claims.
  • For incidents, prefer the actual persisted state and running revision over remembered browser behavior or design intent.
  • For application behavior, follow the user action through internal control flow, network boundaries, server handling, persistence or background work, and the result or failure path. Inspect or capture traffic only when it is safe, authorized, and materially useful.
  • Keep exact URLs, code anchors, revision identifiers, timestamps, and uncertainty for the claims that matter to the explanation.
3. Form the causal model
  • Write scratch notes in whatever form helps distinguish evidence from interpretation; do not create a manifest or fixed ledger unless the task genuinely benefits from one.
  • Identify the input, meaningful transformations or decisions, state changes, outputs, and failure boundaries that explain the behavior. Use as many or as few steps as the mechanism needs.
  • State confirmed behavior plainly. Label material inference and unknowns where a reader could otherwise mistake them for fact; do not badge every sentence mechanically.
  • Preserve technical truths that affect behavior. Simplify vocabulary, not causality.
  • Introduce a real mechanism before using an analogy. Label where the analogy stops matching reality.
  • Keep unresolved contradictions and missing evidence visible.
4. Design the visual story

Read visual-explanation.md. Choose the diagram from the causal structure: flow, sequence, state machine, architecture, timeline, comparison, or a small simulator.

When the investigation produces meaningful technical evidence, project the same causal model at two depths:

  • The orientation layer comes first. Give the shortest accurate answer and one dominant, plain-language visual that a newcomer can understand without reading the evidence layer. Lead with how the subject works, not what the researcher inspected.
  • The evidence layer follows or expands on demand. Preserve code symbols, network branches, persistence, failure behavior, sources, and material unknowns for readers who want to verify or continue digging.

Keep the first layer visually quiet and low in terminology. Move implementation detail down instead of deleting it. Do not impose a fixed word count, step count, card count, or DOM structure; use the smallest first layer that carries the real mechanism. A genuinely simple topic does not need a padded second layer.

5. Write for a person
  • For a Chinese explainer, read and apply chinese-writing.md after the evidence and causal model are stable. Use this built-in writing pass to revise headings, body copy, captions, and the handoff so the prose sounds like a knowledgeable person walking the reader through what they found.
  • Keep technical literals, code symbols, versions, direct quotations, uncertainty, and citation meaning unchanged during the prose pass. When naturalness and precision conflict, preserve precision and rewrite the surrounding sentence.
  • Let concrete observations carry the explanation. Remove report-like labels, repetitive summaries, symmetrical card copy, fake suspense, and generic insight phrases.
  • For other languages, match the same audience-aware standard without forcing Chinese writing rules onto the text.
Show full SKILL.md (707 more words)Show less
6. Render the artifact
  • Produce one self-contained HTML file with inline CSS and SVG or canvas. Avoid remote fonts, scripts, images, and stylesheets; ordinary source links are allowed.
  • Create the artifact in a temporary task directory by default. Put it in a project only when the user requests a durable project artifact.
  • Organize the page around the teaching question. Do not force fixed sections, card counts, or diagram shapes.
  • State the teaching question in the reader's language at the top of the page. When the page uses evidence markers, put a short legend at their first use so a first-time reader can decode Observed, Corroborated, Inferred, and Unknown without leaving the page.
  • Keep the orientation layer visible before technical inventory, provenance, or methodology. Use progressive disclosure when the evidence layer would otherwise compete with the main explanation.
  • Keep source markers adjacent to the claim or diagram step they support.
  • Use JavaScript only when interaction materially teaches the mechanism.
7. Verify before delivery

Open or render the page at a desktop and narrow viewport when a renderer is available. When no interactive renderer is at hand, scripts/render-check.sh uses an installed Playwright CLI to capture the complete page at both widths in a fresh output directory. Re-check every full-bleed or negative-margin block at the narrow width; it is the classic source of silent horizontal overflow. Inspect clipping, overflow, legibility, unresolved placeholders, source-link behavior, and whether the visual sequence still makes sense without narration. Exercise any interaction that carries explanatory meaning. If no renderer is available at all, report visual verification as incomplete instead of implying it passed.

Done When

  • Pivotal claims are traceable to current evidence or explicitly labeled inference/unknown.
  • Repository explanations include exact paths and symbols; web explanations include direct source URLs.
  • Specialist reverse explanations identify the exact artifact and tool, preserve address or symbol anchors, distinguish static clues from reachable behavior, and disclose any action that crossed the static-analysis boundary.
  • The mechanism is simpler than the source material without losing a behavior-changing fact.
  • A reader can understand and remember the central mechanism from the orientation layer alone, while the evidence layer still supports the technical claims.
  • Chinese prose has received the built-in Chinese writing pass without changing evidence or technical meaning.
  • The page has been checked in proportion to its complexity; when possible, it has been visually inspected at wide and narrow widths.
  • The page opens with its teaching question and, when it uses evidence markers, carries a short legend a first-time reader can decode.
  • The final response links the artifact and briefly states sources, uncertainty, and any boundary that prevented deeper investigation.

Gotchas

  • “Few words” does not mean “few facts.” Remove repetition before removing causal steps.
  • Deep research does not earn the first screen. Packaging, methodology, provider matrices, hashes, and source inventories belong below the central mechanism unless one of them is the teaching question.
  • A beautiful diagram of an unverified mechanism is still wrong.
  • Safe static inspection of an identified local artifact belongs in ordinary X-Ray investigation. Debugging, interception, patching, protection bypass, credential access, and execution of an unknown artifact are separate authorization levels.
  • Multiple model answers are leads, not independent sources.
  • Local code and runtime evidence outrank generic web explanations of a similarly named system.
  • Do not turn the investigation into an exhaustive audit. Stop when further research would add detail without changing the causal model.
  • Do not dump a reverse-engineering tool inventory into the explainer. Load one matching adapter, collect the evidence that changes the causal model, then return to X-Ray.
  • Do not turn quality guidance into a hardcoded content validator. Use judgment for semantic quality and ordinary rendering or syntax checks for mechanical defects.
  • Do not let a prose rewrite strengthen a claim, erase a limitation, or detach a citation from the fact it supports.
  • Avoid decorative dashboards, excessive cards, and meaningless animation. Every visual element must teach a relationship.
  • When evidence is insufficient, explain what is known, what is unknown, and the next cheapest observation that would resolve it.

Drift and Feedback

Representative prompts live in evals/evals.json. When a run produces invented anchors, missing citations, shallow research, text walls, or a misleading visual structure, patch the smallest responsible instruction, reference, template, or eval case rather than expanding the main instructions indiscriminately.

© majiayu000, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 11 other files (scripts, references, assets) in skills/xray of majiayu000/spellbook.

  • SKILL.md
  • agents/openai.yaml
  • assets/concept-explainer.html
  • assets/feature-explainer.html
  • evals/evals.json
  • references/chinese-writing.md
  • references/code-archaeology.md
  • references/evidence-contract.md
  • references/research-routing.md
  • references/reverse-core.md
  • references/visual-explanation.md
  • scripts/render-check.sh

Open the folder on GitHubat commit ed52af7

Compare with similar skills

Xray next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Xray compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Xray this skillmajiayu000/spellbook287—~3.4kAutomated safety check: PassMIT
Azure Firmware AnalysisMicrosoftDocs/Agent-Skills776—~1.2kAutomated safety check: PassCC-BY-4.0
vphone600 Kernel Symbol AnalysisLakr233/vphone-cli15k—~530Automated safety check: PassMIT
Strix Code Vulnerability Scanusestrix/strix68k—~1.1kAutomated safety check: PassApache-2.0
Webhome Extension Builderwebhtv/webhtv1.7k—~2.8kAutomated safety check: PassGPL-3.0
Create Sigma RuleTracecatHQ/tracecat3.8k—~16kAutomated safety check: PassMIT

Similar skills

  • Azure Firmware Analysis

    MicrosoftDocs/Agent-Skills

    Official

    Expert knowledge for Azure Firmware Analysis development including best practices, security, integrations & coding patterns, and deployment.

    776 GitHub stars~1.2k tokensUpdated 5 days ago
    DevOps & CloudAuto-check passed
  • Looks up symbols and addresses in vphone600 release and research kernel datasets, and cross-references XNU source, with findings that separate fact from inference.

    15k GitHub stars~530 tokensUpdated today
    SecurityAuto-check passed
  • Runs a Strix white-box security review that reads the source, then exploits what it finds in a sandbox so each reported issue has a proof-of-concept.

    68k GitHub stars~1.1k tokensUpdated today
    SecurityAuto-check passed
  • Build, review, debug, reverse-engineer, and package WebHome injected extension scripts for FongMi/WebHome App WebView pages.

    1.7k GitHub stars~2.8k tokensUpdated 2 days ago
    SecurityAuto-check passed
  • Create Sigma Rule

    TracecatHQ/tracecat

    Turns a threat report, a malware analysis, vendor tool documentation, or a raw log sample into draft Sigma detection rules, validated against sigma-cli where a shell exists and labelled "not…

    3.8k GitHub stars~16k tokensUpdated today
    SecurityAuto-check passed
  • Website Rebuild

    boyang-hu/website-rebuild-skill

    1:1 rebuild of award-winning creative websites (WebGL / scroll-animation / portfolio sites).

    1.4k GitHub stars~6.1k tokensUpdated 1 mo ago
    SecurityAuto-check passed

More from majiayu000/spellbook

All 97 skills in this repo
  • Skill Ecosystem Doctor

    majiayu000/spellbook

    Audits and repairs how coding-agent Skills are owned, copied and exposed across runtimes, from canonical sources to quarantine and retirement.

    287 GitHub stars~3k tokensUpdated 2 days ago
    Auto-check passed
  • AGENTS.md Scaffold

    majiayu000/spellbook

    Scans a repository for real evidence and proposes, or on request writes, a small stack of root and scoped AGENTS.md files with validation commands and generated-file boundaries.

    287 GitHub stars~1.5k tokensUpdated 2 days ago
    Auto-check passed
  • Product Demo Builder

    majiayu000/spellbook

    Plans, produces or diagnoses evidence-backed product demo videos: script, capture plan, pacing checks and verified final media built on real product behavior.

    287 GitHub stars~3.3k tokensUpdated 2 days ago
    Auto-check passed
  • Flowguard Task Guard

    majiayu000/spellbook

    Single entry point that routes long or ambiguous agent tasks, checks live state, bounds autonomous loops and leaves a resumable handoff.

    287 GitHub stars~2.1k tokensUpdated 2 days ago
    Auto-check passed
  • npm Supply Chain Check

    majiayu000/spellbook

    Scans a repository, its lockfiles and node_modules for known malicious npm package versions and install-time indicators, using a read-only Python scanner.

    287 GitHub stars~1.5k tokensUpdated 2 days ago
    Auto-check passed
  • Product Manager Toolkit

    majiayu000/spellbook

    Product management helpers: a RICE scoring script, an interview transcript analyzer and PRD templates for prioritizing features, synthesizing research and writing requirements.

    287 GitHub stars~2.2k tokensUpdated 2 days ago
    Auto-check passed

Categories

Questions about Xray

What does Xray do?

Investigate how a concept, code path, application, network flow, system, incident, document, or local artifact actually works, then deliver a two-depth visual HTML explainer with a dead-simple…. Xray is an agent skill from majiayu000/spellbook. Investigate how a concept, code path, application, network flow, system, incident, document, or local artifact actually works, then deliver a two-depth visual HTML explainer with a dead-simple big-picture first layer and source-backed technical depth behind it.

When should I use Xray?

Xray fits situations like: the user invokes $xray; asks how something works under the hood; app behavior traced across boundaries; safe static artifact research before explanation.

How do I install Xray in Claude Code?

Run `npx skills add majiayu000/spellbook --skill xray -a claude-code`. Or copy the skill folder (skills/xray in majiayu000/spellbook) into .claude/skills/xray in your project. Claude Code loads it when a task matches its description.

How do I install Xray in Codex?

Run `npx skills add majiayu000/spellbook --skill xray -a codex`. Or copy the skill folder (skills/xray in majiayu000/spellbook) into .agents/skills/xray in your project. Codex loads it when a task matches its description.

Can I use Xray in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add majiayu000/spellbook --skill xray -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/xray, .gemini/skills/xray, .github/skills/xray and .opencode/skills/xray in your project.

What does Xray need to run?

Going by SKILL.md and its folder, Xray needs a shell for the scripts in its folder. Our summary lists: A Bash shell.

Does Xray access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Xray safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Xray use?

Xray is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Xray use?

About 3.4k tokens (SKILL.md is roughly 14k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 7.1k tokens, read only when the agent opens those files.

What are the alternatives to Xray?

Skills that share tags, products or a category with Xray: Azure Firmware Analysis (MicrosoftDocs/Agent-Skills, 776 stars), vphone600 Kernel Symbol Analysis (Lakr233/vphone-cli, 15k stars), Strix Code Vulnerability Scan (usestrix/strix, 68k stars) and Webhome Extension Builder (webhtv/webhtv, 1.7k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Xray?

majiayu000 (a GitHub user) maintains it in majiayu000/spellbook, which has 287 GitHub stars. The repository holds 97 skills in this directory. The repository was last updated on October 8, 2026.

Source: majiayu000/spellbook on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.