agentleFS
WanghaoyihaoyiWanghaoyihaoyi/agent-skills/skills/prune/SKILL.md

prune

Skill3 starsChanged 35 days agoMITView on GitHub

对当前项目执行减法式架构审查与重构,删除过时流程、冗余状态、无价值中间层与失效补丁,并直接实施和验证。用于用户要求架构减法、清除历史复杂度、死代码、废弃实验、常量化功能开关或精简设计;不用于仅整理最近改动、代码美化或普通只读审查。

14 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use deliver, wizard and 5 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • GoogleSkill

    deliver

    Posts a condensed version of the briefing to a Google Chat or Slack incoming webhook, so the daily run delivers itself — skips silently when no webhook is configured.

    Also in 3 projects that use this

  • AWSSkill

    wizard

    Generate an interactive bash wizard that walks a human through steps only they can perform. Use when provisioning infrastructure, setting up credentials or CI secrets, walking an unfamiliar third-party dashboard, or running a one-off migration or cutover. Don't invoke this for steps the agent can perform itself.

    Also in 3 projects that use this

  • AWSSkill

    wait-what

    Stop. That last message did not land: re-pitch it.

    Also in 3 projects that use this

  • NVIDIASkill

    research

    Before designing a feature, research how comparable libraries solve the problem, check best practices, known pitfalls, and upstream changes. Use when starting a new feature, investigating an unfamiliar area, or the user asks to research something.

    Also in 5 projects that use this

  • GoogleSkill

    prototype

    Build a throwaway prototype to answer a design question. Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like.

    Also in 4 projects that use this

  • BlockSkill

    plan

    Draft a TDD, PRD, or lightweight plan in the conversation without committing it.

    Also in 3 projects that use this

The file

Files
SKILL.md

Prune

在用户指定范围内做架构减法,直接实施证据充分的简化并验证;只读要求优先。仅编辑本技能不启动项目重构,技能不扩大生产、数据或发布权限。

建立范围与候选

核对项目入口、当前实现、相关合同、工作区与改动归属,保留他人工作。项目级请求先轻量了解主要应用、服务、共享合同和后台链路;模块级请求沿相关上下游调查,不自动扫描全仓。初筛不要求逐文件通读,也不能把目录列表称为完整架构审查。

优先看竞争的权威状态、新旧双轨、散落规则、重复补丁和无价值转发层。用最直接满足当前需求的设计作参照,比较修改点、状态同步和故障路径,不按删除行数排序。简单任务在上下文中维护候选即可,长期工作复用已有记录。

每个重点候选查清:它保护什么,谁仍使用,触发条件是否存在,删除后哪个真实场景可能失败。必要时核查动态注册、构建、配置和外部版本;“搜不到引用”或“没有测试”不能单独证明可删。事实缺口自行调查,真正未定的业务含义才交给用户。

在责任边界简化

消除共同原因,再删因此失效的状态、补丁、旧路径、配置和专属测试。同步必要调用方与权威说明。不要用新管理器、开关或兜底包住旧复杂度;只有真实降低维护负担时才抽象,允许清楚的少量重复。

保留鉴权、业务归属、幂等、并发、超时、资源回收及迟到结果隔离等实际职责,可采用更简单的等效实现。缓存、界面投影与服务端状态不因字段相似就合并。区分等价简化与已授权的行为修复,不吞错、伪造成功、改变未确认的数据语义或删除历史迁移。

  • 死代码、实验和功能开关退役:按 退役证据 核查仍受支持的入口与应急用途。
  • 替换 SDK 或平台能力:核对实际版本及官方合同。
  • 行为不清:先表征或对照相同输入与事件顺序。机制收益存疑时才做隔离消融,不能用正常路径通过证明失败保障无用。
  • 确需渐进迁移:每阶段明确权威入口、状态归属、兼容边界和旧路径退出条件;不为比较重复真实业务副作用。发布或流量切换仍按有效授权。

方法按疑点选择,不要求逐一运行。拆文件、改名或隐藏分支本身不算架构简化。

实施、验证与停止

简短说明最有价值的候选及依据后,自主处理范围内证据充分的部分。按可独立验证的批次推进;必要的根因修复不因跨文件而拆成只处理症状的补丁。

按 test-audit 核对必须保留的行为及相关失败场景,复用现有验证。区分基线失败与本次回归,不靠放宽断言或删除独立保护证明成功。没有运行的对照只称分析,没有设备或真实服务证据就标明未验证。

每批完成后处理因此失效的相关残留,并继续尚未完成的重点候选;不重复扩大已通过批次的测试代替剩余工作。范围内初筛与重点调查完成、候选已实施或有具体保留/阻塞依据后结束,不无限寻找新清理机会。

最终说明实际覆盖范围、减少了哪些修改点或状态关系、验证结果、必要保留项与阻塞。不能把一次局部清理称为全项目审查,也不为交付另造报告或追求删除指标。

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.