flow-trace-sync

flow-trace-sync is a skill for Claude Code, Codex from lukas-grigis/ralphctl. It costs 162 tokens per session (1,169 once invoked), scanned A, original, MIT.

A documentation-checking skill for ralphctl, a tool that runs structured chains of coding tasks. It compares the step names and order shown in documentation with the flows that the code actually runs.

In plain words
What is it for?
Use it after changing a flow's steps and before release checks, especially when updating diagrams, architecture examples, or step-order tests.
Why use it?
Flow documentation can become outdated after steps are added, removed, renamed, or reordered. This helps find and correct that mismatch.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/lukas-grigis/ralphctl/flow-trace-sync
Any agent
npx skills add lukas-grigis/ralphctl --skill flow-trace-sync
Clone the repo
git clone --depth 1 https://github.com/lukas-grigis/ralphctl

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 flow-trace-sync

README.md
[![agentmods](https://agentmods.dev/badge/skills/lukas-grigis/ralphctl/flow-trace-sync.svg)](https://agentmods.dev/skills/lukas-grigis/ralphctl/flow-trace-sync)
Your own site
<a href="https://agentmods.dev/skills/lukas-grigis/ralphctl/flow-trace-sync"><img src="https://agentmods.dev/badge/skills/lukas-grigis/ralphctl/flow-trace-sync.svg" alt="Measured on agentmods" height="20"></a>
Per session 162 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,169 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00162 $0.01169
Opus 5 $0.00081 $0.00584
Sonnet 5 $0.00032 $0.00234
Haiku 4.5 $0.00016 $0.00117

Measured 4d ago against content hash a7e7bc8c8252, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

flow-trace-sync 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 4d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/flow-traces.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

.claude/skills/flow-trace-sync/SKILL.md · 67 lines

How it starts

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

Flow Trace Sync

A ralphctl flow is a tree of named chain elements (sequential('implement', […]), guard('task-runnable-<id>', …), loop('task-attempts-<id>', …)). The order and names of those elements are the flow's observable shape — and several docs describe it in prose or diagrams: the implementFlow example in KERNEL-DESIGN.md, the sequence diagrams under .claude/docs/diagrams/, and the step-by-step criteria in REQUIREMENTS.md.

The code owns that shape in two places: the flow definition (the leaf/sequential/guard/loop('<name>') calls) and the step-order fence test (which asserts trace.map(s => s.elementName) for happy + failure paths — a test fails the moment the real order changes). The docs do not fail when they fall behind. So a guard gets added, an element gets renamed, the loop nesting changes — the test is updated, the prose is not, and the next reader trusts a sequence the harness no longer runs. This skill closes that gap.

When this earns its keep

  • Right after you change a flow's element list — add/remove/reorder/rename a leaf/sequential/guard/loop.
  • Before a release, alongside drift-sweep, so the architecture docs ship accurate.
  • When a documented "A → B → C" trace looks wrong against the code.

How to run it

  1. Extract the real element sequences:

    bash .claude/skills/flow-trace-sync/scripts/flow-traces.sh           # all flows
    bash .claude/skills/flow-trace-sync/scripts/flow-traces.sh implement # one flow
    

    For each flow it lists the element names found in the definition (deduped, file order) and points at the fence test that asserts the canonical runtime sequence. Note: the listed order is definition order across files, not the exact runtime order — the fence test is authoritative for the precise sequence, so open it when order matters.

  2. Locate the documented traces that describe the changed flow:

    • KERNEL-DESIGN.md — worked flow examples (e.g. implementFlow).
    • .claude/docs/diagrams/ — the sequence / lifecycle diagrams.
    • REQUIREMENTS.md — criteria that spell out an attempt/loop body order.

Read the full file on GitHub · 67 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 4d ago First seen · 67 lines · 162 tokens per session scan A a7e7bc8c8252

Subscribe to this mod's changes

flow-trace-sync is a skill published in the GitHub repository lukas-grigis/ralphctl (23 stars, last pushed today), licensed MIT. It adds 162 tokens to every session and 1,169 once invoked, about $0.0008 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-30.