Official agent skill

Trailmark Structural

by trailofbits in trailofbits/skills

Runs full Trailmark structural analysis by building a graph, running preanalysis(), and reporting hotspots, taint, blast radius, privilege boundaries, attack surface, and version-gated Trailmark…

OfficialCC-BY-SA-4.0Auto-check: notesSecurity

Install Trailmark Structural

skills CLI
$ npx skills add trailofbits/skills --skill trailmark-structural -a claude-code

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

GitHub CLI
$ gh skill install trailofbits/skills trailmark-structural --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/trailofbits/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/trailmark/skills/trailmark-structural .claude/skills/trailmark-structural && 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
trailmark-structural
GitHub stars
7.4k
Token cost
~1.5k tokens
SKILL.md length
458 words
Files
3 (incl. assets)
Skills in repo
79
Repo updated
First seen
Licence
CC-BY-SA-4.0

At a glance

Runs full Trailmark structural analysis by building a graph, running preanalysis(), and reporting hotspots, taint, blast radius, privilege boundaries, attack surface, and version-gated Trailmark…

  • Vivisect needs detailed structural data for a target
  • SKILL.md covers When to Use, When NOT to Use, Rationalizations to Reject and Usage, plus 1 more section
  • Calls uv, python3 and pip
  • Tasks that involve Threat modeling

What it does

Trailmark Structural is an agent skill from trailofbits/skills, published by the product's own GitHub organization. Runs full Trailmark structural analysis by building a graph, running preanalysis(), and reporting hotspots, taint, blast radius, privilege boundaries, attack surface, and version-gated Trailmark 0.4+/0.5+ data such as proxy counts, subgraph edges, type/reference summaries, and entrypoint attributes. Use when vivisect needs detailed structural data for a target. Triggers: structural analysis, blast radius, taint analysis, complexity hotspots, proxy nodes, type references.

Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including assets (for example `agents/openai.yaml`).

It sits in Security, covering Threat modeling and Static analysis and SAST. The repository describes itself as: Trail of Bits Claude Code skills for security research, vulnerability detection, and audit workflows. The licence is CC-BY-SA-4.0.

When your agent uses it

  • Vivisect needs detailed structural data for a target
  • Tasks that involve Threat modeling
  • Tasks that involve Static analysis and SAST

Example prompts

  • “/trailmark-structural”

Requirements

  • Python 3
  • Pre-approved tools (allowed-tools): Bash, Read, Grep, Glob

What it can do on your machine

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

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Bash
    • Read
    • Grep
    • Glob

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • uv
    • python3
    • pip
    • git

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

  • Network

    No URLs in SKILL.md. Its commands use uv, pip and git, which can reach the network depending on how they are called.

    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

Trailmark Structural loads about 1.5k tokens when it runs. Until then it costs about 125 tokens; SKILL.md has 458 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~125
When it runs · the whole SKILL.md, loaded when a task matches
~1.5k

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: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Bash, Read, Grep, Glob

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); files beside SKILL.md are not scanned.

SKILL.md

The full file from trailofbits/skills at commit 82fe822, republished under its CC-BY-SA-4.0 licence (© trailofbits). 458 words, ~1,548 tokens.

Download SKILL.mdSave it as .claude/skills/trailmark-structural/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
trailmark-structural
description
Runs full Trailmark structural analysis by building a graph, running `preanalysis()`, and reporting hotspots, taint, blast radius, privilege boundaries, attack surface, and version-gated Trailmark 0.4+/0.5+ data such as proxy counts, subgraph edges, type/reference summaries, and entrypoint attributes. Use when vivisect needs detailed structural data for a target. Triggers: structural analysis, blast radius, taint analysis, complexity hotspots, proxy nodes, type references.
allowed-tools
Bash, Read, Grep, Glob

Trailmark Structural Analysis

