refactor-code-workflow

refactor-code-workflow is a skill for Claude Code, Codex from acaprino/daodan. It costs 79 tokens per session (3,532 once invoked), scanned A, a copy of assess-workflow, MIT.

A code-refactoring workflow for changing the structure, names or readability of code while preserving its behaviour.

In plain words
What is it for?
Use it to restructure, simplify, deduplicate, rename or clarify code without intentionally changing what it does.
Why use it?
It reduces the risk of breaking existing behaviour while simplifying or reorganising code.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents; mentions Codex.

Good fit Use it to restructure, simplify, deduplicate, rename or clarify code without intentionally changing what it does.

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

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 refactor-code-workflow

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/acaprino/daodan/refactor-code-workflow"><img src="https://agentmods.dev/badge/skills/acaprino/daodan/refactor-code-workflow.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 79 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,532 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 78% copy Near-identical to another mod 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.00079 $0.03532
Opus 5.5 $0.00032 $0.01413
Sonnet 5.5 $0.00016 $0.00706
Haiku 4.5 $0.00008 $0.00353

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

Security

Grade A, and why

refactor-code-workflow 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.

Origin

This is a copy

78% identical to assess-workflow — 65 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

exports/codex/plugins/daodan/skills/refactor-code-workflow/SKILL.md · 177 lines

How it starts

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

Arguments: <what to restructure>. Wherever <arguments> appears below, substitute the text the user typed after the skill name.

<daodan_host_binding host="codex"> This binding governs execution of this package and its loaded references. It takes precedence over executable examples written for another host. Use only registered tools and their actual input schema; an example never creates a tool, argument, permission, model alias or nested worker capability. Preserve the generated worker allowlist, dependency closure, scope and delivery contracts.

Codex binding: the adapter binds repository read to read_file, writes to apply_patch and shell execution to shell; use the equivalent registered tools of the active Codex runtime and their actual fields. In particular, a shell example's command, timeout and background fields are not automatically another runtime's cmd, yield_time_ms or session controls. Start the runtime's available isolated subagent mechanism with the complete rendered role body in its task prompt. Role Markdown and generated dispatch bodies are resources, not registered skills or a native role/subagent_type parameter. Use only declared role bindings and report an unavailable isolation mechanism. Load installed skills by their advertised exact IDs; workflow skills carry the -workflow suffix. Named-agent examples do not override inline delivery. Required foreign providers use Codex's marketplace/install commands: codex plugin marketplace add , then codex plugin add @. Register plugin-declared MCP servers through the active host's MCP configuration using the generated server command. Do not assume registration makes every tool available to a restricted worker. Inherit the active session's model and default variant. A source model alias such as sonnet is not a portable override; request a different model only through an explicit adapter mapping to a valid host identity and user authorization.

The executing agent and its coordinator own continuation, recovery, verification and delivery. Skills supply knowledge and method instructions; they are not executors or a runtime persistence mechanism.

Resolve each component by kind and exact installed identity. A role is dispatched as a worker, a skill loads instructions, and a workflow starts its declared method. Kernel owner-qualified skill references are logical provider identities: resolve them to the actual host registry name and verified installed provider path. Do not invent a registry string by adding an owner's prefix when the host does not use it. Do not load an agent identity as a skill or execute a workflow name as a shell command. Named foreign providers remain mandatory. If an installed provider, MCP server or required isolation mechanism is unavailable, stop its dependent phase and report the missing capability. Do not install a different host's plugin or substitute unrelated skills to claim coverage.

Shell execution alone does not establish interactive stdin. Before a capture or checkpoint, use an available session-control mechanism. When stdin is unavailable, keep user-driven capture in a supported background process with bounded output and an explicit stop signal controlled by the coordinator after the user's completion message. Close owned browser/process resources on completion or cancellation.

Continue working within the current authorization while the requested result is achievable. After a tool error, inspect its cause, correct the relevant input or implementation, retry when justified and verify the outcome; never repeat a failing action blindly. Do not close the turn with a promise or a partial result when an authorized next step can still produce or verify the requested result. Stop only for a documented real impediment, a missing required capability, an unresolved human decision or the caller's stop request. At that boundary, report completed results, remaining work and the concrete prerequisite for continuation; continue any independent work that the blocker does not prevent.

Read the full file on GitHub · 177 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. yesterday First seen · 177 lines · 79 tokens per session scan A 99f3ae041e4c

Subscribe to this mod's changes

refactor-code-workflow is a skill published in the GitHub repository acaprino/daodan (9 stars, last pushed yesterday), licensed MIT. It adds 79 tokens to every session and 3,532 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 78% identical to assess-workflow, differing in 65 lines, and is treated as a copy.

Related

Other skills, from other repositories

adk-go-self-review

Review an ADK Go change the way a maintainer will — a fresh-context pass over the whole diff, five lenses (correctness and tests, scope, simplicity, style, adk-python parity), and the mutation check that proves your tests pin the change. Use before opening a PR, before any later push that changes code, and when asked…

google/adk-go · 87 tokens

adversarial-reviewer

Stress-test a code change for concrete correctness defects, unsafe assumptions, and failure modes. Use when the user explicitly asks for an adversarial review, a deep bug hunt, or to tear a change apart, or to check your own change before submitting it. Do not use for ordinary review, style feedback, or general…

emdash-cms/emdash · 72 tokens

go-testing

Trigger: Go tests, go test coverage, Bubbletea teatest, golden files. Apply focused Go testing patterns.

Gentleman-Programming/gentle-ai · 26 tokens

semgrep-rule-variant-creator

Creates language variants of existing Semgrep rules. Use when porting a Semgrep rule to specified target languages. Takes an existing rule and target languages as input, produces independent rule+test directories for each language.

waybarrios/opencode-power-pack · 50 tokens

brooks-sweep

Full-sweep mode: runs a unified analysis across all quality dimensions — code decay, architecture, tech debt, and test quality — then applies fixes directly to the codebase. Safe changes are auto-applied; risky changes are confirmed before execution. Drawing on twelve classic engineering books. Triggers when: user…

hyhmrright/brooks-lint · 178 tokens

plugin-review

Review plugin quality with tiered checks and dependency scoping. Use for PR and pre-release audits.

athola/claude-night-market · 23 tokens