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 | $0.00025 | $0.00505 |
| Sonnet 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 10d 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.
- 10d 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 (315 stars, last pushed 5mo ago), licensed MIT. It adds 50 tokens to every session and 1,010 once invoked, about $0.0003 per session on Opus 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
winui-session-report
Analyze the current or a recent agent session (GitHub Copilot CLI or Claude Code) and generate a diagnostic report. Use only when the user explicitly asks for session feedback, agent debugging, or a review of what happened during a build session. Do not inspect session data automatically.
spm-build-analysis
Analyze Swift Package Manager dependencies, package plugins, module variants, and CI-oriented build overhead that slow Xcode builds. Use when a developer suspects packages, plugins, or dependency graph shape are hurting clean or incremental build performance, mentions SPM slowness, package resolution time, build…
xcode-compilation-analyzer
Analyze Swift and mixed-language compile hotspots using build timing summaries and Swift frontend diagnostics, then produce a recommend-first source-level optimization plan. Use when a developer reports slow compilation, type-checking warnings, expensive clean-build compile phases, long CompileSwiftSources tasks…
code-explorer
Use this skill when exploring, analyzing, or understanding project/code structure. Required for tasks like "analyze project", "explore codebase", "understand how X works".
xcode-project-analyzer
Audit Xcode project configuration, build settings, scheme behavior, and script phases to find build-time improvements with explicit approval gates. Use when a developer wants project-level build analysis, slow incremental builds, guidance on target dependencies, build settings review, run script phase analysis…
webflow-code-component:troubleshoot-deploy
Debug deployment failures for Webflow Code Components. Analyzes error messages, identifies root causes, and provides specific fixes for common issues.