跳到正文
cccskills
免费在 GitHub 公开

readability

Refactor a part of the code to make it as easy as possible for humans to read, rating every file and function before and after.

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

openagt/openagent星标 11(GitHub 11 + cccskills 0)

实测评分 未实测

查看安装方法

包含的文件(1)

  • SKILL.md2.4 KB

SKILL.md(原文)

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

Refactor a part of the project to make it as easy as possible for humans to read. Nobody will answer you: never ask, decide yourself. The part is what follows the command: a folder, a file, or a feature in words; when nothing follows it, it is the whole project. Below, a function means any unit of logic: a function, a class, a procedure.

What to judge:

  • The architectural split. Does each file and each function represent a sensible and natural abstraction? Rate the seams, not just the boxes: for each call site, ask whether the responsibility sits on the right side of the boundary, whether a caller's wrapper should move down into the callee, or the other way round. A function can be clean, free of repetition and well tested on its own, and still be in the wrong place: well-factored is not well-located.
  • Linearity. Read as a human who reads everything top to bottom. Callers go above callees, so the reader meets the high-level logic before the details. Read each entry point and each orchestrating function top to bottom as prose, and flag every line that drops the reader into lower-level mechanism (a flag, a thunk, a log verb, error plumbing) in the middle of what should be a high-level narrative; for each, ask whether that mechanism can move down into the callee, so the caller reads at one altitude. The functions a reader meets first come first.

How to work:

  • Before changing anything, list every file and every function of the part in your messages, rate each from 0 (convoluted abstraction, hard to read, in the wrong place) to 10 (perfect), with the reason for the rating. Skip none: write a second list of every file and every function with a tick on each, to check that you rated them all.
  • Mostly 10s means you were lazy. Scrutinize everything and take the time it takes: work until the result is exceptionally good, without anyone pushing you.
  • One commit per refactor.

Commit each change on your branch. Then publish the work as far as whoever started you said; when they said nothing, publish nothing. A pull request's body is your summary, and so is your last message: the list again, each entry with its old rating, its new rating, and the commit that changed it. If nothing needs changing, say so with the ratings and stop, publishing nothing.

评价

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

评论

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

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

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

0 / 1000 字

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

同一仓库的技能

branches

免费

Where your work goes (a branch named agent-<name>), how to name it, what must be true before you finish, and how to push it when you are asked to.

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

openagt/openagent112026年10月30日 更新

browser

免费

A real browser you drive from the shell, to see or act on a web page (open it, read it, click, type, take a screenshot), such as checking that the app you changed works.

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

openagt/openagent112026年10月30日 更新

discord

免费

Post a message to the team's Discord channel from the shell, when a task asks you to tell people something there.

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

openagt/openagent112026年10月30日 更新

github

免费

The project's git host is GitHub: how to open your pull request when you are asked to, how to land it, and how to read and close the project's issues.

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

openagt/openagent112026年10月30日 更新

logs

免费

The record of every run agents made on this project — what was asked, where the work went, how it ended, what the agent said — where it lives, how to read it, and when to look back before you work.

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

openagt/openagent112026年10月30日 更新

Refactor a part of the code to make it as maintainable as possible.

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

openagt/openagent112026年10月30日 更新

查看 openagt 的全部技能

报告此技能的问题