jit-compilation

jit-compilation is a skill for Claude Code, Codex from mohitmishra786/low-level-dev-skills. It costs 78 tokens per session (1,927 once invoked), scanned A, original, MIT.

A guide to just-in-time compilation, which generates and links machine code while a program is running. It covers LLVM ORC JIT, LLJIT, Cranelift, inline caches, trampolines, and Rust dynasm.

In plain words
What is it for?
Use it when adding runtime code generation to an interpreter, REPL, or game engine; compiling functions only when needed; building inline caches; or generating x86 code from Rust with dynasm.
Why use it?
It explains the moving parts involved in turning source code or bytecode into executable code at runtime, including linking and memory-safety considerations.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when adding runtime code generation to an interpreter, REPL, or game engine; compiling functions only when needed; building inline caches; or generating x86 code from Rust with dynasm.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mohitmishra786/low-level-dev-skills/jit-compilation
Install

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.

Any agent
npx skills add mohitmishra786/low-level-dev-skills --skill jit-compilation
Clone the repo
git clone --depth 1 https://github.com/mohitmishra786/low-level-dev-skills

Made for: Claude Code, Codex.

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

agentmods badge for jit-compilation

README.md
[![agentmods](https://agentmods.dev/badge/skills/mohitmishra786/low-level-dev-skills/jit-compilation/github.svg)](https://agentmods.dev/skills/mohitmishra786/low-level-dev-skills/jit-compilation)
Your own site
<a href="https://agentmods.dev/skills/mohitmishra786/low-level-dev-skills/jit-compilation"><img src="https://agentmods.dev/badge/skills/mohitmishra786/low-level-dev-skills/jit-compilation/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.

agentmods 80×15 button for jit-compilation

Your own site · 80×15
<a href="https://agentmods.dev/skills/mohitmishra786/low-level-dev-skills/jit-compilation"><img src="https://agentmods.dev/badge/skills/mohitmishra786/low-level-dev-skills/jit-compilation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 78 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,927 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00078 $0.01927
Opus 5.5 $0.00031 $0.00771
Sonnet 5.5 $0.00016 $0.00385
Haiku 4.5 $0.00008 $0.00193

Measured 14d ago against content hash faadfa2248ab, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

jit-compilation 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.

skills/compiler-internals/jit-compilation/SKILL.md · 233 lines

How it starts

The opening of the file, as written. The whole thing — 233 lines — stays where its author put it; the contents beside it link to each section on GitHub.

JIT Compilation

Purpose

Guide agents through just-in-time compilation: LLVM ORC JIT v2 (ExecutionSession, IRLayer, ObjectLayer), LLJIT for simpler use cases, Cranelift JIT, inline caches for dynamic dispatch, trampolines for lazy compilation, security considerations (W^X, code signing), and Rust dynasm for x86 codegen.

Triggers

  • Building an interpreter with a JIT hot-path
  • Implementing lazy function compilation on first call
  • Embedding dynamic code generation in a REPL or game engine
  • Prototyping codegen without writing a full linker
  • Creating inline caches for polymorphic call sites
  • Generating x86 machine code from Rust with dynasm

Workflow

1. JIT architecture overview

Source/AST/Bytecode
    → IR (LLVM IR or Cranelift CLIF)
    → Object file (in memory)
    → Runtime linker (RTDyldObjectLinkingLayer)
    → Executable code in R+X memory
    → Function pointer call

2. LLJIT — simplest LLVM JIT

#include "llvm/ExecutionEngine/Orc/LLJIT.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/IRBuilder.h"

using namespace llvm;
using namespace llvm::orc;

int main() {
    auto JIT = cantFail(LLJITBuilder().create());

    LLVMContext Context;
    auto M = std::make_unique<Module>("jit", Context);
    IRBuilder<> Builder(Context);

    // int add(int a, int b) { return a + b; }
    Function *AddFn = Function::Create(
        FunctionType::get(Builder.getInt32Ty(),
                          {Builder.getInt32Ty(), Builder.getInt32Ty()}, false),
        Function::ExternalLinkage, "add", M.get());

    BasicBlock *BB = BasicBlock::Create(Context, "entry", AddFn);
    Builder.SetInsertPoint(BB);
    auto Args = AddFn->arg_begin();
    Value *Sum = Builder.CreateAdd(Args, Args + 1);
    Builder.CreateRet(Sum);

    cantFail(JIT->addIRModule(ThreadSafeModule(std::move(M), std::make_unique<LLVMContext>())));

    auto AddSym = JIT->lookup("add");
    auto *AddPtr = (int (*)(int, int))AddSym->getValue();
    int result = AddPtr(3, 4);  // 7
    return 0;
}

Read the full file on GitHub · 233 lines

Changes

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.

  1. 14d ago Changed · +2 lines faadfa2248ab
  2. 3mo ago First seen · 231 lines · 78 tokens per session scan A fb751454aa38

Subscribe to this mod's changes

jit-compilation is a skill published in the GitHub repository mohitmishra786/low-level-dev-skills (310 stars, last pushed 14d ago), licensed MIT. It adds 78 tokens to every session and 1,927 once invoked, about $0.0003 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.

Related

jit-compilation compared with skills from other repositories

jit-compilation next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
jit-compilationmohitmishra786/low-level-dev-skillsSkill31014d agoMITA78Claude Code, Codex
ecommerce-marketing-strategy-buildernexscope-ai/eCommerce-SkillsSkill1.6ktodayMITA112Claude Code, Codex
product-description-generatornexscope-ai/eCommerce-SkillsSkill1.6ktodayMITA126Claude Code, Codex
shopify-marketingnexscope-ai/eCommerce-SkillsSkill1.6ktodayMITA60Claude Code, Codex
tiktok-shop-cross-bordernexscope-ai/eCommerce-SkillsSkill1.6ktodayMITA55Claude Code, Codex
ecommerce-landing-pagenexscope-ai/eCommerce-SkillsSkill1.6ktodayMITA45Claude Code, Codex
market-gap-analysisnexscope-ai/eCommerce-SkillsSkill1.6ktodayMITA38Claude Code, Codex