[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-trail-of-bits-diagramming-code":3,"mdc--9m5nw2-key":35,"related-org-trail-of-bits-diagramming-code":1609,"related-repo-trail-of-bits-diagramming-code":1766},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":12,"stars":23,"repoUrl":24,"updatedAt":25,"license":26,"forks":27,"topics":28,"repo":30,"sourceUrl":33,"mdContent":34},"diagramming-code","generate Mermaid diagrams from code graphs","Generates Mermaid diagrams from Trailmark code graphs. Produces call graphs, class hierarchies, module dependency maps, containment diagrams, complexity heatmaps, and attack surface data flow visualizations. Use when visualizing code architecture, drawing call graphs, generating class diagrams, creating dependency maps, producing complexity heatmaps, or visualizing data flow and attack surface paths as Mermaid diagrams.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},"trail-of-bits","Trail of Bits","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Ftrail-of-bits.png","trailofbits",[13,17,20],{"name":14,"slug":15,"type":16},"Visualization","visualization","tag",{"name":18,"slug":19,"type":16},"Diagrams","diagrams",{"name":21,"slug":22,"type":16},"Code Analysis","code-analysis",6139,"https:\u002F\u002Fgithub.com\u002Ftrailofbits\u002Fskills","2026-08-01T05:44:52.908342",null,541,[29],"agent-skills",{"repoUrl":24,"stars":23,"forks":27,"topics":31,"description":32},[29],"Trail of Bits Claude Code skills for security research, vulnerability detection, and audit workflows","https:\u002F\u002Fgithub.com\u002Ftrailofbits\u002Fskills\u002Ftree\u002FHEAD\u002Fplugins\u002Ftrailmark\u002Fskills\u002Fdiagramming-code","---\nname: diagramming-code\ndescription: >\n  Generates Mermaid diagrams from Trailmark code graphs. Produces call graphs,\n  class hierarchies, module dependency maps, containment diagrams, complexity\n  heatmaps, and attack surface data flow visualizations. Use when visualizing\n  code architecture, drawing call graphs, generating class diagrams, creating\n  dependency maps, producing complexity heatmaps, or visualizing data flow\n  and attack surface paths as Mermaid diagrams.\n---\n\n# Diagramming Code\n\nGenerates Mermaid diagrams from Trailmark's code graph. A pre-made script\nhandles Mermaid syntax generation; Claude selects the diagram type and\nparameters. Trailmark 0.4.0 includes a native `trailmark diagram` command; use\nit only after a version\u002Fcommand check, otherwise use this skill's bundled\nscript.\n\n## When to Use\n\n- Visualizing call paths between functions\n- Drawing class inheritance hierarchies\n- Mapping module import dependencies\n- Showing class structure with members\n- Highlighting complexity hotspots with color coding\n- Tracing data flow from entrypoints to sensitive functions\n\n## When NOT to Use\n\n- Querying the graph without visualization (use the `trailmark` skill)\n- Mutation testing triage (use the `genotoxic` skill)\n- Architecture diagrams not derived from code (draw by hand)\n\n## Prerequisites\n\n**trailmark** must be installed. If `uv run trailmark` fails, run:\n\n```bash\nuv pip install trailmark\n```\n\n**DO NOT** fall back to hand-writing Mermaid from source code reading. The\nscript uses Trailmark's parsed graph for accuracy. If installation fails,\nreport the error to the user.\n\n## Version Gate\n\nCheck whether native v0.4 diagram support exists:\n\n```bash\ntrailmark diagram --help 2>\u002Fdev\u002Fnull || uv run trailmark diagram --help 2>\u002Fdev\u002Fnull\n```\n\nIf this succeeds, you may use `trailmark diagram`. If it fails, use\n`uv run {baseDir}\u002Fscripts\u002Fdiagram.py`, which keeps the older skill workflow\nintact. Do not assume the native CLI exists on Trailmark 0.2.x.\n\n---\n\n## Quick Start\n\n```bash\nuv run {baseDir}\u002Fscripts\u002Fdiagram.py \\\n    --target {targetDir} --language auto --type call-graph \\\n    --focus main --depth 2\n\n# Trailmark 0.4.0+ equivalent after the Version Gate succeeds\nuv run trailmark diagram \\\n    --target {targetDir} --language auto --type call-graph \\\n    --focus main --depth 2\n```\n\nOutput is raw Mermaid text. Wrap in a fenced code block:\n\n````markdown\n```mermaid\nflowchart TB\n    ...\n```\n````\n\n---\n\n## Diagram Types\n\n```\n├─ \"Who calls what?\"               → --type call-graph\n├─ \"Class inheritance?\"             → --type class-hierarchy\n├─ \"Module dependencies?\"           → --type module-deps\n├─ \"Class members and structure?\"   → --type containment\n├─ \"Where is complexity highest?\"   → --type complexity\n└─ \"Path from input to function?\"   → --type data-flow\n```\n\nFor detailed examples of each type, see\n[references\u002Fdiagram-types.md](references\u002Fdiagram-types.md).\n\n---\n\n## Workflow\n\n```\nDiagram Progress:\n- [ ] Step 1: Verify trailmark is installed\n- [ ] Step 2: Identify diagram type from user request\n- [ ] Step 3: Determine focus node and parameters\n- [ ] Step 4: Run diagram.py script (or native trailmark diagram on v0.4+)\n- [ ] Step 5: Verify output is non-empty and well-formed\n- [ ] Step 6: Embed diagram in response\n```\n\n**Step 1:** Run `uv run trailmark analyze --language auto --summary {targetDir}`. Install\nif it fails. Then run pre-analysis via the programmatic API:\n\n```python\nfrom trailmark.query.api import QueryEngine\n\nengine = QueryEngine.from_directory(\"{targetDir}\", language=\"auto\")\nengine.preanalysis()\n```\n\nPre-analysis enriches the graph with blast radius, taint propagation,\nand privilege boundary data used by `data-flow` diagrams.\n\nIf auto-detection is wrong for the target, rerun with an explicit language or\ncomma-separated list such as `python,rust`.\n\n**Step 2:** Match the user's request to a `--type` using the decision tree\nabove.\n\n**Step 3:** For `call-graph` and `data-flow`, identify the focus function.\nDefault `--depth 2`. Use `--direction LR` for dependency flows.\n\n**Step 4:** Run the script and capture stdout.\nIf the native v0.4 CLI is available, either command is acceptable; prefer the\nbundled script when you need behavior consistent with this skill's references.\n\n**Step 5:** Check: output starts with `flowchart` or `classDiagram`,\ncontains at least one node. If empty or malformed, consult\n[references\u002Fmermaid-syntax.md](references\u002Fmermaid-syntax.md).\n\n**Step 6:** Wrap output in ` ```mermaid ``` ` code fence.\n\n---\n\n## Script Reference\n\n```\nuv run {baseDir}\u002Fscripts\u002Fdiagram.py [OPTIONS]\n# or, on Trailmark 0.4.0+:\nuv run trailmark diagram [OPTIONS]\n```\n\n| Argument | Short | Default | Description |\n|---|---|---|---|\n| `--target` | `-t` | required | Directory to analyze |\n| `--language` | `-l` | `python` | Source language |\n| `--type` | `-T` | required | Diagram type (see above) |\n| `--focus` | `-f` | none | Center diagram on this node |\n| `--depth` | `-d` | `2` | BFS traversal depth |\n| `--direction` | | `TB` | Layout: `TB` (top-bottom) or `LR` (left-right) |\n| `--threshold` | | `10` | Min complexity for `complexity` type |\n\n### Examples\n\n```bash\n# Call graph centered on a function\nuv run {baseDir}\u002Fscripts\u002Fdiagram.py -t src\u002F -T call-graph -f parse_file\n\n# Class hierarchy for a Rust project\nuv run {baseDir}\u002Fscripts\u002Fdiagram.py -t src\u002F -l rust -T class-hierarchy\n\n# Module dependency map, left-to-right\nuv run {baseDir}\u002Fscripts\u002Fdiagram.py -t src\u002F -T module-deps --direction LR\n\n# Class members\nuv run {baseDir}\u002Fscripts\u002Fdiagram.py -t src\u002F -T containment\n\n# Complexity heatmap (threshold 5)\nuv run {baseDir}\u002Fscripts\u002Fdiagram.py -t src\u002F -T complexity --threshold 5\n\n# Data flow from entrypoints to a specific function\nuv run {baseDir}\u002Fscripts\u002Fdiagram.py -t src\u002F -T data-flow -f execute_query\n```\n\n---\n\n## Customization\n\n**Direction:** Use `TB` (default) for hierarchical views, `LR` for\nleft-to-right flows like dependency chains.\n\n**Depth:** Increase `--depth` to see more of the call graph. Decrease to\nreduce clutter. The script warns if the diagram exceeds 100 nodes.\n\n**Focus:** Always use `--focus` for `call-graph` on non-trivial codebases.\nFor `data-flow`, omitting focus auto-targets the top 10 complexity hotspots.\n\n**Language:** Prefer `--language auto` for polyglot or unfamiliar repos.\nUse an explicit language only when you know the target is single-language or\nyou need to exclude unrelated components.\n\n---\n\n## Supporting Documentation\n\n- **[references\u002Fdiagram-types.md](references\u002Fdiagram-types.md)** -\n  Detailed docs and Mermaid examples for each diagram type\n- **[references\u002Fmermaid-syntax.md](references\u002Fmermaid-syntax.md)** -\n  ID sanitization, escaping, style definitions, and common pitfalls\n",{"data":36,"body":37},{"name":4,"description":6},{"type":38,"children":39},"root",[40,48,63,70,105,111,144,150,168,207,217,223,228,300,320,324,330,518,523,570,573,579,589,602,605,611,620,638,678,691,703,721,762,772,804,822,825,831,840,1119,1126,1468,1471,1477,1501,1518,1549,1567,1570,1576,1603],{"type":41,"tag":42,"props":43,"children":44},"element","h1",{"id":4},[45],{"type":46,"value":47},"text","Diagramming Code",{"type":41,"tag":49,"props":50,"children":51},"p",{},[52,54,61],{"type":46,"value":53},"Generates Mermaid diagrams from Trailmark's code graph. A pre-made script\nhandles Mermaid syntax generation; Claude selects the diagram type and\nparameters. Trailmark 0.4.0 includes a native ",{"type":41,"tag":55,"props":56,"children":58},"code",{"className":57},[],[59],{"type":46,"value":60},"trailmark diagram",{"type":46,"value":62}," command; use\nit only after a version\u002Fcommand check, otherwise use this skill's bundled\nscript.",{"type":41,"tag":64,"props":65,"children":67},"h2",{"id":66},"when-to-use",[68],{"type":46,"value":69},"When to Use",{"type":41,"tag":71,"props":72,"children":73},"ul",{},[74,80,85,90,95,100],{"type":41,"tag":75,"props":76,"children":77},"li",{},[78],{"type":46,"value":79},"Visualizing call paths between functions",{"type":41,"tag":75,"props":81,"children":82},{},[83],{"type":46,"value":84},"Drawing class inheritance hierarchies",{"type":41,"tag":75,"props":86,"children":87},{},[88],{"type":46,"value":89},"Mapping module import dependencies",{"type":41,"tag":75,"props":91,"children":92},{},[93],{"type":46,"value":94},"Showing class structure with members",{"type":41,"tag":75,"props":96,"children":97},{},[98],{"type":46,"value":99},"Highlighting complexity hotspots with color coding",{"type":41,"tag":75,"props":101,"children":102},{},[103],{"type":46,"value":104},"Tracing data flow from entrypoints to sensitive functions",{"type":41,"tag":64,"props":106,"children":108},{"id":107},"when-not-to-use",[109],{"type":46,"value":110},"When NOT to Use",{"type":41,"tag":71,"props":112,"children":113},{},[114,127,139],{"type":41,"tag":75,"props":115,"children":116},{},[117,119,125],{"type":46,"value":118},"Querying the graph without visualization (use the ",{"type":41,"tag":55,"props":120,"children":122},{"className":121},[],[123],{"type":46,"value":124},"trailmark",{"type":46,"value":126}," skill)",{"type":41,"tag":75,"props":128,"children":129},{},[130,132,138],{"type":46,"value":131},"Mutation testing triage (use the ",{"type":41,"tag":55,"props":133,"children":135},{"className":134},[],[136],{"type":46,"value":137},"genotoxic",{"type":46,"value":126},{"type":41,"tag":75,"props":140,"children":141},{},[142],{"type":46,"value":143},"Architecture diagrams not derived from code (draw by hand)",{"type":41,"tag":64,"props":145,"children":147},{"id":146},"prerequisites",[148],{"type":46,"value":149},"Prerequisites",{"type":41,"tag":49,"props":151,"children":152},{},[153,158,160,166],{"type":41,"tag":154,"props":155,"children":156},"strong",{},[157],{"type":46,"value":124},{"type":46,"value":159}," must be installed. If ",{"type":41,"tag":55,"props":161,"children":163},{"className":162},[],[164],{"type":46,"value":165},"uv run trailmark",{"type":46,"value":167}," fails, run:",{"type":41,"tag":169,"props":170,"children":175},"pre",{"className":171,"code":172,"language":173,"meta":174,"style":174},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","uv pip install trailmark\n","bash","",[176],{"type":41,"tag":55,"props":177,"children":178},{"__ignoreMap":174},[179],{"type":41,"tag":180,"props":181,"children":184},"span",{"class":182,"line":183},"line",1,[185,191,197,202],{"type":41,"tag":180,"props":186,"children":188},{"style":187},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[189],{"type":46,"value":190},"uv",{"type":41,"tag":180,"props":192,"children":194},{"style":193},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[195],{"type":46,"value":196}," pip",{"type":41,"tag":180,"props":198,"children":199},{"style":193},[200],{"type":46,"value":201}," install",{"type":41,"tag":180,"props":203,"children":204},{"style":193},[205],{"type":46,"value":206}," trailmark\n",{"type":41,"tag":49,"props":208,"children":209},{},[210,215],{"type":41,"tag":154,"props":211,"children":212},{},[213],{"type":46,"value":214},"DO NOT",{"type":46,"value":216}," fall back to hand-writing Mermaid from source code reading. The\nscript uses Trailmark's parsed graph for accuracy. If installation fails,\nreport the error to the user.",{"type":41,"tag":64,"props":218,"children":220},{"id":219},"version-gate",[221],{"type":46,"value":222},"Version Gate",{"type":41,"tag":49,"props":224,"children":225},{},[226],{"type":46,"value":227},"Check whether native v0.4 diagram support exists:",{"type":41,"tag":169,"props":229,"children":231},{"className":171,"code":230,"language":173,"meta":174,"style":174},"trailmark diagram --help 2>\u002Fdev\u002Fnull || uv run trailmark diagram --help 2>\u002Fdev\u002Fnull\n",[232],{"type":41,"tag":55,"props":233,"children":234},{"__ignoreMap":174},[235],{"type":41,"tag":180,"props":236,"children":237},{"class":182,"line":183},[238,242,247,252,258,263,268,273,278,283,287,291,295],{"type":41,"tag":180,"props":239,"children":240},{"style":187},[241],{"type":46,"value":124},{"type":41,"tag":180,"props":243,"children":244},{"style":193},[245],{"type":46,"value":246}," diagram",{"type":41,"tag":180,"props":248,"children":249},{"style":193},[250],{"type":46,"value":251}," --help",{"type":41,"tag":180,"props":253,"children":255},{"style":254},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[256],{"type":46,"value":257}," 2>",{"type":41,"tag":180,"props":259,"children":260},{"style":193},[261],{"type":46,"value":262},"\u002Fdev\u002Fnull",{"type":41,"tag":180,"props":264,"children":265},{"style":254},[266],{"type":46,"value":267}," ||",{"type":41,"tag":180,"props":269,"children":270},{"style":187},[271],{"type":46,"value":272}," uv",{"type":41,"tag":180,"props":274,"children":275},{"style":193},[276],{"type":46,"value":277}," run",{"type":41,"tag":180,"props":279,"children":280},{"style":193},[281],{"type":46,"value":282}," trailmark",{"type":41,"tag":180,"props":284,"children":285},{"style":193},[286],{"type":46,"value":246},{"type":41,"tag":180,"props":288,"children":289},{"style":193},[290],{"type":46,"value":251},{"type":41,"tag":180,"props":292,"children":293},{"style":254},[294],{"type":46,"value":257},{"type":41,"tag":180,"props":296,"children":297},{"style":193},[298],{"type":46,"value":299},"\u002Fdev\u002Fnull\n",{"type":41,"tag":49,"props":301,"children":302},{},[303,305,310,312,318],{"type":46,"value":304},"If this succeeds, you may use ",{"type":41,"tag":55,"props":306,"children":308},{"className":307},[],[309],{"type":46,"value":60},{"type":46,"value":311},". If it fails, use\n",{"type":41,"tag":55,"props":313,"children":315},{"className":314},[],[316],{"type":46,"value":317},"uv run {baseDir}\u002Fscripts\u002Fdiagram.py",{"type":46,"value":319},", which keeps the older skill workflow\nintact. Do not assume the native CLI exists on Trailmark 0.2.x.",{"type":41,"tag":321,"props":322,"children":323},"hr",{},[],{"type":41,"tag":64,"props":325,"children":327},{"id":326},"quick-start",[328],{"type":46,"value":329},"Quick Start",{"type":41,"tag":169,"props":331,"children":333},{"className":171,"code":332,"language":173,"meta":174,"style":174},"uv run {baseDir}\u002Fscripts\u002Fdiagram.py \\\n    --target {targetDir} --language auto --type call-graph \\\n    --focus main --depth 2\n\n# Trailmark 0.4.0+ equivalent after the Version Gate succeeds\nuv run trailmark diagram \\\n    --target {targetDir} --language auto --type call-graph \\\n    --focus main --depth 2\n",[334],{"type":41,"tag":55,"props":335,"children":336},{"__ignoreMap":174},[337,359,397,422,432,442,466,498],{"type":41,"tag":180,"props":338,"children":339},{"class":182,"line":183},[340,344,348,353],{"type":41,"tag":180,"props":341,"children":342},{"style":187},[343],{"type":46,"value":190},{"type":41,"tag":180,"props":345,"children":346},{"style":193},[347],{"type":46,"value":277},{"type":41,"tag":180,"props":349,"children":350},{"style":193},[351],{"type":46,"value":352}," {baseDir}\u002Fscripts\u002Fdiagram.py",{"type":41,"tag":180,"props":354,"children":356},{"style":355},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[357],{"type":46,"value":358}," \\\n",{"type":41,"tag":180,"props":360,"children":362},{"class":182,"line":361},2,[363,368,373,378,383,388,393],{"type":41,"tag":180,"props":364,"children":365},{"style":193},[366],{"type":46,"value":367},"    --target",{"type":41,"tag":180,"props":369,"children":370},{"style":193},[371],{"type":46,"value":372}," {targetDir}",{"type":41,"tag":180,"props":374,"children":375},{"style":193},[376],{"type":46,"value":377}," --language",{"type":41,"tag":180,"props":379,"children":380},{"style":193},[381],{"type":46,"value":382}," auto",{"type":41,"tag":180,"props":384,"children":385},{"style":193},[386],{"type":46,"value":387}," --type",{"type":41,"tag":180,"props":389,"children":390},{"style":193},[391],{"type":46,"value":392}," call-graph",{"type":41,"tag":180,"props":394,"children":395},{"style":355},[396],{"type":46,"value":358},{"type":41,"tag":180,"props":398,"children":400},{"class":182,"line":399},3,[401,406,411,416],{"type":41,"tag":180,"props":402,"children":403},{"style":193},[404],{"type":46,"value":405},"    --focus",{"type":41,"tag":180,"props":407,"children":408},{"style":193},[409],{"type":46,"value":410}," main",{"type":41,"tag":180,"props":412,"children":413},{"style":193},[414],{"type":46,"value":415}," --depth",{"type":41,"tag":180,"props":417,"children":419},{"style":418},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[420],{"type":46,"value":421}," 2\n",{"type":41,"tag":180,"props":423,"children":425},{"class":182,"line":424},4,[426],{"type":41,"tag":180,"props":427,"children":429},{"emptyLinePlaceholder":428},true,[430],{"type":46,"value":431},"\n",{"type":41,"tag":180,"props":433,"children":435},{"class":182,"line":434},5,[436],{"type":41,"tag":180,"props":437,"children":439},{"style":438},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[440],{"type":46,"value":441},"# Trailmark 0.4.0+ equivalent after the Version Gate succeeds\n",{"type":41,"tag":180,"props":443,"children":445},{"class":182,"line":444},6,[446,450,454,458,462],{"type":41,"tag":180,"props":447,"children":448},{"style":187},[449],{"type":46,"value":190},{"type":41,"tag":180,"props":451,"children":452},{"style":193},[453],{"type":46,"value":277},{"type":41,"tag":180,"props":455,"children":456},{"style":193},[457],{"type":46,"value":282},{"type":41,"tag":180,"props":459,"children":460},{"style":193},[461],{"type":46,"value":246},{"type":41,"tag":180,"props":463,"children":464},{"style":355},[465],{"type":46,"value":358},{"type":41,"tag":180,"props":467,"children":469},{"class":182,"line":468},7,[470,474,478,482,486,490,494],{"type":41,"tag":180,"props":471,"children":472},{"style":193},[473],{"type":46,"value":367},{"type":41,"tag":180,"props":475,"children":476},{"style":193},[477],{"type":46,"value":372},{"type":41,"tag":180,"props":479,"children":480},{"style":193},[481],{"type":46,"value":377},{"type":41,"tag":180,"props":483,"children":484},{"style":193},[485],{"type":46,"value":382},{"type":41,"tag":180,"props":487,"children":488},{"style":193},[489],{"type":46,"value":387},{"type":41,"tag":180,"props":491,"children":492},{"style":193},[493],{"type":46,"value":392},{"type":41,"tag":180,"props":495,"children":496},{"style":355},[497],{"type":46,"value":358},{"type":41,"tag":180,"props":499,"children":501},{"class":182,"line":500},8,[502,506,510,514],{"type":41,"tag":180,"props":503,"children":504},{"style":193},[505],{"type":46,"value":405},{"type":41,"tag":180,"props":507,"children":508},{"style":193},[509],{"type":46,"value":410},{"type":41,"tag":180,"props":511,"children":512},{"style":193},[513],{"type":46,"value":415},{"type":41,"tag":180,"props":515,"children":516},{"style":418},[517],{"type":46,"value":421},{"type":41,"tag":49,"props":519,"children":520},{},[521],{"type":46,"value":522},"Output is raw Mermaid text. Wrap in a fenced code block:",{"type":41,"tag":169,"props":524,"children":528},{"className":525,"code":526,"language":527,"meta":174,"style":174},"language-markdown shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","```mermaid\nflowchart TB\n    ...\n```\n","markdown",[529],{"type":41,"tag":55,"props":530,"children":531},{"__ignoreMap":174},[532,546,554,562],{"type":41,"tag":180,"props":533,"children":534},{"class":182,"line":183},[535,540],{"type":41,"tag":180,"props":536,"children":537},{"style":193},[538],{"type":46,"value":539},"```",{"type":41,"tag":180,"props":541,"children":543},{"style":542},"--shiki-light:#90A4AE90;--shiki-default:#EEFFFF90;--shiki-dark:#BABED890",[544],{"type":46,"value":545},"mermaid\n",{"type":41,"tag":180,"props":547,"children":548},{"class":182,"line":361},[549],{"type":41,"tag":180,"props":550,"children":551},{"style":542},[552],{"type":46,"value":553},"flowchart TB\n",{"type":41,"tag":180,"props":555,"children":556},{"class":182,"line":399},[557],{"type":41,"tag":180,"props":558,"children":559},{"style":542},[560],{"type":46,"value":561},"    ...\n",{"type":41,"tag":180,"props":563,"children":564},{"class":182,"line":424},[565],{"type":41,"tag":180,"props":566,"children":567},{"style":193},[568],{"type":46,"value":569},"```\n",{"type":41,"tag":321,"props":571,"children":572},{},[],{"type":41,"tag":64,"props":574,"children":576},{"id":575},"diagram-types",[577],{"type":46,"value":578},"Diagram Types",{"type":41,"tag":169,"props":580,"children":584},{"className":581,"code":583,"language":46},[582],"language-text","├─ \"Who calls what?\"               → --type call-graph\n├─ \"Class inheritance?\"             → --type class-hierarchy\n├─ \"Module dependencies?\"           → --type module-deps\n├─ \"Class members and structure?\"   → --type containment\n├─ \"Where is complexity highest?\"   → --type complexity\n└─ \"Path from input to function?\"   → --type data-flow\n",[585],{"type":41,"tag":55,"props":586,"children":587},{"__ignoreMap":174},[588],{"type":46,"value":583},{"type":41,"tag":49,"props":590,"children":591},{},[592,594,600],{"type":46,"value":593},"For detailed examples of each type, see\n",{"type":41,"tag":595,"props":596,"children":598},"a",{"href":597},"references\u002Fdiagram-types.md",[599],{"type":46,"value":597},{"type":46,"value":601},".",{"type":41,"tag":321,"props":603,"children":604},{},[],{"type":41,"tag":64,"props":606,"children":608},{"id":607},"workflow",[609],{"type":46,"value":610},"Workflow",{"type":41,"tag":169,"props":612,"children":615},{"className":613,"code":614,"language":46},[582],"Diagram Progress:\n- [ ] Step 1: Verify trailmark is installed\n- [ ] Step 2: Identify diagram type from user request\n- [ ] Step 3: Determine focus node and parameters\n- [ ] Step 4: Run diagram.py script (or native trailmark diagram on v0.4+)\n- [ ] Step 5: Verify output is non-empty and well-formed\n- [ ] Step 6: Embed diagram in response\n",[616],{"type":41,"tag":55,"props":617,"children":618},{"__ignoreMap":174},[619],{"type":46,"value":614},{"type":41,"tag":49,"props":621,"children":622},{},[623,628,630,636],{"type":41,"tag":154,"props":624,"children":625},{},[626],{"type":46,"value":627},"Step 1:",{"type":46,"value":629}," Run ",{"type":41,"tag":55,"props":631,"children":633},{"className":632},[],[634],{"type":46,"value":635},"uv run trailmark analyze --language auto --summary {targetDir}",{"type":46,"value":637},". Install\nif it fails. Then run pre-analysis via the programmatic API:",{"type":41,"tag":169,"props":639,"children":643},{"className":640,"code":641,"language":642,"meta":174,"style":174},"language-python shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","from trailmark.query.api import QueryEngine\n\nengine = QueryEngine.from_directory(\"{targetDir}\", language=\"auto\")\nengine.preanalysis()\n","python",[644],{"type":41,"tag":55,"props":645,"children":646},{"__ignoreMap":174},[647,655,662,670],{"type":41,"tag":180,"props":648,"children":649},{"class":182,"line":183},[650],{"type":41,"tag":180,"props":651,"children":652},{},[653],{"type":46,"value":654},"from trailmark.query.api import QueryEngine\n",{"type":41,"tag":180,"props":656,"children":657},{"class":182,"line":361},[658],{"type":41,"tag":180,"props":659,"children":660},{"emptyLinePlaceholder":428},[661],{"type":46,"value":431},{"type":41,"tag":180,"props":663,"children":664},{"class":182,"line":399},[665],{"type":41,"tag":180,"props":666,"children":667},{},[668],{"type":46,"value":669},"engine = QueryEngine.from_directory(\"{targetDir}\", language=\"auto\")\n",{"type":41,"tag":180,"props":671,"children":672},{"class":182,"line":424},[673],{"type":41,"tag":180,"props":674,"children":675},{},[676],{"type":46,"value":677},"engine.preanalysis()\n",{"type":41,"tag":49,"props":679,"children":680},{},[681,683,689],{"type":46,"value":682},"Pre-analysis enriches the graph with blast radius, taint propagation,\nand privilege boundary data used by ",{"type":41,"tag":55,"props":684,"children":686},{"className":685},[],[687],{"type":46,"value":688},"data-flow",{"type":46,"value":690}," diagrams.",{"type":41,"tag":49,"props":692,"children":693},{},[694,696,702],{"type":46,"value":695},"If auto-detection is wrong for the target, rerun with an explicit language or\ncomma-separated list such as ",{"type":41,"tag":55,"props":697,"children":699},{"className":698},[],[700],{"type":46,"value":701},"python,rust",{"type":46,"value":601},{"type":41,"tag":49,"props":704,"children":705},{},[706,711,713,719],{"type":41,"tag":154,"props":707,"children":708},{},[709],{"type":46,"value":710},"Step 2:",{"type":46,"value":712}," Match the user's request to a ",{"type":41,"tag":55,"props":714,"children":716},{"className":715},[],[717],{"type":46,"value":718},"--type",{"type":46,"value":720}," using the decision tree\nabove.",{"type":41,"tag":49,"props":722,"children":723},{},[724,729,731,737,739,744,746,752,754,760],{"type":41,"tag":154,"props":725,"children":726},{},[727],{"type":46,"value":728},"Step 3:",{"type":46,"value":730}," For ",{"type":41,"tag":55,"props":732,"children":734},{"className":733},[],[735],{"type":46,"value":736},"call-graph",{"type":46,"value":738}," and ",{"type":41,"tag":55,"props":740,"children":742},{"className":741},[],[743],{"type":46,"value":688},{"type":46,"value":745},", identify the focus function.\nDefault ",{"type":41,"tag":55,"props":747,"children":749},{"className":748},[],[750],{"type":46,"value":751},"--depth 2",{"type":46,"value":753},". Use ",{"type":41,"tag":55,"props":755,"children":757},{"className":756},[],[758],{"type":46,"value":759},"--direction LR",{"type":46,"value":761}," for dependency flows.",{"type":41,"tag":49,"props":763,"children":764},{},[765,770],{"type":41,"tag":154,"props":766,"children":767},{},[768],{"type":46,"value":769},"Step 4:",{"type":46,"value":771}," Run the script and capture stdout.\nIf the native v0.4 CLI is available, either command is acceptable; prefer the\nbundled script when you need behavior consistent with this skill's references.",{"type":41,"tag":49,"props":773,"children":774},{},[775,780,782,788,790,796,798,803],{"type":41,"tag":154,"props":776,"children":777},{},[778],{"type":46,"value":779},"Step 5:",{"type":46,"value":781}," Check: output starts with ",{"type":41,"tag":55,"props":783,"children":785},{"className":784},[],[786],{"type":46,"value":787},"flowchart",{"type":46,"value":789}," or ",{"type":41,"tag":55,"props":791,"children":793},{"className":792},[],[794],{"type":46,"value":795},"classDiagram",{"type":46,"value":797},",\ncontains at least one node. If empty or malformed, consult\n",{"type":41,"tag":595,"props":799,"children":801},{"href":800},"references\u002Fmermaid-syntax.md",[802],{"type":46,"value":800},{"type":46,"value":601},{"type":41,"tag":49,"props":805,"children":806},{},[807,812,814,820],{"type":41,"tag":154,"props":808,"children":809},{},[810],{"type":46,"value":811},"Step 6:",{"type":46,"value":813}," Wrap output in ",{"type":41,"tag":55,"props":815,"children":817},{"className":816},[],[818],{"type":46,"value":819},"```mermaid ```",{"type":46,"value":821}," code fence.",{"type":41,"tag":321,"props":823,"children":824},{},[],{"type":41,"tag":64,"props":826,"children":828},{"id":827},"script-reference",[829],{"type":46,"value":830},"Script Reference",{"type":41,"tag":169,"props":832,"children":835},{"className":833,"code":834,"language":46},[582],"uv run {baseDir}\u002Fscripts\u002Fdiagram.py [OPTIONS]\n# or, on Trailmark 0.4.0+:\nuv run trailmark diagram [OPTIONS]\n",[836],{"type":41,"tag":55,"props":837,"children":838},{"__ignoreMap":174},[839],{"type":46,"value":834},{"type":41,"tag":841,"props":842,"children":843},"table",{},[844,873],{"type":41,"tag":845,"props":846,"children":847},"thead",{},[848],{"type":41,"tag":849,"props":850,"children":851},"tr",{},[852,858,863,868],{"type":41,"tag":853,"props":854,"children":855},"th",{},[856],{"type":46,"value":857},"Argument",{"type":41,"tag":853,"props":859,"children":860},{},[861],{"type":46,"value":862},"Short",{"type":41,"tag":853,"props":864,"children":865},{},[866],{"type":46,"value":867},"Default",{"type":41,"tag":853,"props":869,"children":870},{},[871],{"type":46,"value":872},"Description",{"type":41,"tag":874,"props":875,"children":876},"tbody",{},[877,909,943,972,1003,1038,1082],{"type":41,"tag":849,"props":878,"children":879},{},[880,890,899,904],{"type":41,"tag":881,"props":882,"children":883},"td",{},[884],{"type":41,"tag":55,"props":885,"children":887},{"className":886},[],[888],{"type":46,"value":889},"--target",{"type":41,"tag":881,"props":891,"children":892},{},[893],{"type":41,"tag":55,"props":894,"children":896},{"className":895},[],[897],{"type":46,"value":898},"-t",{"type":41,"tag":881,"props":900,"children":901},{},[902],{"type":46,"value":903},"required",{"type":41,"tag":881,"props":905,"children":906},{},[907],{"type":46,"value":908},"Directory to analyze",{"type":41,"tag":849,"props":910,"children":911},{},[912,921,930,938],{"type":41,"tag":881,"props":913,"children":914},{},[915],{"type":41,"tag":55,"props":916,"children":918},{"className":917},[],[919],{"type":46,"value":920},"--language",{"type":41,"tag":881,"props":922,"children":923},{},[924],{"type":41,"tag":55,"props":925,"children":927},{"className":926},[],[928],{"type":46,"value":929},"-l",{"type":41,"tag":881,"props":931,"children":932},{},[933],{"type":41,"tag":55,"props":934,"children":936},{"className":935},[],[937],{"type":46,"value":642},{"type":41,"tag":881,"props":939,"children":940},{},[941],{"type":46,"value":942},"Source language",{"type":41,"tag":849,"props":944,"children":945},{},[946,954,963,967],{"type":41,"tag":881,"props":947,"children":948},{},[949],{"type":41,"tag":55,"props":950,"children":952},{"className":951},[],[953],{"type":46,"value":718},{"type":41,"tag":881,"props":955,"children":956},{},[957],{"type":41,"tag":55,"props":958,"children":960},{"className":959},[],[961],{"type":46,"value":962},"-T",{"type":41,"tag":881,"props":964,"children":965},{},[966],{"type":46,"value":903},{"type":41,"tag":881,"props":968,"children":969},{},[970],{"type":46,"value":971},"Diagram type (see above)",{"type":41,"tag":849,"props":973,"children":974},{},[975,984,993,998],{"type":41,"tag":881,"props":976,"children":977},{},[978],{"type":41,"tag":55,"props":979,"children":981},{"className":980},[],[982],{"type":46,"value":983},"--focus",{"type":41,"tag":881,"props":985,"children":986},{},[987],{"type":41,"tag":55,"props":988,"children":990},{"className":989},[],[991],{"type":46,"value":992},"-f",{"type":41,"tag":881,"props":994,"children":995},{},[996],{"type":46,"value":997},"none",{"type":41,"tag":881,"props":999,"children":1000},{},[1001],{"type":46,"value":1002},"Center diagram on this node",{"type":41,"tag":849,"props":1004,"children":1005},{},[1006,1015,1024,1033],{"type":41,"tag":881,"props":1007,"children":1008},{},[1009],{"type":41,"tag":55,"props":1010,"children":1012},{"className":1011},[],[1013],{"type":46,"value":1014},"--depth",{"type":41,"tag":881,"props":1016,"children":1017},{},[1018],{"type":41,"tag":55,"props":1019,"children":1021},{"className":1020},[],[1022],{"type":46,"value":1023},"-d",{"type":41,"tag":881,"props":1025,"children":1026},{},[1027],{"type":41,"tag":55,"props":1028,"children":1030},{"className":1029},[],[1031],{"type":46,"value":1032},"2",{"type":41,"tag":881,"props":1034,"children":1035},{},[1036],{"type":46,"value":1037},"BFS traversal depth",{"type":41,"tag":849,"props":1039,"children":1040},{},[1041,1050,1053,1062],{"type":41,"tag":881,"props":1042,"children":1043},{},[1044],{"type":41,"tag":55,"props":1045,"children":1047},{"className":1046},[],[1048],{"type":46,"value":1049},"--direction",{"type":41,"tag":881,"props":1051,"children":1052},{},[],{"type":41,"tag":881,"props":1054,"children":1055},{},[1056],{"type":41,"tag":55,"props":1057,"children":1059},{"className":1058},[],[1060],{"type":46,"value":1061},"TB",{"type":41,"tag":881,"props":1063,"children":1064},{},[1065,1067,1072,1074,1080],{"type":46,"value":1066},"Layout: ",{"type":41,"tag":55,"props":1068,"children":1070},{"className":1069},[],[1071],{"type":46,"value":1061},{"type":46,"value":1073}," (top-bottom) or ",{"type":41,"tag":55,"props":1075,"children":1077},{"className":1076},[],[1078],{"type":46,"value":1079},"LR",{"type":46,"value":1081}," (left-right)",{"type":41,"tag":849,"props":1083,"children":1084},{},[1085,1094,1097,1106],{"type":41,"tag":881,"props":1086,"children":1087},{},[1088],{"type":41,"tag":55,"props":1089,"children":1091},{"className":1090},[],[1092],{"type":46,"value":1093},"--threshold",{"type":41,"tag":881,"props":1095,"children":1096},{},[],{"type":41,"tag":881,"props":1098,"children":1099},{},[1100],{"type":41,"tag":55,"props":1101,"children":1103},{"className":1102},[],[1104],{"type":46,"value":1105},"10",{"type":41,"tag":881,"props":1107,"children":1108},{},[1109,1111,1117],{"type":46,"value":1110},"Min complexity for ",{"type":41,"tag":55,"props":1112,"children":1114},{"className":1113},[],[1115],{"type":46,"value":1116},"complexity",{"type":46,"value":1118}," type",{"type":41,"tag":1120,"props":1121,"children":1123},"h3",{"id":1122},"examples",[1124],{"type":46,"value":1125},"Examples",{"type":41,"tag":169,"props":1127,"children":1129},{"className":171,"code":1128,"language":173,"meta":174,"style":174},"# Call graph centered on a function\nuv run {baseDir}\u002Fscripts\u002Fdiagram.py -t src\u002F -T call-graph -f parse_file\n\n# Class hierarchy for a Rust project\nuv run {baseDir}\u002Fscripts\u002Fdiagram.py -t src\u002F -l rust -T class-hierarchy\n\n# Module dependency map, left-to-right\nuv run {baseDir}\u002Fscripts\u002Fdiagram.py -t src\u002F -T module-deps --direction LR\n\n# Class members\nuv run {baseDir}\u002Fscripts\u002Fdiagram.py -t src\u002F -T containment\n\n# Complexity heatmap (threshold 5)\nuv run {baseDir}\u002Fscripts\u002Fdiagram.py -t src\u002F -T complexity --threshold 5\n\n# Data flow from entrypoints to a specific function\nuv run {baseDir}\u002Fscripts\u002Fdiagram.py -t src\u002F -T data-flow -f execute_query\n",[1130],{"type":41,"tag":55,"props":1131,"children":1132},{"__ignoreMap":174},[1133,1141,1185,1192,1200,1242,1249,1257,1299,1307,1316,1349,1357,1366,1409,1417,1426],{"type":41,"tag":180,"props":1134,"children":1135},{"class":182,"line":183},[1136],{"type":41,"tag":180,"props":1137,"children":1138},{"style":438},[1139],{"type":46,"value":1140},"# Call graph centered on a function\n",{"type":41,"tag":180,"props":1142,"children":1143},{"class":182,"line":361},[1144,1148,1152,1156,1161,1166,1171,1175,1180],{"type":41,"tag":180,"props":1145,"children":1146},{"style":187},[1147],{"type":46,"value":190},{"type":41,"tag":180,"props":1149,"children":1150},{"style":193},[1151],{"type":46,"value":277},{"type":41,"tag":180,"props":1153,"children":1154},{"style":193},[1155],{"type":46,"value":352},{"type":41,"tag":180,"props":1157,"children":1158},{"style":193},[1159],{"type":46,"value":1160}," -t",{"type":41,"tag":180,"props":1162,"children":1163},{"style":193},[1164],{"type":46,"value":1165}," src\u002F",{"type":41,"tag":180,"props":1167,"children":1168},{"style":193},[1169],{"type":46,"value":1170}," -T",{"type":41,"tag":180,"props":1172,"children":1173},{"style":193},[1174],{"type":46,"value":392},{"type":41,"tag":180,"props":1176,"children":1177},{"style":193},[1178],{"type":46,"value":1179}," -f",{"type":41,"tag":180,"props":1181,"children":1182},{"style":193},[1183],{"type":46,"value":1184}," parse_file\n",{"type":41,"tag":180,"props":1186,"children":1187},{"class":182,"line":399},[1188],{"type":41,"tag":180,"props":1189,"children":1190},{"emptyLinePlaceholder":428},[1191],{"type":46,"value":431},{"type":41,"tag":180,"props":1193,"children":1194},{"class":182,"line":424},[1195],{"type":41,"tag":180,"props":1196,"children":1197},{"style":438},[1198],{"type":46,"value":1199},"# Class hierarchy for a Rust project\n",{"type":41,"tag":180,"props":1201,"children":1202},{"class":182,"line":434},[1203,1207,1211,1215,1219,1223,1228,1233,1237],{"type":41,"tag":180,"props":1204,"children":1205},{"style":187},[1206],{"type":46,"value":190},{"type":41,"tag":180,"props":1208,"children":1209},{"style":193},[1210],{"type":46,"value":277},{"type":41,"tag":180,"props":1212,"children":1213},{"style":193},[1214],{"type":46,"value":352},{"type":41,"tag":180,"props":1216,"children":1217},{"style":193},[1218],{"type":46,"value":1160},{"type":41,"tag":180,"props":1220,"children":1221},{"style":193},[1222],{"type":46,"value":1165},{"type":41,"tag":180,"props":1224,"children":1225},{"style":193},[1226],{"type":46,"value":1227}," -l",{"type":41,"tag":180,"props":1229,"children":1230},{"style":193},[1231],{"type":46,"value":1232}," rust",{"type":41,"tag":180,"props":1234,"children":1235},{"style":193},[1236],{"type":46,"value":1170},{"type":41,"tag":180,"props":1238,"children":1239},{"style":193},[1240],{"type":46,"value":1241}," class-hierarchy\n",{"type":41,"tag":180,"props":1243,"children":1244},{"class":182,"line":444},[1245],{"type":41,"tag":180,"props":1246,"children":1247},{"emptyLinePlaceholder":428},[1248],{"type":46,"value":431},{"type":41,"tag":180,"props":1250,"children":1251},{"class":182,"line":468},[1252],{"type":41,"tag":180,"props":1253,"children":1254},{"style":438},[1255],{"type":46,"value":1256},"# Module dependency map, left-to-right\n",{"type":41,"tag":180,"props":1258,"children":1259},{"class":182,"line":500},[1260,1264,1268,1272,1276,1280,1284,1289,1294],{"type":41,"tag":180,"props":1261,"children":1262},{"style":187},[1263],{"type":46,"value":190},{"type":41,"tag":180,"props":1265,"children":1266},{"style":193},[1267],{"type":46,"value":277},{"type":41,"tag":180,"props":1269,"children":1270},{"style":193},[1271],{"type":46,"value":352},{"type":41,"tag":180,"props":1273,"children":1274},{"style":193},[1275],{"type":46,"value":1160},{"type":41,"tag":180,"props":1277,"children":1278},{"style":193},[1279],{"type":46,"value":1165},{"type":41,"tag":180,"props":1281,"children":1282},{"style":193},[1283],{"type":46,"value":1170},{"type":41,"tag":180,"props":1285,"children":1286},{"style":193},[1287],{"type":46,"value":1288}," module-deps",{"type":41,"tag":180,"props":1290,"children":1291},{"style":193},[1292],{"type":46,"value":1293}," --direction",{"type":41,"tag":180,"props":1295,"children":1296},{"style":193},[1297],{"type":46,"value":1298}," LR\n",{"type":41,"tag":180,"props":1300,"children":1302},{"class":182,"line":1301},9,[1303],{"type":41,"tag":180,"props":1304,"children":1305},{"emptyLinePlaceholder":428},[1306],{"type":46,"value":431},{"type":41,"tag":180,"props":1308,"children":1310},{"class":182,"line":1309},10,[1311],{"type":41,"tag":180,"props":1312,"children":1313},{"style":438},[1314],{"type":46,"value":1315},"# Class members\n",{"type":41,"tag":180,"props":1317,"children":1319},{"class":182,"line":1318},11,[1320,1324,1328,1332,1336,1340,1344],{"type":41,"tag":180,"props":1321,"children":1322},{"style":187},[1323],{"type":46,"value":190},{"type":41,"tag":180,"props":1325,"children":1326},{"style":193},[1327],{"type":46,"value":277},{"type":41,"tag":180,"props":1329,"children":1330},{"style":193},[1331],{"type":46,"value":352},{"type":41,"tag":180,"props":1333,"children":1334},{"style":193},[1335],{"type":46,"value":1160},{"type":41,"tag":180,"props":1337,"children":1338},{"style":193},[1339],{"type":46,"value":1165},{"type":41,"tag":180,"props":1341,"children":1342},{"style":193},[1343],{"type":46,"value":1170},{"type":41,"tag":180,"props":1345,"children":1346},{"style":193},[1347],{"type":46,"value":1348}," containment\n",{"type":41,"tag":180,"props":1350,"children":1352},{"class":182,"line":1351},12,[1353],{"type":41,"tag":180,"props":1354,"children":1355},{"emptyLinePlaceholder":428},[1356],{"type":46,"value":431},{"type":41,"tag":180,"props":1358,"children":1360},{"class":182,"line":1359},13,[1361],{"type":41,"tag":180,"props":1362,"children":1363},{"style":438},[1364],{"type":46,"value":1365},"# Complexity heatmap (threshold 5)\n",{"type":41,"tag":180,"props":1367,"children":1369},{"class":182,"line":1368},14,[1370,1374,1378,1382,1386,1390,1394,1399,1404],{"type":41,"tag":180,"props":1371,"children":1372},{"style":187},[1373],{"type":46,"value":190},{"type":41,"tag":180,"props":1375,"children":1376},{"style":193},[1377],{"type":46,"value":277},{"type":41,"tag":180,"props":1379,"children":1380},{"style":193},[1381],{"type":46,"value":352},{"type":41,"tag":180,"props":1383,"children":1384},{"style":193},[1385],{"type":46,"value":1160},{"type":41,"tag":180,"props":1387,"children":1388},{"style":193},[1389],{"type":46,"value":1165},{"type":41,"tag":180,"props":1391,"children":1392},{"style":193},[1393],{"type":46,"value":1170},{"type":41,"tag":180,"props":1395,"children":1396},{"style":193},[1397],{"type":46,"value":1398}," complexity",{"type":41,"tag":180,"props":1400,"children":1401},{"style":193},[1402],{"type":46,"value":1403}," --threshold",{"type":41,"tag":180,"props":1405,"children":1406},{"style":418},[1407],{"type":46,"value":1408}," 5\n",{"type":41,"tag":180,"props":1410,"children":1412},{"class":182,"line":1411},15,[1413],{"type":41,"tag":180,"props":1414,"children":1415},{"emptyLinePlaceholder":428},[1416],{"type":46,"value":431},{"type":41,"tag":180,"props":1418,"children":1420},{"class":182,"line":1419},16,[1421],{"type":41,"tag":180,"props":1422,"children":1423},{"style":438},[1424],{"type":46,"value":1425},"# Data flow from entrypoints to a specific function\n",{"type":41,"tag":180,"props":1427,"children":1429},{"class":182,"line":1428},17,[1430,1434,1438,1442,1446,1450,1454,1459,1463],{"type":41,"tag":180,"props":1431,"children":1432},{"style":187},[1433],{"type":46,"value":190},{"type":41,"tag":180,"props":1435,"children":1436},{"style":193},[1437],{"type":46,"value":277},{"type":41,"tag":180,"props":1439,"children":1440},{"style":193},[1441],{"type":46,"value":352},{"type":41,"tag":180,"props":1443,"children":1444},{"style":193},[1445],{"type":46,"value":1160},{"type":41,"tag":180,"props":1447,"children":1448},{"style":193},[1449],{"type":46,"value":1165},{"type":41,"tag":180,"props":1451,"children":1452},{"style":193},[1453],{"type":46,"value":1170},{"type":41,"tag":180,"props":1455,"children":1456},{"style":193},[1457],{"type":46,"value":1458}," data-flow",{"type":41,"tag":180,"props":1460,"children":1461},{"style":193},[1462],{"type":46,"value":1179},{"type":41,"tag":180,"props":1464,"children":1465},{"style":193},[1466],{"type":46,"value":1467}," execute_query\n",{"type":41,"tag":321,"props":1469,"children":1470},{},[],{"type":41,"tag":64,"props":1472,"children":1474},{"id":1473},"customization",[1475],{"type":46,"value":1476},"Customization",{"type":41,"tag":49,"props":1478,"children":1479},{},[1480,1485,1487,1492,1494,1499],{"type":41,"tag":154,"props":1481,"children":1482},{},[1483],{"type":46,"value":1484},"Direction:",{"type":46,"value":1486}," Use ",{"type":41,"tag":55,"props":1488,"children":1490},{"className":1489},[],[1491],{"type":46,"value":1061},{"type":46,"value":1493}," (default) for hierarchical views, ",{"type":41,"tag":55,"props":1495,"children":1497},{"className":1496},[],[1498],{"type":46,"value":1079},{"type":46,"value":1500}," for\nleft-to-right flows like dependency chains.",{"type":41,"tag":49,"props":1502,"children":1503},{},[1504,1509,1511,1516],{"type":41,"tag":154,"props":1505,"children":1506},{},[1507],{"type":46,"value":1508},"Depth:",{"type":46,"value":1510}," Increase ",{"type":41,"tag":55,"props":1512,"children":1514},{"className":1513},[],[1515],{"type":46,"value":1014},{"type":46,"value":1517}," to see more of the call graph. Decrease to\nreduce clutter. The script warns if the diagram exceeds 100 nodes.",{"type":41,"tag":49,"props":1519,"children":1520},{},[1521,1526,1528,1533,1535,1540,1542,1547],{"type":41,"tag":154,"props":1522,"children":1523},{},[1524],{"type":46,"value":1525},"Focus:",{"type":46,"value":1527}," Always use ",{"type":41,"tag":55,"props":1529,"children":1531},{"className":1530},[],[1532],{"type":46,"value":983},{"type":46,"value":1534}," for ",{"type":41,"tag":55,"props":1536,"children":1538},{"className":1537},[],[1539],{"type":46,"value":736},{"type":46,"value":1541}," on non-trivial codebases.\nFor ",{"type":41,"tag":55,"props":1543,"children":1545},{"className":1544},[],[1546],{"type":46,"value":688},{"type":46,"value":1548},", omitting focus auto-targets the top 10 complexity hotspots.",{"type":41,"tag":49,"props":1550,"children":1551},{},[1552,1557,1559,1565],{"type":41,"tag":154,"props":1553,"children":1554},{},[1555],{"type":46,"value":1556},"Language:",{"type":46,"value":1558}," Prefer ",{"type":41,"tag":55,"props":1560,"children":1562},{"className":1561},[],[1563],{"type":46,"value":1564},"--language auto",{"type":46,"value":1566}," for polyglot or unfamiliar repos.\nUse an explicit language only when you know the target is single-language or\nyou need to exclude unrelated components.",{"type":41,"tag":321,"props":1568,"children":1569},{},[],{"type":41,"tag":64,"props":1571,"children":1573},{"id":1572},"supporting-documentation",[1574],{"type":46,"value":1575},"Supporting Documentation",{"type":41,"tag":71,"props":1577,"children":1578},{},[1579,1591],{"type":41,"tag":75,"props":1580,"children":1581},{},[1582,1589],{"type":41,"tag":154,"props":1583,"children":1584},{},[1585],{"type":41,"tag":595,"props":1586,"children":1587},{"href":597},[1588],{"type":46,"value":597},{"type":46,"value":1590}," -\nDetailed docs and Mermaid examples for each diagram type",{"type":41,"tag":75,"props":1592,"children":1593},{},[1594,1601],{"type":41,"tag":154,"props":1595,"children":1596},{},[1597],{"type":41,"tag":595,"props":1598,"children":1599},{"href":800},[1600],{"type":46,"value":800},{"type":46,"value":1602}," -\nID sanitization, escaping, style definitions, and common pitfalls",{"type":41,"tag":1604,"props":1605,"children":1606},"style",{},[1607],{"type":46,"value":1608},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":1610,"total":1765},[1611,1630,1640,1658,1673,1686,1697,1707,1720,1731,1743,1754],{"slug":1612,"name":1612,"fn":1613,"description":1614,"org":1615,"tags":1616,"stars":23,"repoUrl":24,"updatedAt":1629},"address-sanitizer","detect memory errors during fuzzing","AddressSanitizer detects memory errors during fuzzing. Use when fuzzing C\u002FC++ code to find buffer overflows and use-after-free bugs.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1617,1620,1623,1626],{"name":1618,"slug":1619,"type":16},"C#","c",{"name":1621,"slug":1622,"type":16},"Debugging","debugging",{"name":1624,"slug":1625,"type":16},"Security","security",{"name":1627,"slug":1628,"type":16},"Testing","testing","2026-07-17T06:05:14.925095",{"slug":1631,"name":1631,"fn":1632,"description":1633,"org":1634,"tags":1635,"stars":23,"repoUrl":24,"updatedAt":1639},"aflpp","perform multi-core fuzzing of C\u002FC++ projects","AFL++ is a fork of AFL with better fuzzing performance and advanced features. Use for multi-core fuzzing of C\u002FC++ projects.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1636,1637,1638],{"name":1618,"slug":1619,"type":16},{"name":1624,"slug":1625,"type":16},{"name":1627,"slug":1628,"type":16},"2026-07-17T06:05:12.433192",{"slug":1641,"name":1641,"fn":1642,"description":1643,"org":1644,"tags":1645,"stars":23,"repoUrl":24,"updatedAt":1657},"agentic-actions-auditor","audit GitHub Actions for security vulnerabilities","Audits GitHub Actions workflows for security vulnerabilities in AI agent integrations including Claude Code Action, Gemini CLI, OpenAI Codex, and GitHub AI Inference. Detects attack vectors where attacker-controlled input reaches AI agents running in CI\u002FCD pipelines, including env var intermediary patterns, direct expression injection, dangerous sandbox configurations, and wildcard user allowlists. Use when reviewing workflow files that invoke AI coding agents, auditing CI\u002FCD pipeline security for prompt injection risks, or evaluating agentic action configurations.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1646,1649,1652,1653,1656],{"name":1647,"slug":1648,"type":16},"Agents","agents",{"name":1650,"slug":1651,"type":16},"CI\u002FCD","ci-cd",{"name":21,"slug":22,"type":16},{"name":1654,"slug":1655,"type":16},"GitHub Actions","github-actions",{"name":1624,"slug":1625,"type":16},"2026-07-18T05:47:48.564744",{"slug":1659,"name":1659,"fn":1660,"description":1661,"org":1662,"tags":1663,"stars":23,"repoUrl":24,"updatedAt":1672},"algorand-vulnerability-scanner","scan Algorand smart contracts for vulnerabilities","Scans Algorand smart contracts for 11 common vulnerabilities including rekeying attacks, unchecked transaction fees, missing field validations, and access control issues. Use when auditing Algorand projects (TEAL\u002FPyTeal).",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1664,1667,1668,1669],{"name":1665,"slug":1666,"type":16},"Audit","audit",{"name":21,"slug":22,"type":16},{"name":1624,"slug":1625,"type":16},{"name":1670,"slug":1671,"type":16},"Smart Contracts","smart-contracts","2026-07-18T05:47:43.989063",{"slug":1674,"name":1674,"fn":1675,"description":1676,"org":1677,"tags":1678,"stars":23,"repoUrl":24,"updatedAt":1685},"ask-questions-if-underspecified","clarify requirements before implementation","Clarify requirements before implementing. Use when serious doubts arise.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1679,1682],{"name":1680,"slug":1681,"type":16},"Engineering","engineering",{"name":1683,"slug":1684,"type":16},"Productivity","productivity","2026-07-17T06:05:33.543262",{"slug":1687,"name":1687,"fn":1688,"description":1689,"org":1690,"tags":1691,"stars":23,"repoUrl":24,"updatedAt":1696},"atheris","fuzz Python code with Atheris","Atheris is a coverage-guided Python fuzzer based on libFuzzer. Use for fuzzing pure Python code and Python C extensions.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1692,1694,1695],{"name":1693,"slug":642,"type":16},"Python",{"name":1624,"slug":1625,"type":16},{"name":1627,"slug":1628,"type":16},"2026-07-17T06:05:14.575191",{"slug":1698,"name":1698,"fn":1699,"description":1700,"org":1701,"tags":1702,"stars":23,"repoUrl":24,"updatedAt":1706},"audit-augmentation","augment code graphs with audit findings","Augments Trailmark code graphs with external audit findings from SARIF static analysis results, weAudit annotation files, and version-gated Trailmark 0.4.x binary-analysis graph exports. Maps findings to graph nodes by file and line overlap, creates severity-based subgraphs, and enables cross-referencing findings with pre-analysis data (blast radius, taint, etc.). Use when projecting SARIF results onto a code graph, overlaying weAudit annotations, importing binary graph findings, cross-referencing Semgrep, CodeQL, or binary-analysis findings with call graph data, or visualizing audit findings in the context of code structure.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1703,1704,1705],{"name":1665,"slug":1666,"type":16},{"name":21,"slug":22,"type":16},{"name":1624,"slug":1625,"type":16},"2026-08-01T05:44:54.920542",{"slug":1708,"name":1708,"fn":1709,"description":1710,"org":1711,"tags":1712,"stars":23,"repoUrl":24,"updatedAt":1719},"audit-context-building","build architectural context for code analysis","Enables ultra-granular, line-by-line code analysis to build deep architectural context before vulnerability or bug finding.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1713,1716,1717,1718],{"name":1714,"slug":1715,"type":16},"Architecture","architecture",{"name":1665,"slug":1666,"type":16},{"name":21,"slug":22,"type":16},{"name":1680,"slug":1681,"type":16},"2026-07-18T05:47:40.122449",{"slug":1721,"name":1721,"fn":1722,"description":1723,"org":1724,"tags":1725,"stars":23,"repoUrl":24,"updatedAt":1730},"audit-prep-assistant","prepare codebases for security audits","Prepares codebases for security review using Trail of Bits' checklist. Helps set review goals, runs static analysis tools, increases test coverage, removes dead code, ensures accessibility, and generates documentation (flowcharts, user stories, inline comments).",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1726,1727,1728,1729],{"name":1665,"slug":1666,"type":16},{"name":21,"slug":22,"type":16},{"name":1680,"slug":1681,"type":16},{"name":1624,"slug":1625,"type":16},"2026-07-18T05:47:39.210985",{"slug":1732,"name":1732,"fn":1733,"description":1734,"org":1735,"tags":1736,"stars":23,"repoUrl":24,"updatedAt":1742},"burpsuite-project-parser","parse Burp Suite project files","Searches and explores Burp Suite project files (.burp) from the command line. Use when searching response headers or bodies with regex patterns, extracting security audit findings, dumping proxy history or site map data, or analyzing HTTP traffic captured in a Burp project.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1737,1738,1741],{"name":1665,"slug":1666,"type":16},{"name":1739,"slug":1740,"type":16},"CLI","cli",{"name":1624,"slug":1625,"type":16},"2026-07-17T06:05:33.198077",{"slug":1744,"name":1744,"fn":1745,"description":1746,"org":1747,"tags":1748,"stars":23,"repoUrl":24,"updatedAt":1753},"c-review","audit C and C++ code","Performs comprehensive C\u002FC++ security review for memory corruption, integer overflows, race conditions, and platform-specific vulnerabilities. Use when auditing native C\u002FC++ applications, reviewing daemons or services for memory safety, or hunting integer overflow \u002F use-after-free \u002F race conditions in userspace code.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1749,1750,1751,1752],{"name":1665,"slug":1666,"type":16},{"name":1618,"slug":1619,"type":16},{"name":21,"slug":22,"type":16},{"name":1624,"slug":1625,"type":16},"2026-07-17T06:05:11.333374",{"slug":1755,"name":1755,"fn":1756,"description":1757,"org":1758,"tags":1759,"stars":23,"repoUrl":24,"updatedAt":1764},"cairo-vulnerability-scanner","scan Cairo and StarkNet contracts for vulnerabilities","Scans Cairo\u002FStarkNet smart contracts for 6 critical vulnerabilities including felt252 arithmetic overflow, L1-L2 messaging issues, address conversion problems, and signature replay. Use when auditing StarkNet projects.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1760,1761,1762,1763],{"name":1665,"slug":1666,"type":16},{"name":21,"slug":22,"type":16},{"name":1624,"slug":1625,"type":16},{"name":1670,"slug":1671,"type":16},"2026-07-18T05:47:42.84568",111,{"items":1767,"total":1813},[1768,1775,1781,1789,1796,1801,1807],{"slug":1612,"name":1612,"fn":1613,"description":1614,"org":1769,"tags":1770,"stars":23,"repoUrl":24,"updatedAt":1629},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1771,1772,1773,1774],{"name":1618,"slug":1619,"type":16},{"name":1621,"slug":1622,"type":16},{"name":1624,"slug":1625,"type":16},{"name":1627,"slug":1628,"type":16},{"slug":1631,"name":1631,"fn":1632,"description":1633,"org":1776,"tags":1777,"stars":23,"repoUrl":24,"updatedAt":1639},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1778,1779,1780],{"name":1618,"slug":1619,"type":16},{"name":1624,"slug":1625,"type":16},{"name":1627,"slug":1628,"type":16},{"slug":1641,"name":1641,"fn":1642,"description":1643,"org":1782,"tags":1783,"stars":23,"repoUrl":24,"updatedAt":1657},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1784,1785,1786,1787,1788],{"name":1647,"slug":1648,"type":16},{"name":1650,"slug":1651,"type":16},{"name":21,"slug":22,"type":16},{"name":1654,"slug":1655,"type":16},{"name":1624,"slug":1625,"type":16},{"slug":1659,"name":1659,"fn":1660,"description":1661,"org":1790,"tags":1791,"stars":23,"repoUrl":24,"updatedAt":1672},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1792,1793,1794,1795],{"name":1665,"slug":1666,"type":16},{"name":21,"slug":22,"type":16},{"name":1624,"slug":1625,"type":16},{"name":1670,"slug":1671,"type":16},{"slug":1674,"name":1674,"fn":1675,"description":1676,"org":1797,"tags":1798,"stars":23,"repoUrl":24,"updatedAt":1685},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1799,1800],{"name":1680,"slug":1681,"type":16},{"name":1683,"slug":1684,"type":16},{"slug":1687,"name":1687,"fn":1688,"description":1689,"org":1802,"tags":1803,"stars":23,"repoUrl":24,"updatedAt":1696},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1804,1805,1806],{"name":1693,"slug":642,"type":16},{"name":1624,"slug":1625,"type":16},{"name":1627,"slug":1628,"type":16},{"slug":1698,"name":1698,"fn":1699,"description":1700,"org":1808,"tags":1809,"stars":23,"repoUrl":24,"updatedAt":1706},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1810,1811,1812],{"name":1665,"slug":1666,"type":16},{"name":21,"slug":22,"type":16},{"name":1624,"slug":1625,"type":16},77]