Agent Skills
› mocasus/unprompted
› unprompted-code
unprompted-code
GitHub移除AI生成代码中的冗余注释、ASCII横幅、表情日志及防御性包装,提升源码可读性与规范性。适用于编写、重构或清理代码时加载,确保结构简洁且注释具有实际价值。
Trigger Scenarios
编写新代码
重构现有代码
清理源码中的AI痕迹
Install
npx skills add mocasus/unprompted --skill unprompted-code -g -y
SKILL.md
Frontmatter
{
"name": "unprompted-code",
"license": "MIT",
"version": "4.0.0",
"metadata": {
"author": "mocasus",
"category": "code-quality",
"openclaw": {
"emoji": "🧹"
},
"repository": "https:\/\/github.com\/mocasus\/unprompted"
},
"description": "Remove AI-shaped code tells: ASCII banner comments, line-by-line narration comments, emoji console logs, dead defensive wrappers, and placeholder stubs. Load whenever writing, refactoring, or cleaning up source code.",
"compatibility": [
"windows",
"macos",
"linux"
]
}
unprompted-code — Clean, Human-Written Source Hygiene
Extends v4 W-04, W-06, W-05, and M-10. AI-generated source files carry unmistakable comment and structural noise even when the logic works.
1. Comment hygiene: delete what restates the code (W-04)
Immediately delete
- ASCII / box-drawing section banners:
If a file needs giant ASCII dividers to stay navigable, split the module or let clear function names speak for themselves.// ========================================== // HELPER FUNCTIONS // ========================================== - Captain-obvious narration comments:
// Initialize retry counter to zero let retries = 0; // Return the user object return user; - Prompt-echo & changelog comments:
- Never leave
// Added per user request,// Fixed bug,// Updated to remove slop, or// Here we seamlessly handle...inside source files; commit history belongs in Git, not inline comments.
- Never leave
- Emoji console & error strings (
W-06):- Replace
console.log("🚀 Server started!")andconsole.error("❌ Failed!")with structured, greppable log prefixes ([http] listening on 127.0.0.1:8080,[db] connection refused: ECONNREFUSED).
- Replace
Keep comments only when they carry non-obvious signal
Keep a comment only when deleting it would hide something the syntax itself cannot express:
- Why a non-obvious threshold, regex, or ordering invariant exists ("Flush before closing socket; Windows resets unread TCP buffers on immediate close").
- External protocol / RFC / browser-bug citations ("Safari < 17.4 ignores subgrid gap percentage; fallback to fixed rem").
- Public library JSDoc documenting units, side effects, or error contracts on exported APIs.
No comment is the default. A comment must earn its line.
2. Structural anti-slop in implementation (W-05, M-10)
- No speculative abstraction: Do not wrap a single-use 6-line fetch call inside
BaseApiServiceFactory+AbstractHttpAdapter. Write direct, flat modules until a second real caller demands extraction. - No silent catch swallowing: Never write
catch (err) { /* ignore */ }orcatch (e) { return null; }around I/O or network boundaries unless failure is an expected control-flow branch (and state why). - No unasked stubs: Never replace working code with
// ... rest of implementation remains the sameor unrequestedTODOplaceholders. A placeholder is not a deliverable (W-05). - No client JS for layout, type, or simple interaction (
M-10): Prefer CSS for responsive composition, type scaling, and simple states; keep the JS budget for behavior that needs it. - No dead defensive wrappers: Do not add try/catch, null checks, or feature-detection layers for conditions the code cannot encounter. Defend the boundary, not every line.
Version History
-
5f9ec34
Current 2026-12-05 03:22
版本升级至v4.0.0,规则标识从U系列调整为W和M系列,更新了对结构化日志和非明显信号注释的规范描述。
- 10cd954 2026-12-03 02:10


