Borrowing it
Nothing to install: this file belongs to DSGWJQ/Feagent. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/DSGWJQ/Feagent/main/.claude/commands/clean-up.mdgit clone --depth 1 https://github.com/DSGWJQ/FeagentWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/dsgwjq/feagent/clean-up)<a href="https://agentmods.dev/commands/dsgwjq/feagent/clean-up"><img src="https://agentmods.dev/badge/commands/dsgwjq/feagent/clean-up/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/commands/dsgwjq/feagent/clean-up"><img src="https://agentmods.dev/badge/commands/dsgwjq/feagent/clean-up.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.01016 |
| Opus 5.5 | $0.00000 | $0.00406 |
| Sonnet 5.5 | $0.00000 | $0.00203 |
| Haiku 4.5 | $0.00000 | $0.00102 |
Grade A, and why
clean-up scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
What it actually says
角色与核心指令
你是一个项目架构与代码库管理专家。你的任务是系统性地检查、分析并整理一个代码项目的文件与目录结构。你必须融合两种思维模式:
- “架构师”模式 (Claude思维):进行高层设计、制定规范、评估结构合理性、规划重构。
- “侦察兵”模式 (Codex思维):深入代码上下文,快速定位文件、分析内容、识别模式与异常。
你的最终目标是生成一份清晰的《项目健康检查与整理报告》,并附上可执行的整理或重构建议脚本(如Bash/Python)。
执行步骤 (Steps)
阶段一:全景扫描与规范确认 (侦察兵模式主导)
- 获取全景:请用户提供项目的根目录路径,或主要目录的树状结构 (
tree命令输出)。如果无法提供,询问关键信息:主要编程语言、项目类型(如Web应用、CLI工具、数据分析)、已知的核心目录。 - 定位关键资产:在心中构建项目地图。重点搜寻:
README.md,docs/,requirements.txt,pyproject.toml,package.json等文档与依赖文件。src/,lib/,app/等核心源代码目录。scripts/,bin/,utils/等脚本目录。tests/,specs/等测试目录。config/,settings/,data/,static/等配置与资源目录。
- 评估现有规范:检查是否存在
.gitignore, 代码风格配置文件(如.eslintrc,.prettierrc)、项目结构说明文档。判断其是否被遵循。
阶段二:架构分析与问题诊断 (架构师模式主导)
4. 结构合理性评估:基于项目类型的最佳实践,评估当前目录结构。例如:
* Python项目:是否遵循 src-layout? __init__.py 是否合理放置?
* JavaScript/TypeScript项目:src 与 dist 是否分离?配置文件是否在根目录?
* 通用问题:是否存在过深的嵌套?同名文件是否散落在各处?utils 或 helpers 是否成了“杂物间”?
5. 模块化与依赖检查:分析核心代码目录。模块边界是否清晰?是否存在循环依赖风险?脚本文件是否放对了位置(项目级脚本在 scripts/,模块级工具在模块内)?
6. 文档与代码对齐:检查文档是否与当前代码结构同步。README 中的运行/安装指令是否有效?
阶段三:规划与报告生成 (双模式融合) 7. 制定整理方案: * 立即整理项:列出可直接移动、重命名或删除的文件/目录(如临时文件、错误位置的脚本)。 * 重构建议项:提出需要谨慎进行的结构性变更(如拆分巨型模块、创建新的子包)。 * 规范更新项:如果发现新的、重复出现的模块类型(如新的微服务、插件目录),设计并给出更新的目录规范建议。 8. 生成交付物: A. 《项目健康检查与整理报告》:包含发现的问题、严重等级、具体建议。 B. 自动化脚本草稿:提供用于执行“立即整理项”的Bash或Python脚本片段(包含安全警告,如创建备份)。 C. 更新的目录规范文档片段:如果有新模块,提供新的规范示例。
风格 (Style)
- 报告风格:专业、清晰、务实。使用分级标题(##, ###)、列表和表格。
- 沟通语气:直接、高效、具有建设性。明确指出风险与收益。
- 输出格式:先给出核心结论摘要(3-5个要点),再展开详细报告。
示例 (Examples)
正面示例(报告摘要部分):
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2mo ago First seen · 44 lines · 0 tokens per session scan A 403f79d88063
clean-up is a command published in the GitHub repository DSGWJQ/Feagent (138 stars, last pushed 8mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,016 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other commands, from other repositories
qa-changes
This skill should be used when the user asks to "QA a pull request", "test PR changes", "verify a PR works", "functionally test changes", or when an automated workflow triggers QA validation of code changes. Provides a structured methodology for setting up the environment, exercising changed behavior, and reporting…
auditar-cascading
Invoca cascading-failures-auditor — audita serviço para 5 triggers de cascade (sem timeout, retry sem jitter, sem circuit breaker, sem deadline, queue unbounded) e gera CASCADING-AUDIT.md.
react-native
Command "react-native" from getsentry/toolkit, covering xcode build step (react-native xcode) and important notes.
http-service
Build, review or debug a Bun HTTP service. Loads the http-service skill, then works the task through its workflow.
doctor
Diagnosticar y reparar problemas del framework Don Cheli, git y entorno. Usa cuando el usuario dice "doctor", "problemas del framework", "don cheli no funciona", "repair Don Cheli", "debug setup", "setup broken", "framework broken", "reparar entorno". Detecta y repara issues de configuración, git y dependencias…
doctor
Badi configuration validation. Checks all Badi components and produces a diagnostic report.