Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/Sounio-lang/sounionpx agentmods add skills/sounio-lang/sounio/sounio-native-codegenWrote 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/sounio-lang/sounio/sounio-native-codegen)<a href="https://agentmods.dev/skills/sounio-lang/sounio/sounio-native-codegen"><img src="https://agentmods.dev/badge/skills/sounio-lang/sounio/sounio-native-codegen/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/sounio-lang/sounio/sounio-native-codegen"><img src="https://agentmods.dev/badge/skills/sounio-lang/sounio/sounio-native-codegen.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.00059 | $0.01364 |
| Opus 5 | $0.00030 | $0.00682 |
| Sonnet 5 | $0.00012 | $0.00273 |
| Haiku 4.5 | $0.00006 | $0.00136 |
Grade A, and why
sounio-native-codegen 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 8d 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 — 90 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Sounio Native Codegen Backend
Overview
The native backend lowers IrFunction to x86-64 ELF machine code in a single-pass pipeline wired inside compile_ir_function() in self-hosted/native/codegen.sio:
IrFunction → regalloc → peephole → lower_ir → disp8 encoding → compact frame → emit prologue → lower instrs → epilogue → patch jumps
All passes live in self-hosted/native/. The pipeline is complete as of Sprint 65 (30/30 gate).
Workflow
1) Understand which pass to touch
| Pass | File | Entry Function | Sprint |
|---|---|---|---|
| Linear-scan regalloc (4-preg r12-r15) | native/regalloc.sio |
nc_run_regalloc() |
52/62 |
| Peephole optimizer (IR-level) | native/peephole.sio |
ph_run_on_func() |
65 |
| Adaptive disp8/disp32 encoding | native/lower_ir.sio |
ir_slot_fits_disp8() |
63 |
| Compact frame sizing | native/lower_ir.sio |
nc_min_frame_size() |
64 |
| Instruction lowering (IrInstr → x86) | native/lower_ir.sio |
lower_instr() |
ongoing |
| Byte emitters | native/encode.sio |
emit_*() |
ongoing |
| Prologue/epilogue | native/codegen.sio |
emit_prologue_with_preg_mask() |
62 |
| ELF output | native/elf.sio |
emit_elf_header() |
M3 |
| Relocations | native/reloc.sio |
RelocationTable, add_call_reloc() |
M3 |
| NativeCompiler state | native/frame.sio |
NativeCompiler struct |
M3 |
2) Add a new native optimization pass
- Create
self-hosted/native/your_pass.siowithmodule native::your_passdeclaration - Import deps:
use ir::ir::{IrFunction, IrInstr, ...}as needed - Define entry:
fn your_pass_run(func: IrFunction) -> IrFunction with Mut, Panic - In
self-hosted/native/codegen.sio:- Add
use native::your_pass::{your_pass_run}to imports - Call
effective_func = your_pass_run(effective_func)at the right pipeline point
- Add
- Add self-tests T(N+1)–T(N+k) in
self-hosted/compiler/main.sio— updatelet total: i64 - Write gate script following
scripts/sprint65_peephole_gate.shas template
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.
- 8d ago First seen · 90 lines · 59 tokens per session scan A 386cb71b2b82
sounio-native-codegen is a skill published in the GitHub repository Sounio-lang/sounio (6 stars, last pushed today), licensed Apache-2.0. It adds 59 tokens to every session and 1,364 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-31.
Other skills, from other repositories
vera-language
Write programs in the Vera programming language. Use when asked to write, edit, debug, or review Vera code (.vera files). Vera is a statically typed, purely functional language with algebraic effects, mandatory contracts, and typed slot references (@T.n) instead of variable names.
vera-language
Write programs in the Vera programming language. Use when asked to write, edit, debug, or review Vera code (.vera files). Vera is a statically typed, purely functional language with algebraic effects, mandatory contracts, and typed slot references (@T.n) instead of variable names.
migrate-oxfmt
Guide for migrating a project from Prettier or Biome to Oxfmt. Use when asked to migrate, convert, or switch a JavaScript/TypeScript project's formatter from Prettier or Biome to Oxfmt.
insta-snapshots
Guide for working with and updating insta snapshot tests in Oxc without terminal interaction.
EMILIA Trust Verification
Verify the authenticity of AI-agent authorization receipts and human-device signoffs. Use this whenever a user shares a "trust receipt", an "authorization receipt", a "signoff", or WebAuthn/passkey approval evidence and asks whether it is valid, genuine, or tampered with. Pairs with the public EMILIA Protocol MCP…
dev-self-merge
Merge self-check for a green PR. Reads the PR's required-check status from the checks API (the committed ci-status feed is RETIRED), outputs MERGE (mark task completed, stand down — server-side auto-enqueue enqueues.