.claude/skills/legacy-code-improvement/SKILL.md
レガシーコードを段階的に改善する。テスト自動化、モデルの分離、アーキテクチャの整理を通じて、保守性と拡張性の高いコードベースへ変換する。
npx skillsauth add asonas/dotfiles legacy-code-improvementInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
レガシーコードを段階的に改善し、テスタブルで保守しやすいコードへ変換します。
// Before: 直接依存
class OrderService {
process(order) {
const db = new Database();
const mailer = new EmailService();
db.save(order);
mailer.send(order.userEmail, 'Order confirmed');
}
}
// After: 依存性注入
class OrderService {
constructor(database, emailService) {
this.database = database;
this.emailService = emailService;
}
process(order) {
this.database.save(order);
this.emailService.send(order.userEmail, 'Order confirmed');
}
}
このスキルを実行する際は以下の順序で進めます:
現状分析
改善計画の作成
TDDサイクルの実行
段階的なアーキテクチャ改善
改善後のコードが満たすべき基準:
data-ai
Summarize the day's work and append to the daily note in Obsidian.
data-ai
memory-vector と memory-graph を横断検索して過去の記憶を呼び出す。「思い出して」「覚えていますか」「前に話した」等の記憶呼び出し時に使う。
development
Review GitHub Pull Requests. When given a PR URL, fetches diff and comments using gh command, then performs objective and critical code review.
tools
Use when starting the day. Organizes tasks, calendar, and context from previous sessions, then coaches through blockers on Linear issues via interactive dialogue.