sounio-pgo

sounio-pgo is a skill for Claude Code, Codex from Sounio-lang/sounio. It costs 55 tokens per session (1,616 once invoked), scanned A, original, Apache-2.0.

A set of instructions for profile-guided optimization, a compiler process that uses information from earlier program runs to improve generated code.

In plain words
What is it for?
Editing Sounio's profiling pipeline, including counters, profile files, inlining, code layout, dead-code removal, register allocation, and native code generation.
Why use it?
It gives developers a defined path through the many compiler stages involved in collecting profiles and applying optimizations.

Skill for Claude CodeCodex

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

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is bash scripts/sprint65_peephole_gate.sh # 30/30 — peephole optimizer wiring.

Good fit Editing Sounio's profiling pipeline, including counters, profile files, inlining, code layout, dead-code removal, register allocation, and native code generation.

Compare 6 skills from other repositories ↓
Install

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.

Clone the repo
git clone --depth 1 https://github.com/Sounio-lang/sounio
agentmods
npx agentmods add skills/sounio-lang/sounio/sounio-pgo

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 sounio-pgo

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/sounio-lang/sounio/sounio-pgo"><img src="https://agentmods.dev/badge/skills/sounio-lang/sounio/sounio-pgo.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 55 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,616 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.00055 $0.01616
Opus 5 $0.00028 $0.00808
Sonnet 5 $0.00011 $0.00323
Haiku 4.5 $0.00006 $0.00162

Measured 12d ago against content hash a5672f464941, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

sounio-pgo 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 12d 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/sounio-pgo/SKILL.md · 107 lines

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.

Sounio PGO Pipeline

Overview

The full PGO pipeline: instrument → profile → promote → inline → layout → const_fold → DCE → regalloc → disp8 → compact frame → peephole → codegen.

All passes live in self-hosted/ir/ and self-hosted/native/, wired in self-hosted/compiler/main.sio's compile() function. The native backend is complete as of Sprint 65 (30/30 gate).

Strategies: STANDARD=0, PRECISION=1, AGGRESSIVE=2, INSTRUMENTED=3.

Workflow

1) Understand which pass to touch

Pass File Runs when
Strategy codegen ir/lower.sio Always — ir_compute_strategy_from_ast()
Counter injection ir/opt_strategy.sio strategy=INSTRUMENTED — ir_opt_apply_strategy()
.sprof output native/codegen.sio At exit via __prof_dump function
Profile reader ir/profile.sio --use-profile flag — sprof_parse()
Strategy promotion ir/profile.sio After profile load — sprof_apply_promotion()
Inlining ir/inline.sio opts.optimize=trueinl_run_pass()
Layout ir/layout.sio opts.optimize + valid profilelayout_sort_by_profile()
Const-fold + DCE ir/opt_cleanup.sio opts.optimize=trueopt_cleanup_module()
Register alloc (4-preg r12-r15) native/regalloc.sio Always — nc_run_regalloc() (Sprint 52/62)
Disp8 adaptive encoding native/lower_ir.sio Always — ir_slot_fits_disp8() (Sprint 63)
Compact frame sizing native/lower_ir.sio After regalloc — nc_min_frame_size() (Sprint 64)
Peephole optimizer native/peephole.sio After regalloc — ph_run_on_func() (Sprint 65)

2) Add a new pass

  1. Create self-hosted/ir/your_pass.sio with module ir::your_pass declaration
  2. Define main entry: fn your_pass_run(module: &!IrModule) with Mut, Panic, Div
  3. Add use ir::your_pass::* in self-hosted/compiler/main.sio
  4. Call your_pass_run(&!ir_module) after the appropriate stage in compile()
  5. Add self-tests T(N+1) and T(N+2) in main.sio self-test block

Read the full file on GitHub · 107 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. 12d ago First seen · 107 lines · 55 tokens per session scan A a5672f464941

Subscribe to this mod's changes

sounio-pgo is a skill published in the GitHub repository Sounio-lang/sounio (6 stars, last pushed today), licensed Apache-2.0. It adds 55 tokens to every session and 1,616 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.

Related

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.

aallan/vera · 61 tokens

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.

aallan/vera · 61 tokens

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.

oxc-project/oxc · 53 tokens

insta-snapshots

Guide for working with and updating insta snapshot tests in Oxc without terminal interaction.

oxc-project/oxc · 22 tokens

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…

emiliaprotocol/emilia-protocol · 94 tokens

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.

loopdive/js2 · 54 tokens