rtl-p4s-refactor

rtl-p4s-refactor is a skill for Claude Code from babyworm/rtl-agent-team. It costs 37 tokens per session (456 once invoked), scanned A, original, MIT.

A workflow for restructuring RTL without intentionally changing what the hardware does. It covers naming and style cleanup, splitting or combining modules, lint checks, and equivalence verification, which compares old and new behavior.

In plain words
What is it for?
Use it to clean up RTL, fix structural issues, split or merge modules, and prepare code for review while checking that behavior remains unchanged.
Why use it?
Structural changes can accidentally alter signal connections or behavior even when they look cosmetic. Equivalence checks and linting help detect those mistakes before handoff or review.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Part of the rtl-agent-team plugin — 56 skills, 91 agents, 8 hooks shipped together

Good fit Use it to clean up RTL, fix structural issues, split or merge modules, and prepare code for review while checking that behavior remains unchanged.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/babyworm/rtl-agent-team/rtl-p4s-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 babyworm/rtl-agent-team --skill rtl-p4s-refactor
Clone the repo
git clone --depth 1 https://github.com/babyworm/rtl-agent-team

Made for: Claude Code.

Or install rtl-agent-team, the plugin that ships this one along with the rest of its 56 skills, 91 agents, 8 hooks.

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 rtl-p4s-refactor

README.md
[![agentmods](https://agentmods.dev/badge/skills/babyworm/rtl-agent-team/rtl-p4s-refactor/github.svg)](https://agentmods.dev/skills/babyworm/rtl-agent-team/rtl-p4s-refactor)
Your own site
<a href="https://agentmods.dev/skills/babyworm/rtl-agent-team/rtl-p4s-refactor"><img src="https://agentmods.dev/badge/skills/babyworm/rtl-agent-team/rtl-p4s-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 rtl-p4s-refactor

Your own site · 80×15
<a href="https://agentmods.dev/skills/babyworm/rtl-agent-team/rtl-p4s-refactor"><img src="https://agentmods.dev/badge/skills/babyworm/rtl-agent-team/rtl-p4s-refactor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 37 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 456 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.
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.00037 $0.00456
Opus 5.5 $0.00015 $0.00182
Sonnet 5.5 $0.00007 $0.00091
Haiku 4.5 $0.00004 $0.00046

Measured yesterday against content hash b8c88c9557be, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

rtl-p4s-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 yesterday.

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/rtl-p4s-refactor/SKILL.md · 60 lines

What it actually says

Delegate using the current host as described in {plugin_root}/runtime/model-selection.md.

<Use_When>

  • RTL exists but has structural problems (naming, style, lint violations)
  • Module needs to be split or merged without behavioral change
  • Preparing RTL for review or handoff </Use_When>

<Do_Not_Use_When>

  • Behavioral change is needed (use rtl-p4-implement for new implementation)
  • Only lint checking needed without fixing (use rtl-lint-check instead) </Do_Not_Use_When>

<Why_This_Exists> Refactoring RTL is risky without equivalence verification — a "cosmetic" rename can break a signal connection. Combining rtl-architect analysis with lint-checker verification provides safety. </Why_This_Exists>

All policies, checklists, naming convention rules, and escalation rules are defined in the rtl-p4s-refactor-policy skill (loaded via the orchestrator's skills: field).

Execution

Task(subagent_type="rtl-agent-team:p4s-refactor-orchestrator", prompt="Execute RTL refactoring cycle. Target: $ARGUMENTS")

Do not perform any work directly. The orchestrator agent manages the full analyze → refactor → lint → equivalence cycle.

Output

  • Refactored RTL file(s) with lint re-pass confirmation
  • Equivalence verification report confirming no behavioral change
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. yesterday Changed · +2 lines b8c88c9557be
  2. 1mo ago First seen · 58 lines · 37 tokens per session scan A 3e270d29a53c

Subscribe to this mod's changes

rtl-p4s-refactor is a skill published in the GitHub repository babyworm/rtl-agent-team (68 stars, last pushed yesterday), licensed MIT. It adds 37 tokens to every session and 456 once invoked, about $0.0001 per session on Opus 5.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-10-08.

Related

rtl-p4s-refactor compared with skills from other repositories

rtl-p4s-refactor next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
rtl-p4s-refactorbabyworm/rtl-agent-teamSkill68yesterdayMITA37Claude Code
writing-qualityvercel/eveSkill6.1ktodayApache-2.0A69Claude Code, Codex
kicad-pcb-reviewoaslananka/kicad-mcp-proSkill250todayAGPL-3.0A31Claude Code
rtl-reviewvibeic/vibe-icSkill32todayApache-2.0A63Claude Code
apex-reviewchrono-meta/forge-harnessSkill33todayMITA53Claude Code
pr-commentnearform/lastlightSkill48todayMITA41Claude Code, Codex
refactor-safelyZfinix/asterSkill14329d agoApache-2.0A44Claude Code, Codex