Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Refactor Advisor

ASecurity

ローカルの差分・ファイルを対象に、機能要件とは別のリファクタリング提案を出す。レビューの完了阻害判定とは分け、保守性の改善候補を必要な場合だけ扱う。ユーザーが /refactor-advisor と入力したら使う。

8 stars
0 votes
0 copies
0 views
Added 9/23/2026
businesscode-reviewgit

Security Analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned 9/23/2026

$npx -y skills add coil398/dotfiles --skill refactor-advisor --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Refactor Advisor?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Refactor Advisor
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/coil398-refactor-advisor/badge)](https://www.skillsdirectory.com/skills/coil398-refactor-advisor)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
Files
SKILL.md
---
name: "refactor-advisor"
description: ローカルの差分・ファイルを対象に、機能要件とは別のリファクタリング提案を出す。レビューの完了阻害判定とは分け、保守性の改善候補を必要な場合だけ扱う。ユーザーが /refactor-advisor と入力したら使う。
argument-hint: "[対象範囲の指定(例: ファイルパス、ブランチ名、コミット範囲。省略時は未コミットの差分)]"
---

# Refactor Advisor — リファクタリング提案

対象の差分を読み、機能要件や受入条件を変えない改善候補を提示します。委任する場合は、親が`references/refactor-guidance.md`の実体絶対pathを実行者へ渡し、実行者が自身で専門基準をReadします。親が直接確認する場合は、親自身がそのreferenceをReadします。必要なら現在のランタイムの委譲primitiveを使いますが、担当数や起動方式を固定しません。

**対象範囲**: $ARGUMENTS

提案は任意の補助情報であり、レビューのVERDICT、実装、テストの完了条件に自動で混ぜません。重大度は `code-review-guidance/references/result-contract.md` の P0–P3 を使い、提案は P2・P3 に限ります。P0/P1 相当を提案へ紛れ込ませず、見つけた場合は担当外の重要事項として親へ重大度を保持して返します。適用する場合は、ユーザーまたは親が候補を選び、対象リスクに応じて別の実装・レビュー・テストを計画します。

---

## ステップ 0: 実行コンテキストの確認

対象repoと現在のstatus/diffを確認する。成果物を保存する場合だけ、親またはruntimeが提示した実在の`RUN_DIR`/`REPORT_PATH`を使う。特定runtimeのhome、memory配置、パス正規化を推測しない。

---

## ステップ 1: 対象範囲の特定

`$ARGUMENTS` に応じて対象を決定する:

- 指定なし: `git diff --name-only HEAD` で未コミットの差分を取得
- ファイルパス: 指定されたファイルをそのまま対象とする
- ブランチ名: repoとremote/refを確認してから、明示したbase/headの差分を取得
- コミット範囲(例: `HEAD~3..HEAD`): `git diff --name-only <range>` で差分を取得

対象ファイルが 0 件の場合はユーザーに「対象がないため refactor-advisor は起動しません」と報告して終了する(提案ゼロ件の起動は無駄なので)。

---

## ステップ 2: 提案の作成

親が対象差分、要件、既存パターンを照合し、必要なら現在のruntimeの委譲primitiveへ、目的、対象、禁止範囲、根拠、返却事項、`references/refactor-guidance.md`の実体pathを渡す。委譲できない場合は親が同じ観点で確認する。担当数、model、再実行回数、専用のplan/reportを固定しない。

提案には、対象箇所、改善内容、期待する利点、機能退行・移行リスク、既存実装との根拠を含める。3箇所以上の重複、既存helper・標準library、既存pattern、今回追加された抽象、説明文との整合、構造投資領域の対称性を必要に応じて確認する。存在しない計画、path、判定を補完しない。

---

## ステップ 3: 結果の提示

実際に作成した提案と、保存した場合だけ実在する成果物をユーザーに提示する。提案が不要、対象がない、または利用可能な情報が不足する場合は、その事実と理由を示す。

### ユーザーへの提示フォーマット

```
## リファクタリング提案

### PROPOSALS
[N]件(P2: M件 / P3: L件)。ここではVERDICTを返さない。

### 書き出し先
[保存した場合だけ実在するパス]

### 提案一覧(要約)
- [P2|P3] `ファイル:行` — [タイトル](根拠: 既存先例 or ガードレール充足の要点 1 行)
...

### 除外した候補
[実際に除外した候補と理由。なければ none]
```

提案がない場合は`PROPOSALS: 0件`とし、対象と確認範囲を示す。未生成のレポートや提案数を作らない。

適用はユーザーまたは親が候補を選んで明示した場合だけ行う。適用する場合は、変更された挙動に必要な review/test を別途選び、機能要件を広げない。

Attribution

coil398coil398
View sourceSee grades on GitHubMore from coil398 →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Email Composer

Draft professional emails for various contexts including business, technical, and customer communication. Use when the user needs help writing emails or composing professional messages.

304952 votes

Solution Architect

Designs system architecture, component specifications, and technical integration strategy. Use when: designing solutions, system architecture, technology stack, or integration approaches.

192 votes

Akorchak:Venture Assessment

Generate a comprehensive VC investment assessment report for a company

72 votes

Telegram Compose

Compose rich, readable Telegram messages using HTML formatting via direct Telegram API. Use when: (1) Sending any Telegram message beyond a simple one-line reply, (2) Creating structured messages with sections, lists, or status updates, (3) Need formatting unavailable via Clawdbot's Markdown conversion (underline, spoilers, expandable blockquotes, user mentions by ID), (4) Sending alerts, reports, summaries, or notifications to Telegram, (5) Want professional, scannable message formatting wit...

6511 votes

Just Fucking Cancel

Find and cancel unwanted subscriptions by analyzing bank transactions. Detects recurring charges, calculates annual waste, and helps you cancel with direct URLs and browser automation. Use when: 'cancel subscriptions', 'audit subscriptions', 'find recurring charges', 'what am I paying for', 'save money', 'subscription cleanup', 'stop wasting money'. Supports CSV import (Apple Card, Chase, Amex, Citi, Bank of America, Capital One, Mint, Copilot) OR Plaid API for automatic transaction pull. Out...

6511 votes
View all in business →