📚 Conditional — 条件
v1.0.0简化策略 为复杂或纠缠的条件逻辑选择并应用正确的重构。 使用时机:某方法的 if-then-else 过于复杂,掩盖了分支原因…
0· 24·0 当前·0 累计
安全扫描
OpenClaw
安全
high confidenceThe skill's instructions, required capabilities, and lack of external dependencies are coherent with its stated purpose of applying Fowler-style conditional refactorings to a codebase.
评估建议
This skill appears internally consistent and focused on code refactoring. Before running it: (1) work on a feature branch or clone so edits are reversible; (2) ensure you have up-to-date tests and CI so behavior changes are caught; (3) review diffs produced by the agent before committing; (4) avoid running the agent against repositories that contain secrets you don't want exposed (the skill doesn't request external endpoints, but it will read files in the repo); and (5) prefer invoking the skill...详细分析 ▾
✓ 用途与能力
Name, description, and required capabilities (reading source files, grepping, editing, and running compile/tests) align with a refactoring assistant. There are no unexpected binaries, credentials, or external services requested that would be unrelated to refactoring conditionals.
✓ 指令范围
SKILL.md confines actions to the project directory: reading source, classifying conditional structure, applying refactorings, compiling and testing. It does not instruct the agent to read unrelated system files, access external endpoints, or exfiltrate data. The only broader permissions are the normal file read/write/edit required to change code.
✓ 安装机制
This is an instruction-only skill with no install spec and no code files to write to disk. That minimizes installation risk; nothing is downloaded or executed outside the host project's normal build/test tooling.
✓ 凭证需求
The skill declares no environment variables, credentials, or config path requirements. The actions described reasonably require only repository file access and build/test tooling, so there is no disproportionate request for secrets or external credentials.
✓ 持久化与权限
always is false and there is no request to modify other skills or global agent settings. The skill only needs permission to read and write files in the project, which is appropriate for a refactoring task.
安全有层次,运行前请审查代码。
运行时依赖
无特殊依赖
版本
latestv1.0.02026/4/20
- Initial release of the "Conditional Simplification Strategy" skill. - Provides a decision framework to select and apply the correct refactoring for complex or tangled conditional logic. - Implements all 8 conditional refactorings from Fowler’s Refactoring Chapter 9, plus the Introduce Assertion technique. - Details triggers, diagnosis, required inputs, and process for each refactoring. - Distinguishes between guard clauses and if-else branches based on intent and structure. - Intended for developers familiar with OOP and basic refactoring who face hard-to-read or convoluted conditional code.
● 无害
安装命令
点击复制官方npx clawhub@latest install bookforge-conditional-simplification-strategy
镜像加速npx clawhub@latest install bookforge-conditional-simplification-strategy --registry https://cn.longxiaskill.com镜像同步中