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 ast-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/ast-refactoring)<a href="https://agentmods.dev/skills/insajin/autopus-adk/ast-refactoring"><img src="https://agentmods.dev/badge/skills/insajin/autopus-adk/ast-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/ast-refactoring"><img src="https://agentmods.dev/badge/skills/insajin/autopus-adk/ast-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.00015 | $0.00570 |
| Opus 5.5 | $0.00006 | $0.00228 |
| Sonnet 5.5 | $0.00003 | $0.00114 |
| Haiku 4.5 | $0.00002 | $0.00057 |
Grade A, and why
ast-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 3mo 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
AST Refactoring Skill
Abstract Syntax Tree(AST)를 활용하여 코드를 안전하게 리팩토링하는 스킬입니다.
AST 기반 리팩토링 원칙
왜 AST인가?
- 텍스트 기반 치환:
sed, 정규식 → 오탐, 부분 매칭 위험 - AST 기반 변환: 문법을 이해하고 변환 → 안전
Go AST 도구
# gorename: 심볼 안전 이름 변경
gorename -from "github.com/org/pkg.OldName" -to NewName
# gofmt -r: 패턴 기반 변환
gofmt -r 'a.Foo(b, c) -> a.Bar(b, c)' -w ./...
# gotools: 패키지 이동
gomv github.com/org/pkg/old github.com/org/pkg/new
리팩토링 패턴
Extract Function
// Before: 복잡한 함수
func ProcessOrder(order Order) error {
// 유효성 검사 (30줄)
// 가격 계산 (20줄)
// DB 저장 (15줄)
return nil
}
// After: 분리된 함수
func ProcessOrder(order Order) error {
if err := validateOrder(order); err != nil {
return err
}
price := calculatePrice(order)
return saveOrder(order, price)
}
Extract Interface
// 구체 타입에 인터페이스 추출
type UserRepository interface {
FindByID(ctx context.Context, id string) (*User, error)
Save(ctx context.Context, user *User) error
}
Move Package
# 패키지 이동 시 모든 참조 자동 업데이트
# gopls를 통한 LSP rename 사용
안전한 리팩토링 절차
1. 기존 테스트 실행 (GREEN 확인)
2. 리팩토링 실행
3. 테스트 재실행 (GREEN 유지 확인)
4. 린터 실행
5. 커밋
원칙: 기능 변경과 리팩토링을 동일 커밋에 혼합하지 않습니다.
체크리스트
- 리팩토링 전 테스트 GREEN 확인
- 단일 책임 원칙 충족
- 인터페이스 추출로 테스트 용이성 향상
- 변수/함수 명명이 의도를 명확히 표현
- 리팩토링 후 테스트 GREEN 확인
- 성능 회귀 없음 (벤치마크 비교)
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.
- 3mo ago First seen · 87 lines · 15 tokens per session scan A 453dc83e7738
ast-refactoring is a skill published in the GitHub repository Insajin/autopus-adk (111 stars, last pushed 2mo ago), licensed MIT. It adds 15 tokens to every session and 570 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-08-30.
ast-refactoring compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| ast-refactoringInsajin/autopus-adk | Skill | 111 | 2mo ago | MIT | A | 15 | Claude Code, Codex |
| python-code-qualitymicrosoft/agent-framework | Skill | 15k | 13d ago | MIT | A | 40 | Claude Code, Codex |
| session-investigatorevalstate/fast-agent | Skill | 4.0k | today | Apache-2.0 | A | 68 | Claude Code, Codex |
| angularericrisco/rsc-harness | Skill | 682 | 5d ago | MIT | A | 89 | Claude Code, Codex |
| cppericrisco/rsc-harness | Skill | 682 | 5d ago | MIT | A | 81 | Claude Code, Codex |
| gamedev-physicsericrisco/rsc-harness | Skill | 682 | 5d ago | MIT | A | 102 | Claude Code, Codex |
| observabilityericrisco/rsc-harness | Skill | 682 | 5d ago | MIT | A | 70 | Claude Code, Codex |