Builds a Trailmark graph and runs engine.preanalysis() to compute all four pre-analysis passes. The core workflow is v0.2-safe; v0.4-only details are included only after checking method availability, and newer builds enrich the same output (0.5.0+ adds an attributes key to attack-surface entries and proxy.external:* nodes from .trailmark/links.toml) without any workflow change.

When to Use

  • Vivisect Phase 1 needs full structural data (hotspots, taint, blast radius, privilege boundaries)
  • Detailed pre-analysis passes for a specific target scope
  • Generating complexity and taint data for audit prioritization
  • Inspecting proxy/unresolved-call counts, subgraph edges, or type-reference summaries when Trailmark 0.4.0+ is installed

When NOT to Use

  • Quick overview only (use trailmark-summary instead)
  • Ad-hoc code graph queries (use the main trailmark skill directly)
  • Target is a single small file where structural analysis adds no value

Rationalizations to Reject

RationalizationWhy It's WrongRequired Action
"Summary analysis is enough"Summary skips taint, blast radius, and privilege boundary dataRun full structural analysis when detailed data is needed
"One pass is sufficient"Passes cross-reference each other — taint without blast radius misses critical nodesRun all four passes
"Tool isn't installed, I'll analyze manually"Manual analysis misses what tooling catchesReport "trailmark is not installed" and return
"Empty pass output means the pass failed"Some passes produce no data for some codebases (e.g., no privilege boundaries)Return full output regardless
"A v0.4 field is always present"Users may still have Trailmark 0.2.x installedProbe with hasattr() before querying v0.4-only methods

Usage

The target directory is passed via the args parameter.

Show full SKILL.md (205 more words)Show less

Execution

Step 1: Check that trailmark is available.

bash
trailmark analyze --help 2>/dev/null || \
  uv run trailmark analyze --help 2>/dev/null

If neither command works, report "trailmark is not installed" and return. Do NOT run pip install, uv pip install, git clone, or any install command. The user must install trailmark themselves.

Optionally record the version:

bash
trailmark --version 2>/dev/null || uv run trailmark --version 2>/dev/null || true

Do not fail if this command is missing; use API feature probes below.

Step 2: Detect languages with Trailmark's parse API.

bash
python3 - "{args}" <<'PY'
import json
import sys

try:
    from trailmark.parse import detect_languages  # canonical location since 0.3.x
except ModuleNotFoundError:
    # v0.2.x predates trailmark.parse; the same function lives in query.api
    from trailmark.query.api import detect_languages

print(json.dumps(detect_languages(sys.argv[1])))
PY

If the import fails, rerun the same snippet with uv run --with trailmark python - "{args}". If the result is [], report "Trailmark found no supported languages under target" and return.

Step 3: Run the full structural analysis via QueryEngine.

Run this snippet with python3. If the import fails, rerun the same snippet under uv run --with trailmark python - "{args}".

bash
python3 - "{args}" <<'PY'
import json
import sys

try:
    from trailmark.parse import detect_languages  # canonical location since 0.3.x
except ModuleNotFoundError:
    # v0.2.x predates trailmark.parse; the same function lives in query.api
    from trailmark.query.api import detect_languages

from trailmark.query.api import QueryEngine

target = sys.argv[1]
languages = detect_languages(target)
engine = QueryEngine.from_directory(target, language="auto")
preanalysis = engine.preanalysis()

def summarize_subgraph(name: str, limit: int = 25) -> dict[str, object]:
    nodes = engine.subgraph(name)
    summary = {
        "count": len(nodes),
        "sample_ids": [node["id"] for node in nodes[:limit]],
    }
    if hasattr(engine, "subgraph_edges"):
        summary["edge_count"] = len(engine.subgraph_edges(name))
    return summary

graph = json.loads(engine.to_json())
nodes = graph.get("nodes", {})
proxy_nodes = [
    node_id for node_id, node in nodes.items()
    if node.get("kind") == "proxy" or node.get("origin") == "proxy"
]

