Back to skills
SKILL.md
Code Simplifier
ASecurity使用者要求在保持既有行為下簡化程式碼時,改善可讀性、一致性與維護性。
- 2 stars
- 0 votes
- 0 copies
- 0 views
- Added September 27, 2026
Works with
Security analysis
100/100npx -y skills add ddmanyes/agent-skills-toolkit-zh-tw --skill code-simplifier --agent claude-codeAre you the author of Code Simplifier?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/ddmanyes-code-simplifier)---
name: code-simplifier
description: 使用者要求在保持既有行為下簡化程式碼時,改善可讀性、一致性與維護性。
allowed-tools: Terminal, Read, Write, Edit, Glob, Grep
---
# 代碼簡化
優先處理使用者指定、最近修改或当前任務相關的代碼;遵守專案命名、型別、錯誤處理與風格慣例。
1. 找出多餘巢狀、難讀條件、重複內容或無效抽象,確認它們的用途及呼叫端是否相同。
2. 以最小修改改善結構,保留公開介面、輸出、副作用、錯誤行為與執行順序。
3. 用相關既有測試、已知輸入輸出或必要的行為回歸驗證。不得宣稱經有限測試證明「100% 等同」。
4. 驗證失敗時定位並修復本次回歸;無法確認行為保留時保留原實作,說明未解風險。
以繁體中文回報關鍵修改、驗證方法及限制;涉及多檔案時列出主要影響範圍。
Attribution
Comments
Loading comments…