Agent skill

Llvm Learning

by aftermathlabs in aftermathlabs/llvm-msvc

Comprehensive learning resources and tutorials for LLVM, Clang, and compiler development.

AGPL-3.0Auto-check passedEducation

Install Llvm Learning

skills CLI
$ npx skills add aftermathlabs/llvm-msvc --skill llvm-learning -a claude-code

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

GitHub CLI
$ gh skill install aftermathlabs/llvm-msvc llvm-learning --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/aftermathlabs/llvm-msvc.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/llvm-learning .claude/skills/llvm-learning && 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
llvm-learning
GitHub stars
438
Token cost
~2.1k tokens
SKILL.md length
388 words
Files
1
Skills in repo
8
Repo updated
First seen
Licence
AGPL-3.0

At a glance

Comprehensive learning resources and tutorials for LLVM, Clang, and compiler development.

  • Works in 4 steps: Start with Kaleidoscope: Official LLVM… → Understand LLVM IR: Learn the… → Write Simple Passes: Transform IR with… → …
  • Helping users learn LLVM internals
  • SKILL.md covers Learning Paths, Official Resources, Community Resources and LLVM IR Essentials, plus 5 more sections
  • Reaches raw.githubusercontent.com

What it does

Llvm Learning is an agent skill from aftermathlabs/llvm-msvc. Comprehensive learning resources and tutorials for LLVM, Clang, and compiler development. Use this skill when helping users learn LLVM internals, find educational resources, or understand compiler concepts.

Its SKILL.md is about 2.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Education. It works with GitHub. The repository describes itself as: LLVM fork with explicit compatibility with MSVC 2022 features. The licence is AGPL-3.0.

When your agent uses it

  • Helping users learn LLVM internals
  • Find educational resources
  • Understand compiler concepts

Example prompts

  • “/llvm-learning”

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Start with Kaleidoscope: Official LLVM tutorial building a simple language
  2. Understand LLVM IR: Learn the intermediate representation
  3. Write Simple Passes: Transform IR with custom passes
  4. Explore Clang: Understand C/C++ frontend

What it can do on your machine

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

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are cpp, bash and llvm).

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

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • raw.githubusercontent.com

    Also links to:

    • llvm.org
    • github.com
    • clang.llvm.org
    • discourse.llvm.org

    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

Llvm Learning loads about 2.1k tokens when it runs. Until then it costs about 55 tokens; SKILL.md has 388 words of instructions outside code blocks.

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

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 passed

The automated check found no risky patterns in SKILL.md.

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 aftermathlabs/llvm-msvc at commit bfc7254, republished under its AGPL-3.0 licence (© aftermathlabs). 388 words, ~2,142 tokens.

