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 mohitmishra786/low-level-dev-skills --skill llvm-ir-and-passesgit clone --depth 1 https://github.com/mohitmishra786/low-level-dev-skillsWrote 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/mohitmishra786/low-level-dev-skills/llvm-ir-and-passes)<a href="https://agentmods.dev/skills/mohitmishra786/low-level-dev-skills/llvm-ir-and-passes"><img src="https://agentmods.dev/badge/skills/mohitmishra786/low-level-dev-skills/llvm-ir-and-passes/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/mohitmishra786/low-level-dev-skills/llvm-ir-and-passes"><img src="https://agentmods.dev/badge/skills/mohitmishra786/low-level-dev-skills/llvm-ir-and-passes.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.00062 | $0.00843 |
| Opus 5.5 | $0.00025 | $0.00337 |
| Sonnet 5.5 | $0.00012 | $0.00169 |
| Haiku 4.5 | $0.00006 | $0.00084 |
Grade A, and why
llvm-ir-and-passes 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 14d 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 — 107 lines — stays where its author put it; the contents beside it link to each section on GitHub.
LLVM IR and Passes
Purpose
Teach agents to read and reason about LLVM IR (SSA, types, terminators), navigate the standard pass pipeline, and use opt/llvm-dis for inspection. Complements skills/compilers/llvm (toolchain) and skills/compiler-internals/llvm-passes (writing plugins) — not merged.
Triggers
- Understanding what
-O2changed in generated IR - Triaging miscompiles between Clang versions
- Preparing to write a custom pass
- Teaching SSA and dominance without writing C++ passes yet
Workflow
1. LLVM IR structure
; Function in SSA form
define i32 @add(i32 %a, i32 %b) {
entry:
%sum = add i32 %a, %b
ret i32 %sum
}
Key concepts: basic blocks, PHI nodes at merges, typed values (i32, ptr, vectors).
2. Emit IR from Clang
clang -S -emit-llvm -O0 -o foo.ll foo.c
clang -c -emit-llvm -O2 -o foo.bc foo.c
llvm-dis foo.bc -o foo.ll
3. Standard optimization pipeline (New PM)
Clang -O2 roughly runs:
SimplifyCFG → InstCombine → GVN → LICM → LoopVectorize → ...
Inspect with:
opt -passes='default<O2>' -S foo.ll -o foo-opt.ll
opt -passes='default<O2>' -print-passes foo.ll 2>&1 | head
4. Useful analysis passes
| Pass | Shows |
|---|---|
-passes=print<domtree> |
Dominator tree |
-passes=print<loops> |
Loop nests |
-passes=print-alias-sets |
Alias sets |
opt -passes='print<domtree>' -disable-output foo.ll
5. Reading PHI and UB
merge:
%v = phi i32 [ %a, %then ], [ %b, %else ]
undef and poison in IR model LLVM poison semantics — distinct from C UB but related.
6. Compare before/after
opt -passes='instcombine,simplifycfg' -S foo.ll -o - | diff -u foo.ll -
7. Agent usage
/llvm-ir-and-passes Explain this PHI node and which pass likely created it
Common Problems
| Symptom | Cause | Fix |
|---|---|---|
| Pass not found | LLVM version rename | opt --print-passes for your build |
| IR mismatch | Different LLVM major | Match clang/opt versions |
| "optnone" blocks opts | -O0 attribute |
Compile with -O1+ |
| Huge IR | Inlined headers | -fno-discard-value-names off; filter function |
| Wrong pipeline | Legacy vs NPM | Use -passes= syntax |
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.
- 14d ago Changed · +1 lines 67af9e8d6105
- 3mo ago First seen · 106 lines · 62 tokens per session scan A 1ab5a6cd247e
llvm-ir-and-passes is a skill published in the GitHub repository mohitmishra786/low-level-dev-skills (310 stars, last pushed 14d ago), licensed MIT. It adds 62 tokens to every session and 843 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.
llvm-ir-and-passes compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| llvm-ir-and-passesmohitmishra786/low-level-dev-skills | Skill | 310 | 14d ago | MIT | A | 62 | Claude Code, Codex |
| ecommerce-marketing-strategy-buildernexscope-ai/eCommerce-Skills | Skill | 1.6k | today | MIT | A | 112 | Claude Code, Codex |
| product-description-generatornexscope-ai/eCommerce-Skills | Skill | 1.6k | today | MIT | A | 126 | Claude Code, Codex |
| shopify-marketingnexscope-ai/eCommerce-Skills | Skill | 1.6k | today | MIT | A | 60 | Claude Code, Codex |
| tiktok-shop-cross-bordernexscope-ai/eCommerce-Skills | Skill | 1.6k | today | MIT | A | 55 | Claude Code, Codex |
| ecommerce-landing-pagenexscope-ai/eCommerce-Skills | Skill | 1.6k | today | MIT | A | 45 | Claude Code, Codex |
| market-gap-analysisnexscope-ai/eCommerce-Skills | Skill | 1.6k | today | MIT | A | 38 | Claude Code, Codex |