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 Firstp1ck/pi-coding-agent-forge --skill refactoring-advisorgit clone --depth 1 https://github.com/Firstp1ck/pi-coding-agent-forgeWrote 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/firstp1ck/pi-coding-agent-forge/refactoring-advisor)<a href="https://agentmods.dev/skills/firstp1ck/pi-coding-agent-forge/refactoring-advisor"><img src="https://agentmods.dev/badge/skills/firstp1ck/pi-coding-agent-forge/refactoring-advisor/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/firstp1ck/pi-coding-agent-forge/refactoring-advisor"><img src="https://agentmods.dev/badge/skills/firstp1ck/pi-coding-agent-forge/refactoring-advisor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.00048 | $0.01586 |
| Opus 5.5 | $0.00019 | $0.00634 |
| Sonnet 5.5 | $0.00010 | $0.00317 |
| Haiku 4.5 | $0.00005 | $0.00159 |
Grade A, and why
refactoring-advisor 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 1mo 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.
How it starts
The opening of the file, as written. The whole thing — 175 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Refactoring Advisor
Systematic code smell detection and safe refactoring planning. Every refactoring plan ensures the codebase compiles and passes tests at every intermediate step.
Quick Start
Identify and Plan a Refactoring
- Detect the smell: What's wrong and why does it matter?
- Assess the risk: What could break? How large is the blast radius?
- Check test coverage: Are the affected areas covered? If not, add tests first.
- Plan incremental steps: Each step should leave the code in a working state.
- Estimate effort: Size the work (S/M/L/XL) and identify dependencies.
Common Code Smells by Language
Rust
| Smell | Description | Refactoring |
|---|---|---|
| God struct | One struct with too many fields/methods | Extract into smaller, focused structs |
| Unnecessary clones | .clone() where borrowing would work |
Replace with borrows, use lifetimes |
| Stringly typed | Using String where an enum fits |
Introduce enum with From impls |
| Match explosion | Huge match blocks that grow with every variant |
Extract match arms into methods, use trait dispatch |
| Unwrap sprawl | .unwrap() scattered through non-test code |
Replace with ? operator, proper error handling |
| Leaky abstraction | pub on internal implementation details |
Reduce to pub(crate) or pub(super) |
Monolithic lib.rs |
Everything in one file | Split into focused modules |
| Over-generic | Generics where a concrete type suffices | Simplify to concrete types until generics are needed |
TypeScript / React
| Smell | Description | Refactoring |
|---|---|---|
| Prop drilling | Props passed through 3+ component levels | Extract to context, composition, or custom hook |
| God component | Component with 200+ lines or multiple responsibilities | Split into focused components |
| Barrel file bloat | Index files re-exporting everything | Direct imports, remove barrel files |
| Any escape hatch | as any or // @ts-ignore hiding type issues |
Fix the types, use type guards or discriminated unions |
| useEffect spaghetti | Multiple unrelated effects in one component | Split effects, extract to custom hooks |
| Inline styles sprawl | Styles defined inline instead of using design system | Extract to CSS modules, Tailwind classes, or styled components |
| Callback prop chains | Passing callbacks through many layers | Use context or state management |
| State duplication | Same data stored in multiple state variables | Derive computed values, single source of truth |
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.
- 1mo ago First seen · 175 lines · 48 tokens per session scan A 845eea481a98
refactoring-advisor is a skill published in the GitHub repository Firstp1ck/pi-coding-agent-forge (91 stars, last pushed yesterday), licensed MIT. It adds 48 tokens to every session and 1,586 once invoked, about $0.0002 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-08-30.
Other skills, from other repositories
smiles-validation
Strict SMILES validation, structural comparison, and modification verification. Catches invalid LLM-generated molecules.
confirm-failures-are-causally-linked-to-the-task-before-reportin
When delegating a task affected by this skill, include.
surf
Control Chrome browser via CLI for testing, automation, and debugging. Use when the user needs browser automation, screenshots, form filling, page inspection, network/CPU emulation, DevTools streaming, or AI queries via ChatGPT/Gemini/Perplexity/Grok/AI Studio.
ci-fix-monitor
Codex adapter for monitoring and fixing CI failures on opencode-swarm PRs. Use when diagnosing failed checks, fixing package-check (npm tarball) failures, resolving quality/lint/format errors, fixing macOS cross-platform file I/O failures, or watching a PR until all checks are green.
issue-tracer
Use when asked to trace, investigate, root-cause, reproduce, plan, fix, resolve, close, or prepare a PR for an issue, bug report, defect, regression, failing test, or confusing runtime behavior. This Codex adapter delegates to the canonical protocol at .opencode, which owns the Full-Resolution Contract, reproduction…
guardrail-patterns
Codex adapter for opencode-swarm destructive-command guardrail changes. Use before modifying src/hooks/guardrails.ts, checkDestructiveCommand, dcNormalizeCommand, shell-wrapper parsing, .swarm destructive-command blocking, or guardrails unit/adversarial tests.