ralph-specum-refactor

ralph-specum-refactor is a skill for Codex from tzachbon/smart-ralph. It costs 46 tokens per session (551 once invoked), scanned A, original, MIT.

A controlled workflow for revising specification files after implementation reveals that the original requirements or design need to change.

In plain words
What is it for?
Use it when explicitly revising Ralph Specum requirements.md, design.md, or tasks.md based on implementation learnings.
Why use it?
It keeps related requirements, design decisions, tasks, prototypes, and progress records aligned during a refactor.

Skill for Codex

Written for Codex: agents/openai.yaml present. Also seen: mentions subagents; mentions Codex; $skill-name invocation.

Good fit Use it when explicitly revising Ralph Specum requirements.md, design.md, or tasks.md based on implementation learnings.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/tzachbon/smart-ralph/ralph-specum-refactor
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 tzachbon/smart-ralph --skill ralph-specum-refactor
Clone the repo
git clone --depth 1 https://github.com/tzachbon/smart-ralph

Made for: 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 ralph-specum-refactor

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/tzachbon/smart-ralph/ralph-specum-refactor"><img src="https://agentmods.dev/badge/skills/tzachbon/smart-ralph/ralph-specum-refactor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 46 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 551 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.00046 $0.00551
Opus 5 $0.00023 $0.00275
Sonnet 5 $0.00009 $0.00110
Haiku 4.5 $0.00005 $0.00055

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

Security

Grade A, and why

ralph-specum-refactor 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 9d 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.

plugins/ralph-specum-codex/skills/ralph-specum-refactor/SKILL.md · 44 lines

How it starts

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

Ralph Specum Refactor

You are a coordinator, not a refactor specialist -- delegate spec revision to a refactor-specialist sub-agent.

Contract

  • Resolve the active spec by explicit path, exact name, or .current-spec
  • Review files in order: requirements.md, design.md, tasks.md
  • Cascade downstream updates when upstream content changes
  • Reconcile activePrototypes and preserve unrelated refactor work

Action

  1. Resolve the target spec.
  2. Read .progress.md and existing spec files.
  3. Run prototype_records.py reconcile whenever .ralph-state.json exists, including when activePrototypes is empty, then run select-downstream --state "$BASE_PATH/.ralph-state.json" --target "$FILE" --path "$FILE" with the resolved basePath. Stop a file's refactor when its targetDecisions entry is not both proofAvailable: true and eligible: true, including an active blocker, stale dependency, approved-transfer overlap, or unavailable proof.
  4. When refactor returns to execution, restore taskIndex from the blocking entry's returnTaskIndex through merge_state.py before dispatch.
  5. Delegate spec revision to a refactor-specialist sub-agent. Pass .progress.md, existing spec files, and implementation learnings. The sub-agent identifies what changed, what stayed accurate, and what is obsolete. Do NOT revise spec files yourself.
  6. The sub-agent preserves newer Ralph concepts already expressed in the spec, including approval checkpoints, granularity choices, [P] tasks, [VERIFY] tasks, VE tasks, and epic constraints when relevant.
  7. The sub-agent updates files in order:
    • requirements.md
    • design.md
    • tasks.md
  8. If requirements changed, revisit design and tasks.
  9. If design changed, revisit tasks.
  10. Record the rationale and cascade decisions in .progress.md.

Response Handoff

  • After revising spec files, name the files that changed and summarize the updates briefly.
  • End with exactly one explicit choice prompt:
    • approve current artifact
    • request changes
    • continue to implementation
  • Treat continue to implementation as approval of the updated spec files.

Read the full file on GitHub · 44 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. 9d ago First seen · 44 lines · 46 tokens per session scan A 8c134994e6e9

Subscribe to this mod's changes

ralph-specum-refactor is a skill published in the GitHub repository tzachbon/smart-ralph (537 stars, last pushed 6d ago), licensed MIT. It adds 46 tokens to every session and 551 once invoked, about $0.0002 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.