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 | $0.00008 | $0.00285 |
| Sonnet 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 10d 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.
- 10d 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 today), licensed MIT. It adds 15 tokens to every session and 570 once invoked, about $0.0001 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-08-30.
Other skills, from other repositories
preflight
Plan-vs-codebase validation — verifies API contracts, type names, field accuracy, dependencies, and paths before implementation begins.
error-handling
Error handling patterns for Python and TypeScript applications. Use when designing error hierarchies, implementing retry logic, building error boundaries, or establishing logging strategies. Covers custom exceptions, result types, circuit breakers, and user-facing error messages.
db-testing
Test, debug, and validate database connectivity and queries. Use when diagnosing connection errors, testing configurations, or validating queries before deployment.
python-code-quality
Code quality checks, linting, formatting, and type checking commands for the Agent Framework Python codebase. Use this when running checks, fixing lint errors, or troubleshooting CI failures.
triage-issue
Analyze a GitHub issue, verify claims against the codebase, and close invalid issues with a technical response.
atmos-diagnostics
Atmos diagnostics: machine-readable JSONL event streams, diagnostics.enabled/file/includeoutput, subprocess start/end/output events, masking, and debugging Atmos execution.