Agent skill

Ripwire Output Emission

by redhat-et in redhat-et/ripwire

Rules for writing and converting formatted output in ripwire's C++ source with its emit helpers, keeping every printed byte identical to the old printf output.

Apache-2.0Auto-check passedDevelopment

Install Ripwire Output Emission

skills CLI
$ npx skills add redhat-et/ripwire --skill emitting-output -a claude-code

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

GitHub CLI
$ gh skill install redhat-et/ripwire emitting-output --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/redhat-et/ripwire.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/emitting-output .claude/skills/emitting-output && 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
emitting-output
GitHub stars
2.4k
Token cost
~1k tokens
SKILL.md length
486 words
Files
1
Skills in repo
19
Repo updated
First seen
Licence
Apache-2.0

At a glance

Rules for writing and converting formatted output in ripwire's C++ source with its emit helpers, keeping every printed byte identical to the old printf output.

  • Works in 3 steps: %% inverts. In a printf format a literal… → Braces invert the other way. emitTo… → format_to_n is not snprintf. snprintf(…
  • Adding a new output call in ripwire's C++ code
  • SKILL.md covers The three primitives…, The specifier mapping —…, Three traps that are invisible… and Proving a conversion moved…
  • Calls bash

What it does

In ripwire every printed byte feeds a determinism contract, recorded evaluation numbers and stored captures, so output code is held to byte-exactness. The skill defines three primitives in `src/infra/emit.h`: `rw::emitTo` for a format string with arguments going to a stream, `rw::emitRaw` for literal text with no arguments, and `rw::formatTo` for a caller-owned char buffer. New printf-family call sites are not allowed, and neither is vendoring `fmt`.

A mapping table, backed by 218 parity checks, shows how printf specifiers such as `%s`, `%d` and `%zu` become plain replacement fields and how width specifiers become right or left alignment. One mapping is unsafe: `%g` or `%f` without a precision is not a plain replacement field, because the two print different digits for values like 0.1 plus 0.2. Three traps are named: `%%` inside `emitRaw` text, brace escaping that flips between `emitTo` and `emitRaw`, and `format_to_n` not behaving like `snprintf` on size and terminator.

When your agent uses it

  • Adding a new output call in ripwire's C++ code
  • Converting a printf-family call to the emit helpers
  • Editing a help or legend string that ripwire prints

Example prompts

  • “Convert the fprintf calls in the stats printer to rw::emitTo without changing the output bytes.”
  • “I need to print a JSON line with literal braces. Which emit helper should I use?”
  • “Can this %g format be switched to a plain replacement field safely?”

Requirements

  • The ripwire C++ source tree

Workflow steps

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

  1. %% inverts. In a printf format a literal percent is %%. Text handed to emitRaw is no longer
  2. Braces invert the other way. emitTo needs {{ and }} for literal braces; emitRaw needs bare
  3. format_to_n is not snprintf. snprintf( p, S, … ) writes at most S-1 chars plus a NUL;

What it can do on your machine

Read from SKILL.md and the folder at commit 60dd3b3. 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

    Shell commands in SKILL.md call:

    • bash

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

  • Network

    No URLs in SKILL.md.

    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

Ripwire Output Emission loads about 1k tokens when it runs. Until then it costs about 86 tokens; SKILL.md has 486 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~86
When it runs · the whole SKILL.md, loaded when a task matches
~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 redhat-et/ripwire at commit 60dd3b3, republished under its Apache-2.0 licence (© redhat-et). 486 words, ~1,019 tokens.

Download SKILL.mdSave it as .claude/skills/emitting-output/SKILL.md (or your agent's skills folder).
name
emitting-output
description
Writing or converting formatted output in ripwire's C++ source — std::print/std::format via rw::emitTo, emitRaw and formatTo, which printf specifier maps to which format spec, and how to prove a conversion moved zero bytes. Use when adding any output call site, converting a printf-family one, or touching a help/legend string.

Emitting output in ripwire

Every byte this tool prints feeds G4 (minified XML), the determinism contract, docs/EVALS.md's recorded numbers, and the stored captures. Output code is therefore held to byte-exactness, not taste.

The three primitives (src/infra/emit.h)

You haveUseWhy
A format string with arguments, going to a streamrw::emitTo( stream, "…{}…", args )The choke point: std::print where the library has it, std::format+fputs where it does not
Literal text, no argumentsrw::emitRaw( stream, "…" )std::format_string is consteval; there is nothing to format, and huge literals do not compile
A caller-owned char bufferrw::formatTo( buf, cap, "…{}…", args )Keeps the stack buffer — std::format into a std::string puts an allocation on hot paths (G2)

Never add a printf-family call site (CONTRIBUTING.md §3). Do not vendor fmt — the standard library has the feature, so a vendored copy is a G3 regression.

The specifier mapping — measured, not remembered

Proven byte-identical on this toolchain (218 checks; see the lane's fmtparity.cpp):

%s %u %d %zu %zd %lu %ld %llu %lld %i   ->  {}
%.*s  (precision, pointer)               ->  {}  with std::string_view( ptr, len )
%10s -> {:>10}      %-11s -> {:<11}      %.9s -> {:.9}
%016llx -> {:016x}  %llx -> {:x}  %llX -> {:X}  %o -> {:o}
%.3f -> {:.3f}      %6.1f -> {:6.1f}     %.0f -> {:.0f}
%.6g -> {:.6g}      %.3g -> {:.3g}       (explicit precision only)

The one unsafe mapping. A %g or %f with no precision is NOT {}. printf's %g prints six significant digits; {} prints the shortest round-trip. 0.1+0.2 is 0.3 under %g and 0.30000000000000004 under {}. Give the format spec an explicit precision or leave the site alone.

Three traps that are invisible at the call site

  1. %% inverts. In a printf format a literal percent is %%. Text handed to emitRaw is no longer a format, so %% there prints two characters — collapse it to one %. This is how garbage reached a generated docs/COMMANDS.md.
  2. Braces invert the other way. emitTo needs {{ and }} for literal braces; emitRaw needs bare { and }. JSON emitters are where this bites.
  3. format_to_n is not snprintf. snprintf( p, S, … ) writes at most S-1 chars plus a NUL; format_to_n( p, S, … ) writes up to S and terminates nothing. Swapping one for the other widens the buffer by a byte and drops the terminator. Use rw::formatTo, whose contract is snprintf's exactly — including its return value, the would-have-written length.
Show full SKILL.md (169 more words)Show less

Proving a conversion moved zero bytes

  1. bash test/printffmtparitycheck.sh — per-verb SHA-256 of stdout and stderr. If it does not have a label for the verb you touched, it proves nothing about your change: add the label and pin it first. UPDATE_GOLDEN=1 re-pins; the diff must be additions only. Pinning refuses any verb whose output embeds the git stamp (at="<sha>"), because such a verb cannot hold a pin at all.
  2. A green fence is not coverage. Measure it: a coverage build showed only 25% of one batch's call sites were ever executed by the corpus. Widen at the gaps — --json is a whole second output path.
  3. Differential-test against the pre-conversion binary on a REAL tree. Build the base commit into a scratch worktree and diff both binaries' bytes over src/, test/, docs/ and the repo root, normalising only the git stamp. A toy fixture cannot reach a truncation branch; a real tree does it by accident. This is what caught the format_to_n byte, with all 40 labels green.

© redhat-et, Apache-2.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 .claude/skills/emitting-output of redhat-et/ripwire.

Open the folder on GitHubat commit 60dd3b3

Compare with similar skills

Ripwire Output Emission 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.

Ripwire Output Emission compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Ripwire Output Emission this skillredhat-et/ripwire2.4k—~1kAutomated safety check: PassApache-2.0
Qt C++ Code Reviewx-tools-author/x-tools1.1k2 repos~4.3kAutomated safety check: PassBSD-3-Clause
PlotJuggler 3 to 4 PortingPlotJuggler/PlotJuggler6.2k—~1.1kAutomated safety check: PassMPL-2.0
Codebase Comparison with jscpdkucherenko/jscpd6.4k—~3.2kAutomated safety check: PassMIT
OBS Plugin Dependency Upgradesorayuki/obs-multi-rtmp5.1k—~609Automated safety check: PassGPL-2.0
WebRTC Include Cleanerwebrtc-sdk/webrtc4461 repos~545Automated safety check: PassBSD-3-Clause

Similar skills

  • Qt C++ Code Review

    x-tools-author/x-tools

    Read-only review of Qt6 C++ code that combines a deterministic lint script with six parallel analysis agents and reports only high-confidence issues.

    1.1k GitHub starsUsed in 2 repos~4.3k tokens
    DevelopmentAuto-check passed
  • PlotJuggler 3 to 4 Porting

    PlotJuggler/PlotJuggler

    Directs porting of widgets, dialogs, panels and transforms from PlotJuggler 3 to PlotJuggler 4 by lifting the original files intact and rebinding only the data paths.

    6.2k GitHub stars~1.1k tokensUpdated 7 days ago
    DevelopmentAuto-check passed
  • Compares two folders function by function with jscpd --compare, across languages if needed, and explains which functions match and which have no counterpart.

    6.4k GitHub stars~3.2k tokensUpdated today
    DevelopmentAuto-check passed
  • OBS Plugin Dependency Upgrade

    sorayuki/obs-multi-rtmp

    Updates the obs-multi-rtmp plugin repo to the latest upstream plugin template and OBS Studio version, including dependency metadata, then rebuilds it with CMake.

    5.1k GitHub stars~609 tokensUpdated 7 days ago
    DevelopmentAuto-check passed
  • WebRTC Include Cleaner

    webrtc-sdk/webrtc

    Runs the WebRTC include-cleaner tool to add missing and remove unused C++ include directives before uploading a CL or after refactoring.

    446 GitHub starsUsed in 1 repo~545 tokens
    DevelopmentAuto-check passed
  • Skia Analyst

    mono/SkiaSharp

    Analyze Skia features for SkiaSharp - produces a unified analysis of what shipped (upstream engine benefits, PR links, migration guides) and what's missing (impact/priority/effort scoring, hidden…

    5.6k GitHub stars~1.6k tokensUpdated today
    DevelopmentAuto-check passed

More from redhat-et/ripwire

All 19 skills in this repo
  • Ripwire Change Check

    redhat-et/ripwire

    Checks whether a working-tree diff or a pull request is safe to merge: blast radius, tests to run, contract breaks, branch conflicts and stranded work.

    2.4k GitHub stars~4.3k tokensUpdated today
    Auto-check: notes
  • Ripwire Graph Query

    redhat-et/ripwire

    Answers call-graph questions that combine several conditions, such as complex functions that reach a target or untested symbols near main, using ripwire's graph-query mode.

    2.4k GitHub stars~1.1k tokensUpdated today
    Auto-check: notes
  • Ripwire Subsystem Handoff

    redhat-et/ripwire

    Produces a short brief for handing a code subsystem to a teammate or fresh session, using ripwire to rank symbols, expand bodies and surface design docs.

    2.4k GitHub stars~1.8k tokensUpdated today
    Auto-check: notes
  • Ripwire Code Navigation

    redhat-et/ripwire

    Answers questions about a named symbol, such as its callers, what it calls, the path between two symbols or the downstream impact of changing it, using the ripwire CLI.

    2.4k GitHub stars~4.8k tokensUpdated today
    Auto-check: notes
  • Contributor guide for reading clang optimization remarks while editing ripwire's own C++, deciding between a source change and a build change such as LTO or PGO.

    2.4k GitHub stars~3.1k tokensUpdated today
    Auto-check: notes
  • Maps an unfamiliar repo or subsystem with the ripwire CLI before reading files, climbing an escalation ladder only until you are oriented.

    2.4k GitHub stars~4.5k tokensUpdated today
    Auto-check: notes

Works with

Categories

Questions about Ripwire Output Emission

What does Ripwire Output Emission do?

Rules for writing and converting formatted output in ripwire's C++ source with its emit helpers, keeping every printed byte identical to the old printf output. In ripwire every printed byte feeds a determinism contract, recorded evaluation numbers and stored captures, so output code is held to byte-exactness.h`: `rw::emitTo` for a format string with arguments going to a stream, `rw::emitRaw` for literal text with no arguments, and `rw::formatTo` for a caller-owned char buffer.

When should I use Ripwire Output Emission?

Ripwire Output Emission fits situations like: adding a new output call in ripwire's C++ code; converting a printf-family call to the emit helpers; editing a help or legend string that ripwire prints.

How do I install Ripwire Output Emission in Claude Code?

Run `npx skills add redhat-et/ripwire --skill emitting-output -a claude-code`. Or copy the skill folder (.claude/skills/emitting-output in redhat-et/ripwire) into .claude/skills/emitting-output in your project. Claude Code loads it when a task matches its description.

How do I install Ripwire Output Emission in Codex?

Run `npx skills add redhat-et/ripwire --skill emitting-output -a codex`. Or copy the skill folder (.claude/skills/emitting-output in redhat-et/ripwire) into .agents/skills/emitting-output in your project. Codex loads it when a task matches its description.

Can I use Ripwire Output Emission 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 redhat-et/ripwire --skill emitting-output -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/emitting-output, .gemini/skills/emitting-output, .github/skills/emitting-output and .opencode/skills/emitting-output in your project.

What does Ripwire Output Emission need to run?

Going by SKILL.md and its folder, Ripwire Output Emission needs the command-line tools its instructions call (bash). Our summary lists: The ripwire C++ source tree.

Does Ripwire Output Emission access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Ripwire Output Emission 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 Ripwire Output Emission use?

Ripwire Output Emission is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Ripwire Output Emission use?

About 1k tokens (SKILL.md is roughly 4.1k 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 Ripwire Output Emission?

Skills that share tags, products or a category with Ripwire Output Emission: Qt C++ Code Review (x-tools-author/x-tools, 1.1k stars), PlotJuggler 3 to 4 Porting (PlotJuggler/PlotJuggler, 6.2k stars), Codebase Comparison with jscpd (kucherenko/jscpd, 6.4k stars) and OBS Plugin Dependency Upgrade (sorayuki/obs-multi-rtmp, 5.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Ripwire Output Emission?

redhat-et (a GitHub organization) maintains it in redhat-et/ripwire, which has 2,428 GitHub stars. The repository holds 19 skills in this directory. The repository was last updated on October 9, 2026.

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