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 Insajin/autopus-adk --skill refactoringgit clone --depth 1 https://github.com/Insajin/autopus-adkWrote 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/insajin/autopus-adk/refactoring)<a href="https://agentmods.dev/skills/insajin/autopus-adk/refactoring"><img src="https://agentmods.dev/badge/skills/insajin/autopus-adk/refactoring/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/insajin/autopus-adk/refactoring"><img src="https://agentmods.dev/badge/skills/insajin/autopus-adk/refactoring.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.00020 | $0.00733 |
| Opus 5.5 | $0.00008 | $0.00293 |
| Sonnet 5.5 | $0.00004 | $0.00147 |
| Haiku 4.5 | $0.00002 | $0.00073 |
Grade A, and why
refactoring 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 2mo 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
Refactoring Skill
기존 동작을 보존하면서 코드 구조를 개선하는 스킬입니다.
핵심 원칙
- 테스트 먼저: 리팩토링 전 기존 동작을 테스트로 보호
- 작은 단계: 한 번에 하나의 변환만 적용
- 행동 보존: 외부 동작 변경 금지
- 기능 변경 분리: 리팩토링 커밋과 기능 변경 커밋 분리
안전한 리팩토링 패턴
Extract Function
// Before: 긴 함수
func processOrder(order *Order) error {
// 검증 로직 20줄
// 계산 로직 15줄
// 저장 로직 10줄
}
// After: 책임 분리
func processOrder(order *Order) error {
if err := validateOrder(order); err != nil {
return err
}
total := calculateTotal(order)
return saveOrder(order, total)
}
Extract Interface
// Before: 구체 타입에 의존
func SendEmail(client *SMTPClient, msg string) { ... }
// After: 인터페이스로 추상화
type EmailSender interface {
Send(msg string) error
}
func SendEmail(sender EmailSender, msg string) { ... }
Replace Conditional with Polymorphism
// Before: switch/if 분기
func price(t string) int {
switch t {
case "basic": return 100
case "pro": return 200
}
}
// After: 인터페이스 다형성
type Plan interface {
Price() int
}
Rename (전체 프로젝트)
# 호출자 확인 후 변경
grep -r "oldName" --include="*.go"
# IDE/도구 활용 권장 (gopls rename)
레거시 현대화 전략
Strangler Fig Pattern
- 새 구현체를 기존 시스템 옆에 배치
- 트래픽을 점진적으로 새 구현체로 이전
- 완전 이전 후 구 구현체 제거
Branch by Abstraction
- 변경 대상에 인터페이스 추출
- 기존 구현체를 인터페이스 구현으로 래핑
- 새 구현체 작성
- 의존성 주입으로 교체
데드코드 제거
확인 절차:
# 사용되지 않는 함수 탐지
go vet ./...
# 호출자 검색
grep -r "functionName" --include="*.go" | grep -v "_test.go"
제거 원칙:
- 호출자 0개 확인 후 제거
- 주석 처리 대신 완전 삭제 (git 히스토리에 보존됨)
// removed주석 남기지 않기
리팩토링 안전 체크리스트
- 기존 테스트 모두 통과
- 특성 테스트 추가 (기존 동작 보호)
- 각 단계 후 테스트 실행
- 리팩토링과 기능 변경 커밋 분리
- 변경 전후 동작 동일 확인
- fan_in >= 3 함수에 @AX:ANCHOR 태그
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.
- 2mo ago First seen · 110 lines · 20 tokens per session scan A cf095b0a9227
refactoring is a skill published in the GitHub repository Insajin/autopus-adk (111 stars, last pushed 2mo ago), licensed MIT. It adds 20 tokens to every session and 733 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.
refactoring compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| refactoringInsajin/autopus-adk | Skill | 111 | 2mo ago | MIT | A | 20 | Claude Code, Codex |
| pr-writing-reviewevalstate/fast-agent | Skill | 4.0k | today | Apache-2.0 | A | 64 | Claude Code, Codex |
| reviewericrisco/rsc-harness | Skill | 682 | 5d ago | MIT | A | 147 | Claude Code, Codex |
| code-reviewericrisco/rsc-harness | Skill | 682 | 5d ago | MIT | A | 90 | Claude Code, Codex |
| doubt-driven-reviewBlackBeltTechnology/pi-agent-dashboard | Skill | 357 | today | MIT | A | 90 | Claude Code, Codex |
| autofixBlackBeltTechnology/pi-agent-dashboard | Skill | 357 | today | MIT | A | 30 | Claude Code, Codex |
| review-codeBlackBeltTechnology/pi-agent-dashboard | Skill | 357 | today | MIT | A | 96 | Claude Code, Codex |