Skip to content
Back to skills

Unprompted Code

ASecurity

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.

  • 670 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 30, 2026
ai-agentsgoexpressrefactoringgitapi

Works with

  • cli
  • api

Security analysis

A100/100

Scanned December 5, 2026

npx -y skills add mocasus/unprompted --skill unprompted-code --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Unprompted Code?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Unprompted Code
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/mocasus-unprompted-code/badge)](https://www.skillsdirectory.com/skills/mocasus-unprompted-code)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: unprompted-code
version: 4.3.3
license: MIT
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]
metadata:
  author: mocasus
  category: code-quality
  repository: https://github.com/mocasus/unprompted
  openclaw:
    emoji: "🧹"
---

# 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
1. **ASCII / box-drawing section banners**:
   ```ts
   // ==========================================
   // HELPER FUNCTIONS
   // ==========================================
   ```
   If a file needs giant ASCII dividers to stay navigable, split the module or let clear function names speak for themselves.
2. **Captain-obvious narration comments**:
   ```ts
   // Initialize retry counter to zero
   let retries = 0;
   // Return the user object
   return user;
   ```
3. **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.
4. **Emoji console & error strings (`W-06`)**:
   - Replace `console.log("🚀 Server started!")` and `console.error("❌ Failed!")` with structured, greppable log prefixes (`[http] listening on 127.0.0.1:8080`, `[db] connection refused: ECONNREFUSED`).

### 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 */ }` or `catch (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 same` or unrequested `TODO` placeholders. 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.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.