- name
SKILL.md
The skill file stays in the publisher's repository.
Paste the copied command in a terminal. It installs this SKILL.md into that agent.
npx skills add nagi-studio/skills --skill tidy -a cursor -yPaste the copied command in a terminal. It installs this SKILL.md into that agent.
npx skills add nagi-studio/skills --skill tidy -a claude-code -yPaste the copied command in a terminal. It installs this SKILL.md into that agent.
npx skills add nagi-studio/skills --skill tidy -a codex -yPaste the copied command in a terminal. It installs this SKILL.md into that agent.
npx skills add nagi-studio/skills --skill tidy -a grok -ySend the copied message in a Grok Bot chat. The Bot fetches this SKILL.md from GitHub and adds it to the skills all your Bots share.
Install this skill: https://github.com/nagi-studio/skills/tree/HEAD/skills/rookie/tidyFrom the publisher
Agent 变笨,多半是它每次读到的东西太多、太旧、太乱。这一次只做减法:合并、删除、拦住,不加新功能。
每一步先把要改的列给用户看,用户点头再动手。删掉的东西 git 里都还在,确认没人引用就可以删。
找出业务规则(算不算迟到、价格怎么算、谁能看什么)分别写在了哪几处。同一条规则出现在两处以上,就收到一个地方,其他地方改成调用它。代码长得像、管的却是不同的事,就各留各的。
做完的标准:每条业务规则只剩一个出处,测试照样通过。
用 Git 的提交前钩子:提交的文件超过 5,000 token(字节数 ÷ 4,约 20 KB)就拒绝提交,报错写明这个文件多大,请按功能拆成几个文件。lockfile、自动生成的代码、构建产物这类 agent 不会去读的文件,跳过不查。项目已经在用 husky、lefthook、pre-commit 这类工具的,加在它里面。
装好后拿一个超标的文件试:提交必须被拦下,拆完再提交必须通过。已经超标的文件列出来交给用户,这一步不顺手去拆。
再在 AGENTS.md 里写两行:提交被钩子拒了,照报错拆文件再提交;写新函数、新规则前,先搜项目里有没有现成的。
docs/ 的路标。看一眼目录、package.json 或 --help 就知道的删掉;长篇细节挪进 docs/,在 AGENTS.md 里用一行指过去。规矩收拢:<规则> → <路径>(原来 N 处)
删掉:N 个文件,N 行
钩子:<装在哪>;超标文件被拦下、拆完通过
AGENTS.md:N 行 → N 行
建议关掉的工具:…;没有就写「无」
还超标、没拆的文件:…;没有就写「无」
最后告诉用户以后的三个习惯:读代码、搜资料交给 sub-agent,只带回结论;聊长了就 /compact;换任务就清空,开一个新对话。
给项目做大扫除,减少 agent 每次要读的东西:同一条规矩收成一处、清掉死代码和废话注释、装上文件大小钩子、给 AGENTS.md 和工具瘦身。用在 agent 越用越笨、改东忘西、项目变大之后,或者用户说整理项目、大扫除、tidy 时。
---name: tidydescription: 给项目做大扫除,减少 agent 每次要读的东西:同一条规矩收成一处、清掉死代码和废话注释、装上文件大小钩子、给 AGENTS.md 和工具瘦身。用在 agent…---# skills/rookie/tidy/SKILL.mdFAQ
Download skills/rookie/tidy/SKILL.md from the publisher, or copy the path and open the repository. PlugMCP lists the skill and does not host the file.
The publisher keeps it at https://github.com/nagi-studio/skills.
Claude, Cursor, Codex, and Grok Build can read a SKILL.md you add from the publisher's repository. Grok Bot installs it when you send the skill's GitHub folder link in a chat.