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 andregusman-raiz/a-gusman-claude --skill ag-refatorar-codigogit clone --depth 1 https://github.com/andregusman-raiz/a-gusman-claudeWrote 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/andregusman-raiz/a-gusman-claude/ag-refatorar-codigo)<a href="https://agentmods.dev/skills/andregusman-raiz/a-gusman-claude/ag-refatorar-codigo"><img src="https://agentmods.dev/badge/skills/andregusman-raiz/a-gusman-claude/ag-refatorar-codigo/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/andregusman-raiz/a-gusman-claude/ag-refatorar-codigo"><img src="https://agentmods.dev/badge/skills/andregusman-raiz/a-gusman-claude/ag-refatorar-codigo.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector warn
SkillSpector: 1 finding, up to medium
These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →
- medium Excessive Agency · line 4 Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.Fix: Remove the model/provider override or disclose it prominently and require explicit operator approval before invoking an external coding CLI or billed model.
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.00043 | $0.00624 |
| Opus 5.5 | $0.00017 | $0.00250 |
| Sonnet 5.5 | $0.00009 | $0.00125 |
| Haiku 4.5 | $0.00004 | $0.00062 |
Grade A, and why
ag-refatorar-codigo 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 — 67 lines — stays where its author put it; the contents beside it link to each section on GitHub.
ag-refatorar-codigo — Refatorar Codigo
Spawn the ag-refatorar-codigo agent to restructure code without changing behavior.
Invocation
Use the Agent tool with:
subagent_type:ag-refatorar-codigomode:bypassPermissionsrun_in_background:trueprompt: Compose from template below + $ARGUMENTS
Prompt Template
Projeto: [CWD or user-provided path]
Escopo: [module or pattern to refactor from $ARGUMENTS]
## Output
- refactor-report.md com analise antes/depois
- Commits incrementais (1 por step de refatoracao)
- Testes existentes continuam passando (zero regressao)
Protocolo incremental:
1. Mudar UMA coisa → Rodar testes → Pass → Commit
2. Repetir ate completar escopo
3. Se teste falha → Revert → Investigar
Pre-condicao: RECUSAR se nao existem testes.
Output: refactor-report.md (antes → depois, arquivos, commits, diagrama).
Worktree isolation ativo.
Important
- ALWAYS spawn as Agent subagent — do NOT execute inline
- After spawning, confirm to the user that the refactor agent is running
- REFUSES to refactor without existing passing tests
- Each step is a separate commit for safe rollback
- Uses worktree isolation
Code Smell → Refactoring Map
| Code Smell | Refactoring | Trigger |
|---|---|---|
| Funcao > 40 linhas | Extract Function | Limites Clean Code |
| Classe > 300 linhas | Extract Class | Limites Clean Code |
| Switch/if-else chain (>= 3 branches) | Replace Conditional with Polymorphism | Complexidade |
| Primitivo com regras de dominio | Replace Primitive with Value Object | Email, Money, CPF |
| Parametros demais (>3) | Introduce Parameter Object | Clean Code limit |
| Feature Envy | Move Method | Metodo usa mais dados de outra classe |
| Duplicacao | Extract Method + reuse | DRY |
Regras de Ouro para Refatoracao
- NUNCA refatorar sem testes passando — testes sao a rede de seguranca
- NUNCA misturar refactoring e feature no mesmo commit — impossibilita rollback
- Cada passo deve manter testes verdes — se quebraram, reverter imediatamente
- Preferir refatoracoes pequenas e incrementais — 5 commits pequenos > 1 commit grande
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 · 67 lines · 43 tokens per session scan A 42c4f2c3cd24
ag-refatorar-codigo is a skill published in the GitHub repository andregusman-raiz/a-gusman-claude (18 stars, last pushed 1mo ago), licensed MIT. It adds 43 tokens to every session and 624 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-09-03.
Other skills, from other repositories
test-review
You are an expert DataHub test reviewer. Your role is to evaluate pytest smoke tests against established testing standards, identify issues, and provide actionable feedback.
grade-tests
Grade curated individual tests for readiness, A-F quality and improvements. ALWAYS USE FOR: grade tests, review only a named test, per-test readiness or quality bands for supplied methods, bodies, file spans or bounded PR diffs, including existing tests. Return Pass/Failed/Uncertain/Not applicable; unresolved/empty…
go-testing
Trigger: Go tests, go test coverage, Bubbletea teatest, golden files. Apply focused Go testing patterns.
brooks-test
Test quality review drawing on twelve classic engineering books — with primary focus on xUnit Test Patterns, The Art of Unit Testing, How Google Tests Software, and Working Effectively with Legacy Code — that diagnoses structural problems in an existing test suite: brittleness, mock abuse, coverage illusions, slow…
dart-mechanical-refactor
DART Mechanical Refactor: perform a behavior-preserving mechanical refactor.
refactor
Refactors code for quality and maintainability. Triggers: refactor, clean up, restructure, improve code, modernize.