slop
安装方式
先用 Prompt 核对来源与依赖。也可下载安装包。
用 AI 助手安装
复制提示词,让助手先核对固定版本和依赖。
查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "slop":https://skillpi.com/zh/skills/deepskill-bffd4c70bffcc02b5240a855dec08e1daf413f0f463f607ebe67280ab9820eb8。安装前核对上游来源和版本:https://github.com/jellydn/my-ai-tools。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。
来源与配置
github.com
配置方式待核实
请查看原始来源中的适用工具、依赖和权限要求。
安装实测待补充
清理 git diff 中的 AI 生成代码冗余,以维护代码质量。
介绍来源: third_party · jellydn · 0.0.1 参考来源
SkillPi 解读
- 能完成的任务
- 翻译待完成,请参阅来源文档。
- 适合谁
- 来源文档未说明。
- 输入和输出
- 来源文档未说明。
- 软件、账号及付费要求
- 来源文档未说明。
- 限制与区别
- 来源文档未说明。
- 实测状态
- 未测试
文件浏览
Frontmatter
name: slop
description: "Remove AI-generated code slop from git diffs to maintain code quality"
license: MIT
compatibility: cline, claude, opencode, amp, codex, gemini, cursor, pi
hint: Use when cleaning up AI-generated code slop in git diffs
user-invocable: true
metadata:
audience: all
workflow: code-qualityRemove AI Code Slop
Check the diff against a branch and remove all AI-generated slop introduced in this branch. Simplifies and refines code for clarity, consistency, and maintainability while preserving all functionality.
Usage
/slop [branch-name]
- If no branch is provided, compare against main:
/slop main
What is AI Code Slop?
This includes:
- Extra comments that a human wouldn't add or is inconsistent with the rest of the file
- Extra defensive checks or try/catch blocks that are abnormal for that area of the codebase
- Casts to
anyto get around type issues - Any other style that is inconsistent with the file
Core Principles
1. Preserve Functionality
Never change what the code does - only how it does it. All original features, outputs, and behaviors must remain intact.
2. Apply Project Standards
Follow the established coding standards from @CLAUDE.md or conventions:
- Use proper import sorting and file organization
- Follow language-specific patterns (ES modules, proper TypeScript types, etc.)
- Maintain consistent naming conventions
- Use proper error handling patterns
3. Enhance Clarity
Simplify code structure by:
- Reducing unnecessary complexity and nesting
- Eliminating redundant code and abstractions
- Improving readability through clear variable and function names
- Consolidating related logic
- Removing unnecessary comments that describe obvious code
- IMPORTANT: Use switch statements or if/else chains over nested ternary operators
- Choose clarity over brevity - explicit code is often better than overly compact code
4. Maintain Balance
Preserve necessary complexity — over-simplification can:
- Reduce code clarity or maintainability
- Create overly clever solutions that are hard to understand
- Combine too many concerns into single functions
- Remove helpful abstractions that improve code organization
- Prioritize "fewer lines" over readability
Process
1. Get the diff
# Compare against main branch
git diff main...HEAD --stat
# Or against specific branch
git diff $1 --stat
2. Review each changed file
For each changed file:
- Read the current content
- Compare with original (before changes)
- Identify AI-generated slop patterns
- Check for opportunities to improve elegance and consistency
3. Remove slop and refine
- Remove unnecessary comments
- Simplify overly defensive code
- Remove
anycasts where possible - Restore natural code style
- Apply project-specific best practices
- Ensure all functionality remains unchanged
4. Verify
# Show remaining changes
git diff --stat
# Check tests still pass
npm test
Common Slop Patterns
- Over-commenting: Comments explaining obvious code
- Verbose error handling: Try/catch blocks where not needed
- Unnecessary type casts:
x as anyto bypass TypeScript - Defensive programming: Checks for already-validated inputs
- Redundant validation: Duplicate null/undefined checks
- Nested ternaries: Complex nested ternary operators
- Overly compact code: Dense one-liners that sacrifice readability
Refinement Guidelines
When refining code:
- Identify the modified sections - Only refine code that changed in the diff
- Analyze for improvement opportunities - Look for ways to enhance elegance and consistency
- Apply project standards - Follow established conventions and patterns
- Preserve functionality - Ensure behavior remains unchanged
- Verify improvements - The refined code should be simpler and more maintainable
- Document significant changes - Only document changes that affect understanding
Code Style Preferences
- Prefer explicit over compact - readable code beats clever code
- Use descriptive names - clarity over brevity
- Flatten deep nesting with early returns and guard clauses
- Remove redundant code - eliminate duplicates
- Use language-appropriate patterns - follow idiomatic practices
当前收录版本
0.0.1
安全与评测信息
质量评测
满分100 · 来自 SkillPi LAB 实验室的评测报告。
亮点
- 针对 AI 生成代码中的冗余问题提供具体清理方案,实用性强
- 适用于开发者维护代码质量的明确场景,受众清晰
亮点
- 触发描述清晰明确,边界清晰,覆盖主要使用场景
待提升项
-
缺少显式 When to Use 章节 原报告严重程度:轻微
文档中已有 Usage 和 hint,但未单独设立 When to Use 章节
改进建议:建议增加显式的 When to Use 章节以提升可读性
亮点
- 文档结构清晰,步骤划分明确,包含完整的使用指南和原则
- 提供了具体的操作示例和命令,便于用户理解和执行
亮点
- 提供了具体的 git 命令和操作流程,工具来源明确
- 强调了功能不变性验证,确保修改安全可靠
取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。
正文静态检测
100 / 100 · skillpi-20261123-no-r3-v1
正文未命中当前规则。
分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。
权限与使用前检查
根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。
未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。
安全评级与访问范围
safe · 静态证据核验,不代表运行安全保证。
来源文档未说明。
使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。
用户讨论
还没有已核实的点评。