simplify
できること
最近の未コミットやステージ済みの変更を、再利用性、わかりやすさ、効率の観点で確認し、単純な整理を適用します。プルリクエストを開く前に磨き込みたい開発者向けです。
使う場面
- ✓実装が終わった直後に、整理の作業をしたいとき。
- ✓プルリクエストを開く前に、変更を磨き上げたいとき。
- ✓最近変えた部分を簡潔にしてほしい、または改善してほしいと依頼するとき。
スキルのリンク
https://github.com/QwenLM/qwen-code/blob/main/packages/core/src/skills/bundled/simplify/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“さっき行った変更を簡潔にして、明らかに安全な整理を適用してください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントはgitの状態から変更されたファイルを見つけ、複数の確認を並行して実行し、簡単な改善を適用します。品質に焦点を当て、バグの発見は別のコードレビューのスキルに任せます。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Simplify Recent Changes
You are running a structured cleanup workflow over recent code changes. Your goal is not just to comment on the code, but to safely improve it.
Step 1: Identify the review scope
Determine which files and changes to review.
- First inspect the current git state.
- If there are staged changes, review against
HEADso both staged and unstaged tracked changes are included. - Otherwise review the current uncommitted diff.
- If there is no git diff, fall back to
git ls-files --modified --others --exclude-standardso the scope respects.gitignore(this keeps build output,node_modules, and other ignored paths out of the cleanup). - If that is still empty, fall back to files edited in this conversation.
- If you still cannot identify a meaningful scope, stop and tell the user there are no recent changes to simplify.
Preferred commands:
git diff --name-onlygit diff --staged --name-onlygit diff HEAD --name-onlygit diffgit diff HEADgit status --short
Use git diff HEAD whenever staged changes exist. Otherwise use git diff.
Step 2: Launch three review passes in parallel
Use the agent tool and launch all review passes in a single response so they run concurrently. Set subagent_type: "general-purpose" and run_in_background: false on every call — each pass must return its findings inline. Do NOT fork them: never set subagent_type: "fork". A fork runs fire-and-forget and never returns its findings, so there would be nothing to aggregate in Step 3. Each pass must receive the same review scope and diff command. These passes are read-only: each one inspects and reports findings only and must not modify files — all edits happen later in Step 4.
Keep each review prompt short and focused. Do not paste the full diff into the prompt. Tell each pass to read the diff itself and inspect only files relevant to its findings.
Pass 1: Code Reuse Review
Look for opportunities to reduce duplication and reuse existing code:
- existing utilities or helpers that should be reused
- duplicated logic introduced in new code
- inline logic that should delegate to an existing abstraction
- ad-hoc helpers for string, path, env, parsing, or type checks when a project utility already exists
Pass 2: Code Quality Review
Look for maintainability issues:
- copy-paste variants that should be unified
- parameter sprawl or awkward APIs
- redundant state or indirection
- abstraction leaks
- stringly-typed code that should be modeled more clearly
- unnecessary nesting
- unnecessary comments that explain what instead of why
- naming or structure that does not match surrounding code
Pass 3: Efficiency Review
Look for wasteful work and unnecessary overhead:
- repeated work that can be memoized, cached, or removed
- serial work that can be parallelized safely
- unnecessary scans, allocations, reads, or traversals
- hot-path blocking work
- redundant no-op updates
- overly broad operations when a narrower one would work
- existence-check patterns that introduce TOCTOU style waste or risk
Step 3: Aggregate findings
Wait for all three passes to finish, then merge overlapping findings.
Prioritize fixes that are:
- low risk
- local in scope
- clearly aligned with existing project patterns
- easy to validate with tests or targeted commands
Do not force a cleanup if it would require speculative architectural changes.
Step 4: Apply straightforward improvements
Directly implement safe cleanup improvements.
Examples of good automatic fixes:
- replace duplicated logic with an existing helper
- remove redundant code, but only after a repository-wide search confirms it has no remaining callers
- simplify conditionals or control flow
- tighten loops or repeated work
- reduce unnecessary state or wrapper code
- remove low-value comments
- align code with nearby conventions
Skip items that are uncertain, risky, or too invasive. Do not spend time debating rejected findings; simply move on.
Step 5: Verify the cleanup
After making changes:
- Run focused tests for the changed area when they exist.
- Run the relevant project quality checks you can identify for the touched code.
- If there are no applicable tests, at least run a targeted build, typecheck, or lint command that covers the edited files.
Prefer targeted verification over whole-repo commands unless the project only exposes repo-wide checks.
Additional focus
If the user supplied extra i
よくある質問
バグも探しますか?
いいえ。再利用性、簡潔さ、効率に焦点を当てています。バグの確認は別のレビューのスキルが行います。
どの変更を確認しますか?
ステージ済みと未ステージのトラッキング対象の変更、またはgitで無視されていない未コミットのファイルです。
何も変更していない場合は?
エージェントは、整理できる最近の変更がないことを伝えます。
詳細
作者による元の説明
Review recent code changes for reuse, code quality, and efficiency, then directly apply straightforward cleanup improvements. Use when the user wants a post-implementation cleanup pass, pre-PR polish, or asks to simplify/refine recent changes. Invoke with `/simplify` or `/simplify <focus>`.
repo: QwenLM/qwen-code
人気
- GitHubのスター
- 29k
- ランキング
- #9786
- ライセンス
- Apache-2.0
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
codegraph
29kエージェントが、索引化されたコードベースを、呼び出しグラフ、依存関係、デッドコード、ホットスポット、意味検索を通じて分析できるよう支援します。
qwen-code-claw
29kエージェントが、コードベースの理解、バグ修正、リファクタリング、新しいプロジェクトの生成などのコーディング作業を、Qwen Codeに任せられるよう支援します。
structured-debugging
29kエージェントに、難しいバグを段階的に調べる方法を教えます。仮説を立て、的を絞った確認を行い、検証して、修正の前に本当の原因を見つけます。
tmux-real-user-testing
29kエージェントが、tmux内でターミナルアプリを実際のユーザーのように試せるよう支援します。各操作の画面のスナップショットを付けた、読みやすい手順のログを保存します。
似ているスキル
diffs
394k編集内容の実際の共有可能な差分を、手書きの要約ではなく、ビューアーのリンクや画像ファイルとして作成するようエージェントを支援します。
coding-agent
394kCodex、Claude Code、OpenCodeに大きめのコーディング作業をバックグラウンドのワーカーとして渡し、その進捗を確認するようエージェントを支援します。
gh-issues
394kGitHubのイシューを探し、取り組むものを選び、修正を含むプルリクエストを開くようエージェントを支援します。レビューコメントへの対応も含みます。