Agent skill

Compiler Development

by aftermathlabs in aftermathlabs/llvm-msvc

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

AGPL-3.0Auto-check passedDevelopment

Install Compiler Development

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

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

GitHub CLI
$ gh skill install aftermathlabs/llvm-msvc compiler-development --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/compiler-development .claude/skills/compiler-development && 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
compiler-development
GitHub stars
438
Token cost
~1.7k tokens
SKILL.md length
325 words
Files
1
Skills in repo
8
Repo updated
First seen
Licence
AGPL-3.0

At a glance

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

  • Works in 5 steps: Start Simple: Begin with Kaleidoscope… → Incremental Features: Add one language… → Test Extensively: Unit tests for each… → …
  • Building custom programming languages
  • SKILL.md covers Compiler Architecture Overview, Frontend Development, LLVM IR Generation and JIT Compilation, plus 6 more sections
  • Reaches raw.githubusercontent.com

What it does

Compiler Development is an agent skill from aftermathlabs/llvm-msvc. Expertise in compiler development using LLVM infrastructure including frontend design, IR generation, optimization passes, and code generation. Use this skill when building custom programming languages, implementing DSL compilers, or working on compiler internals.

Its SKILL.md is about 1.7k 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 Development. 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

  • Building custom programming languages
  • Implementing DSL compilers
  • Working on compiler internals

Example prompts

  • “/compiler-development”

Workflow steps

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

  1. Start Simple: Begin with Kaleidoscope tutorial
  2. Incremental Features: Add one language feature at a time
  3. Test Extensively: Unit tests for each compiler phase
  4. Use LLVM Tools: opt, llc, llvm-dis for debugging IR
  5. Profile and Optimize: Focus on common code patterns

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).

    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

    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

Compiler Development loads about 1.7k tokens when it runs. Until then it costs about 71 tokens; SKILL.md has 325 words of instructions outside code blocks.

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

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). 325 words, ~1,661 tokens.