payload = {
    "languages": languages,
    "summary": engine.summary(),
    "preanalysis": preanalysis,
    "attack_surface": engine.attack_surface()[:25],
    "hotspots": engine.complexity_hotspots(10)[:25],
    "proxy_nodes": proxy_nodes[:25],
    "subgraphs": {
        name: summarize_subgraph(name)
        for name in engine.subgraph_names()
    },
}

if hasattr(engine, "type_references"):
    payload["type_reference_samples"] = {
        node_id: engine.type_references(node_id)[:10]
        for node_id in list(nodes)[:25]
    }

print(json.dumps(payload, indent=2))
PY

Step 4: Verify the output.

The output should include:

  • languages
  • summary
  • preanalysis
  • hotspots (possibly empty)
  • proxy_nodes (empty on v0.2.x or when there are no unresolved calls; on 0.5.0+ may include proxy.external:* entries declared in .trailmark/links.toml)
  • subgraphs with counts and sample IDs

On Trailmark 0.5.0+, attack_surface entries may carry an attributes object (e.g. solidity_visibility, solidity_overridden_by). Pass it through unchanged — downstream consumers use it to rank entrypoints.

Some subgraphs may have zero nodes for some codebases (this is normal). Return the full JSON payload regardless.

© trailofbits, CC-BY-SA-4.0. 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 2 other files (assets) in plugins/trailmark/skills/trailmark-structural of trailofbits/skills.

  • SKILL.md
  • agents/openai.yaml
  • assets/trail-of-bits-mark.svg

Open the folder on GitHubat commit 82fe822

Compare with similar skills

Trailmark Structural 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.

Trailmark Structural compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Trailmark Structural this skilltrailofbits/skills7.4k—~1.5kAutomated safety check: NotesCC-BY-SA-4.0
Sast Businesslogicutkusen/sast-skills1.3k—~5.3kAutomated safety check: PassMIT
Discover Attack Surfaceseqra/opentaint162—~1.7kAutomated safety check: PassApache-2.0
Audit Integritygithub/awesome-copilot40k—~1kAutomated safety check: PassMIT
Security Auditseb1n/awesome-ai-agent-skills206—~2.4kAutomated safety check: NotesMIT
CSO Security Auditgarrytan/gstack136k—~4.5kAutomated safety check: PassMIT

