Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add Narwhal-Lab/MagicSkills --skill c_2_astgit clone --depth 1 https://github.com/Narwhal-Lab/MagicSkillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/narwhal-lab/magicskills/c_2_ast)<a href="https://agentmods.dev/skills/narwhal-lab/magicskills/c_2_ast"><img src="https://agentmods.dev/badge/skills/narwhal-lab/magicskills/c_2_ast/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/narwhal-lab/magicskills/c_2_ast"><img src="https://agentmods.dev/badge/skills/narwhal-lab/magicskills/c_2_ast.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00050 | $0.01010 |
| Opus 5.5 | $0.00020 | $0.00404 |
| Sonnet 5.5 | $0.00010 | $0.00202 |
| Haiku 4.5 | $0.00005 | $0.00101 |
Grade A, and why
c-to-ast scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 171 lines — stays where its author put it; the contents beside it link to each section on GitHub.
C to AST Skill
Purpose
This Skill converts C source code into its Abstract Syntax Tree (AST) representation.
Use this Skill when you need to:
- Understand the structure of a C program
- Analyze functions, statements, and expressions
- Prepare C code for static analysis or security analysis
- Transform C code into an intermediate representation (AST)
- Feed structured code information into downstream tools or agents
The AST is generated using a Python-based C parser and printed directly to standard output.
When to Use
Apply this Skill when the user asks to:
- “Parse this C code”
- “Convert this C file to an AST”
- “Show me the AST of this C program”
- “Analyze the structure of this C code”
- “Extract syntax tree / abstract syntax tree from C”
This Skill is especially useful in compiler frontends, program analysis, and security research workflows.
Instructions
Follow these steps strictly and in order:
-
Navigate to the Skill scripts directory
- Change working directory to the
scripts/directory under this skill:scripts/
- Change working directory to the
-
Handle the input C source
- If the user provides a path to a
.cfile, use it directly. - If the user provides inline C code as a string, you must first save it to a C source file using the provided script:
python3 save_c.py --input "<C code string>" --output <output_dir> --filename <filename>.c - Ensure the generated file has a
.cextension and is successfully written to disk.
- If the user provides a path to a
-
Run the AST extraction script
- Convert the C source file to its Abstract Syntax Tree by executing:
python3 c_2_ast.py --input <path_to_c_file>
- Convert the C source file to its Abstract Syntax Tree by executing:
-
Do not modify the source code
- This Skill is strictly read-only.
- Do not rewrite, reformat, optimize, or otherwise alter the C code.
-
Return the AST output verbatim
- The script prints the AST directly to standard output.
- Return the output exactly as produced.
- Do not summarize, paraphrase, or restructure the AST.
- Preserve indentation, hierarchy, and node ordering.
What ships with it
7 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago First seen · 171 lines · 50 tokens per session scan A 1d6023883af8
c-to-ast is a skill published in the GitHub repository Narwhal-Lab/MagicSkills (317 stars, last pushed 6mo ago), licensed MIT. It adds 50 tokens to every session and 1,010 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
windbg-diagnostic-method
Use with every WinDbg plugin investigation to apply evidence-first reasoning, confidence calibration, contrarian review, structured reporting, and deterministic validation. Not a bug-family-specific triage skill.
windbg-kernel-bugcheck-triage
Use when a kernel dump reports a Windows bugcheck; decode parameters and recover exception or trap context before investigating your driver. Not for user-mode process crashes or blaming a module from its name alone.
windbg-user-exception-triage
Use when a native C/C++ app, service, or user-mode driver host (including UMDF) crashes with a structured exception in a dump or WinDbg session, including native faults inside managed processes. Not for managed .NET exceptions, WinUI/XAML app errors, or kernel bugchecks.
windbg-user-heap-corruption-investigation
Use when an app, service, or user-mode driver host heap fails or Application Verifier detects corruption; inspect history and bounds. Not for kernel pool corruption or ordinary OOM.
windbg-user-virtual-memory-exhaustion
Use when a native app, service, or user-mode driver host allocation fails; distinguish VA exhaustion, fragmentation, and commit pressure. Not for managed .NET heap growth, proving a leak from one snapshot, or corruption.
windbg-user-wait-chain-analysis
Use when an app, service, or user-mode driver host is unresponsive on locks, COM/RPC, I/O, or another process; follow the blocker chain. Not for a crash solely from an exception stack.