← 返回 Skills 市场
hollis9087

Agent Workspace Hygiene

作者 hollis9087 · GitHub ↗ · v0.1.2 · MIT-0
cross-platform ✓ 安全检测通过
84
总下载
0
收藏
0
当前安装
3
版本数
在 OpenClaw 中安装
/install agent-workspace-hygiene
功能描述
Use this skill only when the user explicitly asks for a dry-run cleanup inventory, disk-space cleanup, deletion review, or recoverable archiving of generated...
使用说明 (SKILL.md)

Workspace Hygiene

Keep this skill quiet, cheap, and user-friendly. It is for cleaning the workspace around the project, not rewriting the project.

Default Flow

  1. Stay silent unless cleanup is explicit. Do not interrupt normal development just because a few files exist. Mention cleanup only when the user directly asks to inventory, remove, or archive workspace artifacts, or asks to reduce disk usage from generated files.

  2. Find the workspace root. Prefer the current repo root. Do not scan the user's home directory or sibling projects unless the user names them.

  3. Take a cheap inventory first. If Python is available, run the read-only helper:

    python \x3Cskill-dir>/scripts/workspace_inventory.py --root . --summary-json --max-entries 40 --recent-hours 24
    

    Use python3 if that is the local convention. If Python is unavailable, inspect manually with the same categories below.

  4. If no intervention is needed, say so briefly. Do not produce a long report.

  5. If cleanup is useful, show a compact plan. Group findings into:

    • safe to remove or archive
    • needs user review
    • protected or skipped
  6. Ask before changing files. Default to a dry run. Before deletion or archiving, show the exact paths and actions.

  7. Prefer recoverable archive over delete. Move approved files to .codex-cleanup/archive/\x3Ctimestamp>/ and write a manifest with original path, size, modified time, and action. Permanent deletion should require explicit user wording.

  8. Verify after cleanup. Re-check git status or file inventory. Report only the meaningful result.

If the user wants recurring project-specific cleanup rules, suggest a small .workspace-hygiene.yml with keep/skip patterns. Do not create config files unless asked.

Categories

Safe cleanup candidates are usually untracked or ignored generated artifacts:

  • cache directories such as __pycache__, .pytest_cache, .mypy_cache, .ruff_cache, .parcel-cache, .turbo, .next/cache, node_modules/.cache
  • build/test outputs such as dist, build, coverage, htmlcov, test-results, playwright-report
  • temporary files such as *.tmp, *.bak, *.orig, *.rej, *.pyc, .coverage, log files in obvious log/output folders
  • agent/eval scratch outputs when the user confirms they are no longer needed

Needs review:

  • untracked source files, docs, spreadsheets, PDFs, notebooks, archives, local databases, datasets, screenshots, reports, and anything under data/
  • files modified recently, especially during the current task
  • large files with unclear provenance

Protected or skipped:

  • .git
  • .codex/skills and installed skill files
  • tracked files with modifications
  • .env, private keys, token files, credential stores, and secret-looking files
  • user-named keep paths

Safety Rules

  • Never delete or rewrite tracked changes unless the user explicitly asks for that exact action.
  • Never clean outside the resolved workspace root.
  • Never echo secret values. Report secret-looking paths only by path and category.
  • Treat databases, datasets, and archives as review-required even when they look generated.
  • Keep output in the user's language when possible.
  • Avoid large directory listings. Show counts and the top few largest or most relevant paths.

User-Facing Output

Use a short report by default:

Workspace cleanup plan
Root: \x3Cpath>
Safe candidates: \x3Ccount>, \x3Csize>
Needs review: \x3Ccount>, \x3Csize>
Skipped/protected: \x3Ccount>

Recommended action:
- Archive safe candidates to .codex-cleanup/archive/\x3Ctimestamp>/
- Review these paths before touching them: ...

If the user wants action, ask for one concise confirmation unless they already gave explicit approval for the exact paths and action.

安全使用建议
Reasonable to install if you trust the local ClawHub/Convex workflow context. Review the high-privilege commands before use, especially moderation actions, migration/deploy steps, proof publishing, and the autoreview helper's default full-access nested review mode.
能力标签
requires-walletrequires-sensitive-credentials
能力评估
Purpose & Capability
The artifacts include high-impact capabilities such as ClawHub moderation, PR proof publishing, Convex deployments, migrations, package installs, and nested code review, but these are coherent with the stated maintenance and Convex-development purposes.
Instruction Scope
Instructions generally require explicit targets, reasons, verification, dry runs, or user handoff for interactive steps; no hidden prompt overrides or purpose-mismatched directives were found.
Install Mechanism
The reviewed skill files are static Markdown/YAML guidance plus one disclosed local autoreview helper script; no install-time hooks, hidden downloaders, or automatic persistence mechanisms were found.
Credentials
The skills intentionally use local CLIs, GitHub, Convex, npm/npx, and optional external reviewer tools; this is proportionate, but users should understand that some workflows may send diffs or deployment data to configured services.
Persistence & Privilege
No hidden persistence was found. The main privilege note is that the autoreview helper defaults to running nested Codex review with full-access sandbox bypass, though this is disclosed and can be disabled with --no-yolo.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install agent-workspace-hygiene
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /agent-workspace-hygiene 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.1.2
Narrow skill description to reduce false triggers; add negative trigger evals for messy repo and handoff-only prompts.
v0.1.1
Replace non-ASCII eval prompts with ASCII-only English text to avoid encoding issues.
v0.1.0
Initial release: lightweight dry-run workspace cleanup inventory with safe/review/protected buckets.
元数据
Slug agent-workspace-hygiene
版本 0.1.2
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 3
常见问题

Agent Workspace Hygiene 是什么?

Use this skill only when the user explicitly asks for a dry-run cleanup inventory, disk-space cleanup, deletion review, or recoverable archiving of generated... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 84 次。

如何安装 Agent Workspace Hygiene?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install agent-workspace-hygiene」即可一键安装,无需额外配置。

Agent Workspace Hygiene 是免费的吗?

是的,Agent Workspace Hygiene 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Agent Workspace Hygiene 支持哪些平台?

Agent Workspace Hygiene 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Agent Workspace Hygiene?

由 hollis9087(@hollis9087)开发并维护,当前版本 v0.1.2。

💬 留言讨论