Download SKILL.mdSave it as .claude/skills/compiler-development/SKILL.md (or your agent's skills folder).
name
compiler-development
description
Expertise in compiler development using LLVM infrastructure including frontend design, IR generation, optimization passes, and code generation. Use this skill when building custom programming languages, implementing DSL compilers, or working on compiler internals.

Compiler Development Skill

This skill provides comprehensive knowledge of building compilers and language implementations using the LLVM infrastructure.

Compiler Architecture Overview

Classic Three-Phase Design
Source Code → Frontend → Middle-End (Optimizer) → Backend → Machine Code
                ↓              ↓                      ↓
             AST/IR      LLVM IR Passes          Target Code

Frontend Development

Lexical Analysis
cpp
// Token types for a simple language
enum class TokenKind {
    Identifier,
    Number,
    String,
    Keyword,
    Operator,
    Punctuation,
    EndOfFile
};

struct Token {
    TokenKind kind;
    std::string value;
    SourceLocation location;
};
Parser Implementation
  • Recursive Descent: Easy to implement, good error messages
  • Operator Precedence Parsing: Efficient for expression parsing
  • LALR/LR: Use tools like Bison for complex grammars
AST Design
cpp
class Expr {
public:
    virtual ~Expr() = default;
    virtual llvm::Value* codegen() = 0;
};

class BinaryExpr : public Expr {
    std::unique_ptr<Expr> LHS, RHS;
    char Op;
public:
    llvm::Value* codegen() override {
        llvm::Value* L = LHS->codegen();
        llvm::Value* R = RHS->codegen();
        
        switch (Op) {
            case '+': return Builder.CreateFAdd(L, R, "addtmp");
            case '-': return Builder.CreateFSub(L, R, "subtmp");
            case '*': return Builder.CreateFMul(L, R, "multmp");
            case '/': return Builder.CreateFDiv(L, R, "divtmp");
        }
    }
};

LLVM IR Generation

Module and Context Setup
cpp
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/IRBuilder.h"

class CodeGen {
    std::unique_ptr<llvm::LLVMContext> Context;
    std::unique_ptr<llvm::Module> Module;
    std::unique_ptr<llvm::IRBuilder<>> Builder;
    
public:
    CodeGen() {
        Context = std::make_unique<llvm::LLVMContext>();
        Module = std::make_unique<llvm::Module>("my_module", *Context);
        Builder = std::make_unique<llvm::IRBuilder<>>(*Context);
    }
};
Function Generation
cpp
llvm::Function* createFunction(const std::string& name, 
                                llvm::Type* returnType,
                                std::vector<llvm::Type*> params) {
    llvm::FunctionType* FT = llvm::FunctionType::get(returnType, params, false);
    llvm::Function* F = llvm::Function::Create(
        FT, llvm::Function::ExternalLinkage, name, Module.get());
    
    llvm::BasicBlock* BB = llvm::BasicBlock::Create(*Context, "entry", F);
    Builder->SetInsertPoint(BB);
    
    return F;
}

JIT Compilation

LLVM ORC JIT
cpp
#include "llvm/ExecutionEngine/Orc/LLJIT.h"

auto JIT = llvm::orc::LLJITBuilder().create();
if (!JIT) {
    handleError(JIT.takeError());
}

// Add module
(*JIT)->addIRModule(llvm::orc::ThreadSafeModule(
    std::move(Module), std::move(Context)));

// Look up symbol and execute
auto Sym = (*JIT)->lookup("main");
auto* MainFn = (int(*)())Sym->getAddress();
int result = MainFn();

Optimization Pass Pipeline

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

void optimizeModule(llvm::Module& M) {
    llvm::PassBuilder PB;
    llvm::LoopAnalysisManager LAM;
    llvm::FunctionAnalysisManager FAM;
    llvm::CGSCCAnalysisManager CGAM;
    llvm::ModuleAnalysisManager MAM;
    
    PB.registerModuleAnalyses(MAM);
    PB.registerCGSCCAnalyses(CGAM);
    PB.registerFunctionAnalyses(FAM);
    PB.registerLoopAnalyses(LAM);
    PB.crossRegisterProxies(LAM, FAM, CGAM, MAM);
    
    llvm::ModulePassManager MPM = PB.buildPerModuleDefaultPipeline(
        llvm::OptimizationLevel::O2);
    MPM.run(M, MAM);
}
Custom Pass Implementation
cpp
struct MyPass : public llvm::PassInfoMixin<MyPass> {
    llvm::PreservedAnalyses run(llvm::Function& F, 
                                 llvm::FunctionAnalysisManager& FAM) {
        for (auto& BB : F) {
            for (auto& I : BB) {
                // Transform instructions
            }
        }
        return llvm::PreservedAnalyses::none();
    }
};

Language Implementation Patterns

Memory-Safe Languages
  • Use LLVM's memory sanitizer hooks
  • Implement bounds checking with GEP introspection
  • Reference counting or garbage collection integration
Type Systems
  • Implement type inference during AST construction
  • Generate appropriate LLVM types (i32, float, struct, ptr)
  • Handle generic types via monomorphization or boxing
Error Handling
  • Generate exception handling via LLVM's landingpad/invoke
  • Implement Result/Option types as tagged unions
  • Use LLVM's personality functions for unwinding

Notable Language Implementations

Systems Languages
  • Rust: Complex borrow checker, trait system → LLVM
  • Zig: Comptime evaluation, safety features
  • Carbon: C++ interop, modern syntax
Scripting Languages
  • Julia: JIT-compiled scientific computing
  • Crystal: Ruby-like syntax, static typing
  • Nim: Python-like, multi-backend
Domain-Specific
  • Solidity: Ethereum smart contracts
  • MLIR: Multi-level IR for ML/AI workloads
  • Halide: Image processing DSL

Development Workflow

  1. Start Simple: Begin with Kaleidoscope tutorial
  2. Incremental Features: Add one language feature at a time
  3. Test Extensively: Unit tests for each compiler phase
  4. Use LLVM Tools: opt, llc, llvm-dis for debugging IR
  5. Profile and Optimize: Focus on common code patterns

Resources

Official Tutorials
  • LLVM Kaleidoscope: Building a language from scratch
  • Clang internals: Frontend implementation patterns
  • Writing an LLVM Backend: Target code generation
Community Projects

See DIY Compiler section in README.md for 100+ example implementations across different language paradigms.

Getting Detailed Information

When you need detailed and up-to-date resource links, tool lists, or project references, 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:

  • 100+ DIY compiler implementations (DIY Compiler section)
  • Toolchain configurations and IDE setup
  • Compiler development tutorials and 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/compiler-development of aftermathlabs/llvm-msvc.

Open the folder on GitHubat commit bfc7254

Compare with similar skills

Compiler Development 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.

Compiler Development compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Compiler Development this skillaftermathlabs/llvm-msvc438—~1.7kAutomated safety check: PassAGPL-3.0
Component Refactoringlangflow-ai/langflow156k—~3.5kAutomated safety check: PassMIT
@pierre/diffs Code Renderingpierrecomputer/pierre6.2k2 repos~803Automated safety check: PassApache-2.0
Frontend Code Reviewlanggenius/dify158k—~938Automated safety check: PassCustom licence
Electron DevTools Trace Analysiskeybase/client9.3k—~809Automated safety check: PassBSD-3-Clause
Moonbit Docs Maintainermoonbitlang/moonbit-docs2.4k—~1.1kAutomated safety check: PassCustom licence

Similar skills

  • Component Refactoring

    langflow-ai/langflow

    Refactor high-complexity React components in Langflow frontend.

    156k GitHub stars~3.5k tokensUpdated today
    DevelopmentAuto-check passed
  • @pierre/diffs Code Rendering

    pierrecomputer/pierre

    Guides an agent through using @pierre/diffs to render syntax-highlighted files and diffs, and to build editing and review surfaces in React or plain JavaScript.

    6.2k GitHub starsUsed in 2 repos~803 tokens
    DevelopmentAuto-check passed
  • Frontend Code Review

    langgenius/dify

    Reviews frontend changes under `web/` or `packages/dify-ui/` for concrete defects and broken project contracts, using routed rule packs and a severity scale for findings.

    158k GitHub stars~938 tokensUpdated today
    DevelopmentAuto-check passed
  • Analyzes Chrome or Electron DevTools Performance trace exports with Python scripts to find where render time actually goes, without opening DevTools.

    9.3k GitHub stars~809 tokensUpdated today
    DevelopmentAuto-check passed
  • Moonbit Docs Maintainer

    moonbitlang/moonbit-docs

    A skill your agent uses when maintaining the moonbitlang/moonbit-docs repository, including Sphinx docs under next/, MoonBit examples under next/sources/, error-code documentation, gettext…

    2.4k GitHub stars~1.1k tokensUpdated 16 days ago
    DevelopmentAuto-check passed
  • Architecture Diagram

    smallnest/pigo

    Create professional, dark-themed architecture diagrams as standalone HTML files with SVG graphics.

    474 GitHub starsUsed in 1 repo~1.6k tokens
    DevelopmentAuto-check passed

More from aftermathlabs/llvm-msvc

All 8 skills in this repo
  • Dynamic Instrumentation

    aftermathlabs/llvm-msvc

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

    438 GitHub stars~2.6k tokensUpdated 4 days ago
    Auto-check passed
  • Llvm Learning

    aftermathlabs/llvm-msvc

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

    438 GitHub stars~2.1k tokensUpdated 4 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 4 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 4 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 4 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 4 days ago
    Auto-check passed

Questions about Compiler Development

What does Compiler Development do?

Expertise in compiler development using LLVM infrastructure including frontend design, IR generation, optimization passes, and code generation. Compiler Development is an agent skill from aftermathlabs/llvm-msvc. Expertise in compiler development using LLVM infrastructure including frontend design, IR generation, optimization passes, and code generation.

When should I use Compiler Development?

Compiler Development fits situations like: building custom programming languages; implementing DSL compilers; working on compiler internals.

How do I install Compiler Development in Claude Code?

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

How do I install Compiler Development in Codex?

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

Can I use Compiler Development 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 compiler-development -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/compiler-development, .gemini/skills/compiler-development, .github/skills/compiler-development and .opencode/skills/compiler-development in your project.

What does Compiler Development need to run?

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

Does Compiler Development access the network?

SKILL.md names 1 domain. In commands or code: raw.githubusercontent.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Compiler Development 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 Compiler Development use?

Compiler Development 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 Compiler Development use?

About 1.7k tokens (SKILL.md is roughly 6.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 Compiler Development?

Skills that share tags, products or a category with Compiler Development: Component Refactoring (langflow-ai/langflow, 156k stars), @pierre/diffs Code Rendering (pierrecomputer/pierre, 6.2k stars), Frontend Code Review (langgenius/dify, 158k stars) and Electron DevTools Trace Analysis (keybase/client, 9.3k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Compiler Development?

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.