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.
npx skills add rockyflux/yq-workflow --skill yq-code-refactorgit clone --depth 1 https://github.com/rockyflux/yq-workflowWrote 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.
[](https://agentmods.dev/skills/rockyflux/yq-workflow/yq-code-refactor)<a href="https://agentmods.dev/skills/rockyflux/yq-workflow/yq-code-refactor"><img src="https://agentmods.dev/badge/skills/rockyflux/yq-workflow/yq-code-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.
<a href="https://agentmods.dev/skills/rockyflux/yq-workflow/yq-code-refactor"><img src="https://agentmods.dev/badge/skills/rockyflux/yq-workflow/yq-code-refactor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00031 | $0.00658 |
| Opus 5.5 | $0.00012 | $0.00263 |
| Sonnet 5.5 | $0.00006 | $0.00132 |
| Haiku 4.5 | $0.00003 | $0.00066 |
Grade A, and why
yq-code-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 3mo 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.
What it actually says
YQ Code Refactor
Overview
在行为守恒前提下改善结构、命名、职责和边界,降低理解成本、改动成本和回归风险。
Core principle: 先保护行为,再调整结构。
When to Use
- 用户要重构、拆模块、去重或收敛职责
- 代码难测、难扩展、耦合过高或命名失真
- 评审已经指出明显的可维护性问题
- 功能反复出错,但根因在结构而不是单点 bug
Route Elsewhere
- 主要是新增功能:转
yq-code-gen - 主要是根因排查:转
yq-debug - 主要是质量审查:转
yq-code-review
Process
- 识别重复、长函数、隐式耦合和职责混杂。
- 明确行为保护方式:现有测试、补测或验证清单。
- 选择最小有效改法,避免大爆炸重写。
- 检查结构是否更清晰、更易测、更易改。
- 记录本次已处理项和剩余技术债。
Output
# Refactor Summary
## Problems Addressed
## Refactor Strategy
## Behavior Preservation Notes
## Structural Improvements
## Remaining Debt
## Recommended Next Step
Related Skills
- 上游常来自
yq-code-review、yq-performance-opt - 下游通常接
yq-test-gen、yq-code-review - 验证完成前可参考
superpowers:verification-before-completion
Recommended Next Step
- 默认接
yq-test-gen,先保护重构后的行为边界 - 然后回到
yq-code-review,确认结构改善没有引入新的回归风险 - 如果需要沉淀结构调整理由和影响面,可补
yq-doc-gen
Common Mistakes
- 把功能变更伪装成重构
- 没有行为保护就大范围重写
- 只改格式和命名,没有解决真实结构问题
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.
- 3mo ago First seen · 87 lines · 31 tokens per session scan A 49280dc3b786
yq-code-refactor is a skill published in the GitHub repository rockyflux/yq-workflow (2 stars, last pushed 1mo ago), licensed MIT. It adds 31 tokens to every session and 658 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-09-03.
yq-code-refactor compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| yq-code-refactorrockyflux/yq-workflow | Skill | 2 | 1mo ago | MIT | A | 31 | Claude Code, Codex |
| sync-bridgechromium/chromium | Skill | 26k | today | BSD-3-Clause | A | 109 | Claude Code, Codex |
| sync-model-processorchromium/chromium | Skill | 26k | today | BSD-3-Clause | A | 98 | Claude Code, Codex |
| adversarial-revieweremdash-cms/emdash | Skill | 15k | today | MIT | A | 72 | Claude Code, Codex |
| gsd-ns-reviewopen-gsd/gsd-core | Skill | 12k | today | MIT | A | 16 | Claude Code |
| gitnexushashgraph-online/awesome-codex-plugins | Skill | 1.6k | today | Apache-2.0 | A | 58 | Codex |
| issuejeremylongshore/tons-of-skills-marketplace | Skill | 3.0k | 2d ago | MIT | A | 115 | Claude Code |