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.
git clone --depth 1 https://github.com/luanpdd/kit-mcpWrote 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/commands/luanpdd/kit-mcp/refactor-seguro)<a href="https://agentmods.dev/commands/luanpdd/kit-mcp/refactor-seguro"><img src="https://agentmods.dev/badge/commands/luanpdd/kit-mcp/refactor-seguro.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.00049 | $0.03505 |
| Opus 5 | $0.00024 | $0.01752 |
| Sonnet 5 | $0.00010 | $0.00701 |
| Haiku 4.5 | $0.00005 | $0.00350 |
Grade A, and why
refactor-seguro 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 4d 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 — 322 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Chain padrão (--mode=full):
seam-finder → legacy-characterizer → refactor-safety-auditor → executor
(se necessário) (sempre) (gate) (refactor real)
Modos alternativos (atalhos quando mudança não justifica chain completo):
--mode=sprout— usalegacy-sprout-wrap-techniques; legado intocado, comportamento adicionado em sprout testado isoladamente--mode=safe-extract— refactor mecânico (rename, IDE-extract bloco contíguo); checklist signed-off + sem characterization--mode=override— bypass com audit trail (--ticket + --reason obrigatórios)
Cria/Atualiza:
- Em modo full:
.planning/SEAM-ANALYSIS.md,tests/characterization/<file_stem>/,.planning/REFACTOR-SAFETY.md - Em modo sprout: novo módulo + tests
- Em modo safe-extract: refactor commit + checklist em
.planning/SAFE-EXTRACT-<file>.md - Em modo override:
.planning/REFACTOR-SAFETY.mdcom audit trail
Após: o user terminou refactor com confiança proporcional ao nível de safety net adotado.
Modos detalhados:
--mode=full (default)
=====================
1. /encontrar-seams <file> (se necessário, deps externas presentes)
2. Aplicar técnicas de break-deps (commits 1-N, manual ou via executor)
3. /caracterizar <file> (gera safety net)
4. /auditar-refactor <file> (gate retorna GO)
5. Refactor real (cover-and-modify, suite verde a cada commit)
6. Re-rodar suite final (regressão = 0)
--mode=sprout
=============
1. AskUserQuestion para feature description
2. Aplicar legacy-sprout-wrap-techniques
3. Gerar sprout method/class testável
4. Conectar ao legado em 1-2 linhas
5. Tests do sprout (100% cobertura no novo)
6. PR criado com TODO de débito técnico (legado ainda untested)
--mode=safe-extract
====================
1. Validar checklist canônico:
- Bloco a extrair é CONTÍGUO?
- Sem control flow saindo do meio (return/throw/break)?
- Variáveis lidas/escritas mapeadas?
- Sem mover lógica entre escopos?
2. Aplicar refactor IDE-assisted
3. Compilação verde + smoke run
4. PR com SAFE-EXTRACT-<file>.md como artefato
--mode=override
================
1. Validar --ticket E --reason
2. Auditoria do refactor-safety-auditor com flag override
3. Audit trail registrado em REFACTOR-SAFETY.md
4. Refactor pode prosseguir SEM characterization
5. Débito técnico documentado no ticket
Exemplos:
/refactor-seguro src/orders/handler.ts # full chain (recomendado)
/refactor-seguro src/orders/handler.ts --mode=sprout # adicionar feature sem tocar legado
/refactor-seguro src/orders/handler.ts --mode=safe-extract # rename/extract mecânico
/refactor-seguro src/orders/handler.ts --mode=override \
--ticket REQ-2026-Q2-1234 --reason "hot fix SEV1, char em REQ-...1235"
/refactor-seguro src/orders/handler.ts --skip-seams # deps já testáveis
/refactor-seguro src/orders/handler.ts --symbol processOrder # método específico
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.
- 4d ago First seen · 322 lines · 49 tokens per session scan A ce3d2280f981
refactor-seguro is a command published in the GitHub repository luanpdd/kit-mcp (1 stars, last pushed yesterday), licensed MIT. It adds 49 tokens to every session and 3,505 once invoked, about $0.0002 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-03.
Other commands, from other repositories
octo-loop
Your first output line MUST be: 🐙 Octopus Loop Mode.
octo-debug
Debug a symptom through reproducible, bounded evidence.
simplify-fn
Refactor a complex function to reduce cyclomatic complexity.
verify
You are invoking the verify skill - comprehensive verification following Boris Cherny's pattern.
verify-all
Runs every local quality check in sequence and reports a pass/fail summary. Wraps ./scripts/verify-all.sh so you do not have to remember each individual script.
fix-test
Auto-diagnose and fix failing tests — identifies root causes and applies fixes.