跳到正文
cccskills
免费在 GitHub 公开

robonix-simplify

Shrink a Robonix change before review without changing behaviour. Use when a feature works and tests pass, before opening or updating a PR, and when a review asks for a smaller change.

中文简介正在准备中。当前显示原文说明。

查看安装方法

包含的文件(1)

  • SKILL.md1.8 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

robonix-simplify

A working change is usually larger than it needs to be. This pass makes it smaller and plainer before anyone reviews it. The rules are the maintainability page of .agents/guidelines/.

Steps

  1. Measure. git diff --stat <base>...HEAD, excluding generated files. Note the size.
  2. Find the fat, in this order, because the first items are the cheapest and safest:
    • comments and docstrings that restate the code, tell the history of a bug, or quote measurements (comments-explain-why, no-history-in-code);
    • code nothing calls, reads or configures (delete-dead-code) — search the whole repository, including testing/ and examples/, before deleting;
    • options, parameters and environment variables nobody sets (minimal-change);
    • the same logic in two places (dry), and new helpers that duplicate existing ones (reuse-first);
    • wrappers, layers and classes with one caller (no-single-use-abstraction);
    • long functions and deep nesting (small-functions, flat-control-flow).
  3. Understand before deleting. For each candidate, find why it exists (callers, tests, git log -S). If the reason still holds, keep it.
  4. Change in small steps, running the relevant tests after each. Behaviour, public names, contracts and stored formats stay the same; renames follow deprecate-dont-break.
  5. Measure again and report before/after line counts with the categories removed.

Stop when the remaining code is what a careful engineer would write by hand. Fewer lines is not the goal on its own: don't merge unrelated logic or inline a helper whose name explains a step.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Review a Robonix change against the repository's coding guidelines and write a Markdown review. Use when asked to review a branch, a PR, or files, and before asking a human to review your own change.

中文简介正在准备中。当前显示原文说明。

syswonder/robonix4022026年10月21日 更新

Write or edit commit messages, PR and issue descriptions, READMEs and code comments for Robonix so they read like a person wrote them. Use whenever producing prose that goes into the repository or onto GitHub.

中文简介正在准备中。当前显示原文说明。

syswonder/robonix4022026年10月21日 更新

查看 syswonder 的全部技能

报告此技能的问题