Similar skills

  • Sast Businesslogic

    utkusen/sast-skills

    Detect business logic vulnerabilities in a codebase using a three-phase approach: threat modeling (domain analysis and attack scenarios), batched verify (check exploitable gaps in parallel…

    1.3k GitHub stars~5.3k tokensUpdated 6 mo ago
    SecurityAuto-check passed
  • Classify project-used dependency members and record taint sources as rule-authoring units.

    162 GitHub stars~1.7k tokensUpdated today
    SecurityAuto-check passed
  • Audit Integrity

    github/awesome-copilot

    Official

    Enforce output quality, evidence verification, and quality gates across security audits.

    40k GitHub stars~1k tokensUpdated today
    SecurityAuto-check passed
  • Security Audit

    seb1n/awesome-ai-agent-skills

    Perform a broad, authorized security audit across application, infrastructure, identity, dependencies, and operations.

    206 GitHub stars~2.4k tokensUpdated 1 mo ago
    SecurityAuto-check: notes
  • CSO Security Audit

    garrytan/gstack

    Runs an evidence-first security audit of a codebase through gstack's trusted launcher, with static findings by default and isolated reproduction when enabled.

    136k GitHub stars~4.5k tokensUpdated today
    SecurityAuto-check passed
  • Expert Security

    ReJeCtAll/ExpertTeam-Codex

    安全专家入口。用于 Codex CLI 的 $expert-security 调用. An agent skill from ReJeCtAll/ExpertTeam-Codex.

    113 GitHub stars~780 tokensUpdated 3 mo ago
    SecurityAuto-check passed

More from trailofbits/skills

All 79 skills in this repo
  • Code Graph Mermaid Diagrams

    trailofbits/skills

    Official

    Generates Mermaid diagrams from Trailmark code graphs, including call graphs, class hierarchies, module dependency maps, complexity heatmaps and attack surface data flows.

    7.4k GitHub starsUsed in 1 repo~1.7k tokens
    Auto-check passed
  • CodeQL Security Scan

    trailofbits/skills

    Official

    Scans a codebase for vulnerabilities with CodeQL's data flow and taint tracking in run-all or important-only modes, including data extensions for project-specific sources and sinks.

    7.4k GitHub stars~4.6k tokensUpdated today
    Auto-check: notes
  • Trailmark Graph Evolution

    trailofbits/skills

    Official

    Compares Trailmark code graphs at two snapshots, such as commits, tags or directories, to surface attack paths, blast radius and taint changes that text diffs miss.

    7.4k GitHub stars~3.4k tokensUpdated today
    Auto-check passed
  • Let Fate Decide

    trailofbits/skills

    Official

    Draws a 12 Houses tarot spread to break ties when a request is vague or casually delegated, then reads the cards to pick the next step.

    7.4k GitHub stars~2.5k tokensUpdated today
    Auto-check: notes
  • Burp Suite Project Parser

    trailofbits/skills

    Official

    Searches and extracts data from Burp Suite project files on the command line: regex searches over responses, audit findings, proxy history and site map data.

    7.4k GitHub starsUsed in 4 repos~4.2k tokens
    Auto-check: notes
  • Semgrep Security Scan

    trailofbits/skills

    Official

    Detects languages, proposes rulesets for approval, then runs the approved Semgrep scan across a codebase and merges the output into one SARIF file.

    7.4k GitHub stars~3.7k tokensUpdated today
    Auto-check: notes

Categories

Questions about Trailmark Structural

What does Trailmark Structural do?

Runs full Trailmark structural analysis by building a graph, running preanalysis(), and reporting hotspots, taint, blast radius, privilege boundaries, attack surface, and version-gated Trailmark…. Trailmark Structural is an agent skill from trailofbits/skills, published by the product's own GitHub organization.5+ data such as proxy counts, subgraph edges, type/reference summaries, and entrypoint attributes.

When should I use Trailmark Structural?

Trailmark Structural fits situations like: vivisect needs detailed structural data for a target; tasks that involve Threat modeling; tasks that involve Static analysis and SAST.

How do I install Trailmark Structural in Claude Code?

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

How do I install Trailmark Structural in Codex?

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

Can I use Trailmark Structural 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 trailofbits/skills --skill trailmark-structural -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/trailmark-structural, .gemini/skills/trailmark-structural, .github/skills/trailmark-structural and .opencode/skills/trailmark-structural in your project.

What does Trailmark Structural need to run?

Going by SKILL.md and its folder, Trailmark Structural needs the command-line tools its instructions call (uv, python3, pip and git). Our summary lists: Python 3. Its frontmatter pre-approves these tools: Bash, Read, Grep, Glob.

Does Trailmark Structural access the network?

SKILL.md contains no URLs. Its commands use uv, pip and git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Trailmark Structural safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Trailmark Structural use?

Trailmark Structural is published under the CC-BY-SA-4.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Trailmark Structural use?

About 1.5k tokens (SKILL.md is roughly 6.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Trailmark Structural?

Skills that share tags, products or a category with Trailmark Structural: Sast Businesslogic (utkusen/sast-skills, 1.3k stars), Discover Attack Surface (seqra/opentaint, 162 stars), Audit Integrity (github/awesome-copilot, 40k stars) and Security Audit (seb1n/awesome-ai-agent-skills, 206 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Trailmark Structural?

trailofbits (a GitHub organization, an official publisher) maintains it in trailofbits/skills, which has 7,420 GitHub stars. The repository holds 79 skills in this directory. The repository was last updated on October 7, 2026.

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