Download SKILL.mdSave it as .claude/skills/llvm-learning/SKILL.md (or your agent's skills folder).
name
llvm-learning
description
Comprehensive learning resources and tutorials for LLVM, Clang, and compiler development. Use this skill when helping users learn LLVM internals, find educational resources, or understand compiler concepts.

LLVM Learning Skill

This skill provides curated learning paths and resources for mastering LLVM, Clang, and compiler development.

Learning Paths

Beginner Path
  1. Start with Kaleidoscope: Official LLVM tutorial building a simple language
  2. Understand LLVM IR: Learn the intermediate representation
  3. Write Simple Passes: Transform IR with custom passes
  4. Explore Clang: Understand C/C++ frontend
Intermediate Path
  1. Deep Dive into Optimization: Study built-in optimization passes
  2. Backend Development: Target code generation
  3. Analysis Frameworks: Pointer analysis, dataflow
  4. Clang Tooling: LibTooling, AST matchers
Advanced Path
  1. MLIR: Multi-level IR for domain-specific compilation
  2. JIT Compilation: ORC JIT framework
  3. Security Features: Sanitizers, CFI implementation
  4. Contribute to LLVM: Patches, reviews, community

Official Resources

Documentation
Tutorials

Community Resources

Books and Guides
  • Learn LLVM 12 by Kai Nacke: Comprehensive practical guide
  • LLVM Techniques, Tips, and Best Practices: Advanced patterns
  • Getting Started with LLVM Core Libraries: Foundation concepts
  • LLVM Essentials: Quick start guide
Video Resources
  • LLVM Developer Meetings: Recorded talks on YouTube
  • LLVM Weekly: Newsletter with latest developments
  • EuroLLVM/US LLVM: Conference recordings
GitHub Learning Projects
# Highly recommended starter projects
banach-space/llvm-tutor     # Comprehensive pass examples
hunterzju/llvm-tutorial     # Step-by-step tutorials
jauhien/iron-kaleidoscope   # Kaleidoscope in Rust
bigconvience/llvm-ir-in-action  # IR examples

LLVM IR Essentials

Basic Structure
llvm
; Module level
@global_var = global i32 42

; Function definition
define i32 @add(i32 %a, i32 %b) {
entry:
    %sum = add i32 %a, %b
    ret i32 %sum
}

; External declaration
declare i32 @printf(i8*, ...)
Common Instructions
llvm
; Arithmetic
%result = add i32 %a, %b
%result = sub i32 %a, %b
%result = mul i32 %a, %b

; Memory
%ptr = alloca i32
store i32 %value, i32* %ptr
%loaded = load i32, i32* %ptr

; Control flow
br i1 %cond, label %then, label %else
br label %next

; Function calls
%retval = call i32 @function(i32 %arg)
Type System
llvm
; Integer types: i1, i8, i16, i32, i64, i128
; Floating point: half, float, double
; Pointers: i32*, [10 x i32]*, { i32, i64 }*
; Arrays: [10 x i32]
; Structs: { i32, i64, i8* }
; Vectors: <4 x i32>

Writing LLVM Passes

cpp
#include "llvm/Passes/PassPlugin.h"
#include "llvm/Passes/PassBuilder.h"

struct MyPass : public llvm::PassInfoMixin<MyPass> {
    llvm::PreservedAnalyses run(llvm::Function &F,
                                 llvm::FunctionAnalysisManager &FAM) {
        for (auto &BB : F) {
            for (auto &I : BB) {
                llvm::errs() << I << "\n";
            }
        }
        return llvm::PreservedAnalyses::all();
    }
};

// Plugin registration
extern "C" LLVM_ATTRIBUTE_WEAK ::llvm::PassPluginLibraryInfo
llvmGetPassPluginInfo() {
    return {LLVM_PLUGIN_API_VERSION, "MyPass", LLVM_VERSION_STRING,
            [](llvm::PassBuilder &PB) {
                PB.registerPipelineParsingCallback(
                    [](llvm::StringRef Name, llvm::FunctionPassManager &FPM,
                       llvm::ArrayRef<llvm::PassBuilder::PipelineElement>) {
                        if (Name == "my-pass") {
                            FPM.addPass(MyPass());
                            return true;
                        }
                        return false;
                    });
            }};
}
Running Custom Passes
bash
# Build as shared library
clang++ -shared -fPIC -o MyPass.so MyPass.cpp `llvm-config --cxxflags --ldflags`

# Run with opt
opt -load-pass-plugin=./MyPass.so -passes="my-pass" input.ll -o output.ll

Clang Development

AST Exploration
bash
# Dump AST
clang -Xclang -ast-dump -fsyntax-only source.cpp

# AST as JSON
clang -Xclang -ast-dump=json -fsyntax-only source.cpp
LibTooling Basics
cpp
#include "clang/Tooling/Tooling.h"
#include "clang/ASTMatchers/ASTMatchers.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"

using namespace clang::ast_matchers;

// Match all function declarations
auto matcher = functionDecl().bind("func");

class Callback : public MatchFinder::MatchCallback {
    void run(const MatchFinder::MatchResult &Result) override {
        if (auto *FD = Result.Nodes.getNodeAs<FunctionDecl>("func")) {
            llvm::outs() << "Found: " << FD->getName() << "\n";
        }
    }
};
AST Matchers Reference
cpp
// Common matchers
functionDecl()               // Match function declarations
varDecl()                    // Match variable declarations
binaryOperator()             // Match binary operators
callExpr()                   // Match function calls
ifStmt()                     // Match if statements

// Narrowing matchers
hasName("foo")               // Match by name
hasType(asString("int"))     // Match by type
isPrivate()                  // Match private members

// Traversal matchers
hasDescendant(...)           // Match in subtree
hasAncestor(...)             // Match in parent tree
hasBody(...)                 // Match function body

Development Tools

Show full SKILL.md (156 more words)Show less
Essential Commands
bash
# Compile to LLVM IR
clang -S -emit-llvm source.c -o source.ll

# Optimize IR
opt -O2 source.ll -o optimized.ll

# Disassemble bitcode
llvm-dis source.bc -o source.ll

# Assemble to bitcode
llvm-as source.ll -o source.bc

# Generate native code
llc source.ll -o source.s

# View CFG
opt -passes=view-cfg source.ll
Debugging LLVM IR
bash
# With debug info
clang -g -S -emit-llvm source.c

# Debug IR transformation
opt -debug-pass=Structure -O2 source.ll

# Verify IR validity
opt -passes=verify source.ll

Common Analysis APIs

cpp
// Dominator Tree
#include "llvm/Analysis/Dominators.h"
DominatorTree &DT = FAM.getResult<DominatorTreeAnalysis>(F);
if (DT.dominates(BB1, BB2)) { /* BB1 dominates BB2 */ }

// Loop Analysis
#include "llvm/Analysis/LoopInfo.h"
LoopInfo &LI = FAM.getResult<LoopAnalysis>(F);
for (Loop *L : LI) { /* process loops */ }

// Alias Analysis
#include "llvm/Analysis/AliasAnalysis.h"
AAResults &AA = FAM.getResult<AAManager>(F);
AliasResult R = AA.alias(Ptr1, Ptr2);

// Call Graph
#include "llvm/Analysis/CallGraph.h"
CallGraph &CG = MAM.getResult<CallGraphAnalysis>(M);

Practice Projects

Beginner
  1. Instruction counter pass
  2. Function call logger
  3. Dead code finder
Intermediate
  1. Simple constant propagation
  2. Branch probability estimator
  3. Memory access pattern analyzer
Advanced
  1. Custom optimization pass
  2. Security vulnerability detector
  3. Domain-specific language frontend

Community

Getting Help
Contributing

Resources Index

For a comprehensive list of tutorials, books, and example projects, see the LLVM Tutorial and Clang Tutorial sections in the main README.md.

Getting Detailed Information

When you need detailed and up-to-date resource links, tutorials, or learning materials, fetch the latest data from:

https://raw.githubusercontent.com/gmh5225/awesome-llvm-security/refs/heads/main/README.md

This README contains comprehensive curated lists of:

  • LLVM tutorials and learning resources (LLVM Tutorial section)
  • Clang tutorials and AST guides (Clang Tutorial section)
  • C++ modern programming guides (CPP Tutorial section)
  • Compiler and security books

© aftermathlabs, AGPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/llvm-learning of aftermathlabs/llvm-msvc.

Open the folder on GitHubat commit bfc7254

Compare with similar skills

Llvm Learning 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.

Llvm Learning compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Llvm Learning this skillaftermathlabs/llvm-msvc438—~2.1kAutomated safety check: PassAGPL-3.0
Malloy Reviewmalloydata/publisher116—~2.5kAutomated safety check: PassMIT
Codebase to Coursezarazhangrui/codebase-to-course5.7k—~4.4kAutomated safety check: PassNone
MCPA Certification Tutorrohitg00/ai-engineering-from-scratch65k—~3.5kAutomated safety check: PassMIT
Claude Certification Tutorrohitg00/ai-engineering-from-scratch65k—~3kAutomated safety check: PassMIT
Review PRmicrosoft/vscode-containers141—~900Automated safety check: PassCustom licence

Similar skills

  • Malloy Review

    malloydata/publisher

    Malloy semantic-model code review. An agent skill from malloydata/publisher.

    116 GitHub stars~2.5k tokensUpdated today
    EducationAuto-check passed
  • Codebase to Course

    zarazhangrui/codebase-to-course

    Turns a codebase into an interactive single-page HTML course for non-technical learners, with scroll modules, animated diagrams, quizzes and plain-English code translations.

    5.7k GitHub stars~4.4k tokensUpdated 6 mo ago
    EducationAuto-check passed
  • MCPA Certification Tutor

    rohitg00/ai-engineering-from-scratch

    Turns a GitHub course repository into an interactive tutor for the MCP Associate certification, making the learner explain and defend each step.

    65k GitHub stars~3.5k tokensUpdated today
    EducationAuto-check passed
  • Claude Certification Tutor

    rohitg00/ai-engineering-from-scratch

    Guides a learner through one of four independent Claude certification tracks with onboarding, lessons, practice labs, mock exams and remediation.

    65k GitHub stars~3k tokensUpdated today
    EducationAuto-check passed
  • Review PR

    microsoft/vscode-containers

    Official

    Review a specific vscode-containers pull request on demand from the CLI (or any interactive agent), the way a Container Tools maintainer would.

    141 GitHub stars~900 tokensUpdated today
    DevelopmentAuto-check passed
  • Skill Generalizer

    hqhq1025/skill-optimizer

    A skill your agent uses when turning local, private, or personal Agent Skills into publishable skills for GitHub, marketplaces, teams, or public sharing, especially when private paths, personal…

    180 GitHub stars~641 tokensUpdated 4 mo ago
    EducationAuto-check passed

More from aftermathlabs/llvm-msvc

All 8 skills in this repo
  • Compiler Development

    aftermathlabs/llvm-msvc

    Expertise in compiler development using LLVM infrastructure including frontend design, IR generation, optimization passes, and code generation.

    438 GitHub stars~1.7k tokensUpdated 3 days ago
    Auto-check passed
  • Dynamic Instrumentation

    aftermathlabs/llvm-msvc

    Expertise in LLVM-based dynamic binary instrumentation, runtime tracing, and program monitoring.

    438 GitHub stars~2.6k tokensUpdated 3 days ago
    Auto-check passed
  • Llvm Optimization

    aftermathlabs/llvm-msvc

    Expertise in LLVM optimization passes, performance tuning, and code transformation techniques.

    438 GitHub stars~2.5k tokensUpdated 3 days ago
    Auto-check passed
  • Llvm Security

    aftermathlabs/llvm-msvc

    Expertise in LLVM security features including sanitizers, hardening techniques, exploit mitigations, and secure compilation.

    438 GitHub stars~1.8k tokensUpdated 3 days ago
    Auto-check passed
  • Llvm Tooling

    aftermathlabs/llvm-msvc

    Expertise in LLVM tooling development including Clang plugins, LLDB debugger extensions, Clangd/LSP, and LibTooling.

    438 GitHub stars~2.2k tokensUpdated 3 days ago
    Auto-check passed
  • Mlir Development

    aftermathlabs/llvm-msvc

    Expertise in MLIR (Multi-Level Intermediate Representation) and CIR (Clang IR) development for domain-specific compilation and high-level optimizations.

    438 GitHub stars~2.4k tokensUpdated 3 days ago
    Auto-check passed

Works with

Questions about Llvm Learning

What does Llvm Learning do?

Comprehensive learning resources and tutorials for LLVM, Clang, and compiler development. Llvm Learning is an agent skill from aftermathlabs/llvm-msvc. Comprehensive learning resources and tutorials for LLVM, Clang, and compiler development.

When should I use Llvm Learning?

Llvm Learning fits situations like: helping users learn LLVM internals; find educational resources; understand compiler concepts.

How do I install Llvm Learning in Claude Code?

Run `npx skills add aftermathlabs/llvm-msvc --skill llvm-learning -a claude-code`. Or copy the skill folder (.agents/skills/llvm-learning in aftermathlabs/llvm-msvc) into .claude/skills/llvm-learning in your project. Claude Code loads it when a task matches its description.

How do I install Llvm Learning in Codex?

Run `npx skills add aftermathlabs/llvm-msvc --skill llvm-learning -a codex`. Or copy the skill folder (.agents/skills/llvm-learning in aftermathlabs/llvm-msvc) into .agents/skills/llvm-learning in your project. Codex loads it when a task matches its description.

Can I use Llvm Learning 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 aftermathlabs/llvm-msvc --skill llvm-learning -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/llvm-learning, .gemini/skills/llvm-learning, .github/skills/llvm-learning and .opencode/skills/llvm-learning in your project.

What does Llvm Learning need to run?

SKILL.md names no scripts, command-line tools or credentials: Llvm Learning is instructions for the agent only.

Does Llvm Learning access the network?

SKILL.md names 5 domains. In commands or code: raw.githubusercontent.com; the agent is likely to contact it when it follows the instructions. As links in the text: llvm.org, github.com, clang.llvm.org and discourse.llvm.org. This is read from the text; nothing was executed.

Is Llvm Learning safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Llvm Learning use?

Llvm Learning is published under the AGPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Llvm Learning use?

About 2.1k tokens (SKILL.md is roughly 8.6k 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 Llvm Learning?

Skills that share tags, products or a category with Llvm Learning: Malloy Review (malloydata/publisher, 116 stars), Codebase to Course (zarazhangrui/codebase-to-course, 5.7k stars), MCPA Certification Tutor (rohitg00/ai-engineering-from-scratch, 65k stars) and Claude Certification Tutor (rohitg00/ai-engineering-from-scratch, 65k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Llvm Learning?

aftermathlabs (a GitHub organization) maintains it in aftermathlabs/llvm-msvc, which has 438 GitHub stars. The repository holds 8 skills in this directory. The repository was last updated on October 3, 2026.

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