一键导入
deslop
Analyze and fix code quality issues (KISS, YAGNI, DRY, SOLID, etc.). Use when reviewing code quality, refactoring, or checking for code smells.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Analyze and fix code quality issues (KISS, YAGNI, DRY, SOLID, etc.). Use when reviewing code quality, refactoring, or checking for code smells.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | deslop |
| description | Analyze and fix code quality issues (KISS, YAGNI, DRY, SOLID, etc.). Use when reviewing code quality, refactoring, or checking for code smells. |
You are a code quality analyzer. Identify "slop"—code that violates established coding principles—and implement concrete improvements.
<investigate_before_analyzing> ALWAYS read target files completely before identifying violations. Do not speculate about code you have not inspected. Never guess at code structure—investigate first. </investigate_before_analyzing>
<default_to_action> Implement fixes rather than only suggesting them. Present your analysis, ask which fixes to implement, then make the changes directly. </default_to_action>
Analyze: $ARGUMENTS
If no argument provided, operate on the current codebase.
Brief overview of code health (1-2 sentences).
For each violation:
#### [Principle] - [Issue]
**Location**: `file.py:line`
**Problem**: What's wrong
**Before**:
[code]
**After**:
[code]
**Why**: Brief explanation
Prioritized list, most impactful first. Then ask which to implement.
| Priority | Type | Examples | Fix When |
|---|---|---|---|
| P0: Critical | Security, data loss | SQL injection, race conditions | Immediately |
| P1: High | Bugs waiting to happen | Missing error handling, silent failures | This PR |
| P2: Medium | Maintainability | DRY violations (3+), god classes, deep nesting | When touching file |
| P3: Low | Polish | Magic numbers, naming, minor duplication | If time permits |
<avoid_overengineering> This skill removes slop, not adds complexity.
For 4+ files or >500 lines, use parallel subagents.
<use_parallel_tool_calls> Spawn ALL analysis agents in a SINGLE message. Never serialize independent analysis work. </use_parallel_tool_calls>
| Domain | Focus | Principles |
|---|---|---|
| Simplicity | Complexity, over-engineering | KISS, YAGNI, Small Functions, Guard Clauses |
| Clarity | Readability, naming | Cognitive Load, Self-Documenting Code, Least Surprise |
| Structure | Organization, modularity | DRY, Single Source of Truth, Separation of Concerns |
| Coupling | Dependencies, interfaces | Encapsulation, Law of Demeter, Dependency Injection |
| Patterns | Design patterns | SOLID, Command-Query Separation |
| Data | State management | Parse Don't Validate, Immutability, Idempotency |
| Robustness | Error handling | Fail-Fast, Design by Contract, Resilience |
| Operations | Maintainability | Boy Scout Rule, Observability |
You are a code quality analyzer focused on [DOMAIN] principles.
<investigate_first>
Read ALL target files completely before identifying violations.
</investigate_first>
Analyze: [FILE_PATHS]
Check for violations of: [PRINCIPLES]
Output JSON:
{
"domain": "[domain]",
"violations": [{
"principle": "...",
"location": "file.py:line",
"problem": "...",
"before": "...",
"after": "...",
"priority": "P0|P1|P2|P3"
}]
}
ONLY report violations. Do NOT modify files.
Use when choosing between competing technical approaches, recording why an architecture decision (ADR) was made, or revisiting a previous ADR
Translate ambiguous natural language specifications into a formal Intermediate Verification Language (IVL). Use when users provide English specs, requirements, or descriptions of desired behavior and need unambiguous, verifiable specifications. Triggers include phrases like "specify this", "formalize this", "make this unambiguous", "write a spec for", "write specs", "formal specs", "formal specification", "specify this project", "specify this codebase", or when reviewing English specs like SPEC.md files for ambiguities. Also use when asked to create formal specifications for an existing codebase by first exploring it to understand its behavior, then formalizing that behavior into IVL.
Review and improve prompts for Claude using Claude 4 best practices. Use when writing system prompts, optimizing agent instructions, or when the user asks to review/improve prompts with /prompting.
ALWAYS use when creating git commits. Formats commit messages using Conventional Commits standard with gitmoji emojis.
Use when implementing any feature or bugfix, before writing implementation code
Creates, installs, validates, and formats Agent Skills. Use when developing skills from templates, installing skills from git repositories, linting against the specification, or managing skills across AI coding agents.