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 lfyxhappy/lfcode --skill refactor-engineergit clone --depth 1 https://github.com/lfyxhappy/lfcodeWrote 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/lfyxhappy/lfcode/refactor-engineer)<a href="https://agentmods.dev/skills/lfyxhappy/lfcode/refactor-engineer"><img src="https://agentmods.dev/badge/skills/lfyxhappy/lfcode/refactor-engineer.svg" alt="Measured on agentmods" 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.00052 | $0.00325 |
| Opus 5 | $0.00026 | $0.00162 |
| Sonnet 5 | $0.00010 | $0.00065 |
| Haiku 4.5 | $0.00005 | $0.00032 |
Grade A, and why
refactor-engineer 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 2d 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
Refactor Engineer
Improve structure while preserving observable behavior unless a behavior change is explicitly part of the request.
Workflow
- Read the applicable instructions, current diffs, implementation, callers, public exports, persistence or wire formats, and nearby tests.
- Define the invariant to preserve and the exact files in scope. Search all references before renaming, moving, or deleting a symbol.
- Make one coherent, minimal refactor at a time. Reuse existing abstractions and local style; do not extract single-use helpers without a real boundary.
- Run focused tests after each meaningful step. Add or adjust regression coverage only when the refactor exposes a previously untested contract.
- Run package typecheck, lint, build, or runtime checks in proportion to the affected boundary.
- Review the diff for accidental API, data, error-message, ordering, or performance changes.
Boundaries
- Do not mix unrelated formatting, dependency, product, or UI changes into a refactor.
- Treat migrations and public contract changes as separate work unless explicitly requested, with compatibility and recovery plans.
- Never use a passing typecheck as proof that runtime behavior is unchanged.
Completion check
Summarize the preserved invariants, moved or removed symbols, tests run, and any behavior that remains unverified.
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.
- 2d ago First seen · 28 lines · 52 tokens per session scan A 9aa49da0e0fd
refactor-engineer is a skill published in the GitHub repository lfyxhappy/lfcode (2 stars, last pushed 4d ago), licensed MIT. It adds 52 tokens to every session and 325 once invoked, about $0.0003 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-09-05.
Other skills, from other repositories
mine-plan-review
Strictly review one implemented repository plan against AGENTS.md, architecture, the immutable plan, implementation commits, real runtime behavior, verification evidence, and downstream contracts. Use when the user invokes the host-specific mine-plan-review skill with a plan path, asks whether a plan can be accepted…
dcc-orchestration
Orchestrate Codex subagents for complex multi-part coding work. Use when independent exploration, review, tests, or bounded implementation streams can run in parallel; do not use for small sequential tasks or tightly coupled concurrent edits.
Implement (multi-agent loop)
Orchestrate an implement -> review -> fix loop with subagents until reviewers sign off.
Review a GitHub PR (via gh)
Review a specific GitHub pull request with gh — fetch the diff, fan out reviewers, consolidate, and optionally post the review. Requires the gh CLI or the GitHub MCP server.
Check work (verify against criteria)
Verify an implementation against acceptance criteria with a reviewer and a tester.
Design doc (write -> review loop)
Draft a design document and iterate writer/reviewer subagents until consensus.