Rules for code that does not read as AI-generated. Use when writing, editing or reviewing code in any language, or when someone says code "looks like AI wrote it". Removes comments that narrate or decorate, swallowed errors, placeholder bodies, one-caller abstractions, emoji logs, tests that assert nothing and sample data shipped as real, while keeping comments that explain why.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Artled Code?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/circuitsavage-artled-code)
---
name: artled-code
description: Rules for code that does not read as AI-generated. Use when writing, editing or reviewing code in any language, or when someone says code "looks like AI wrote it". Removes comments that narrate or decorate, swallowed errors, placeholder bodies, one-caller abstractions, emoji logs, tests that assert nothing and sample data shipped as real, while keeping comments that explain why.
---
# artled-code
Code from an agent has tells, just like its prose: comments that repeat the line below them, a
try/catch around everything, a helper class with one caller, `console.log("✅ Done!")`, and a test that
passes because it checks nothing. Each one makes the code longer and harder to trust.
These rules apply while you write code and when you review it. In review mode, list findings with
their rule number and change nothing until the owner picks which to fix.
Load the bundled `antislop` core and `antislop-code` with these rules. antislop-code goes deeper on
comments; K7 to K16 cover the code itself. Where the two differ, the stricter reading wins.
## Comments
A comment stays when it says something the code cannot: a reason, a constraint, a trap, a contract
with something outside this file. Everything else goes.
### K1 No comments that repeat the code
`// Initialize the counter` above `let count = 0`. `// User class` above `class User`. Delete them.
### K2 No narration
`// Step 1: validate input`, `// Next, process the request`, `// Finally, return`. The order of the
code already shows the order. If the flow is hard to follow, restructure it.
### K3 No decoration
Banners of `=` or `-`, ALL CAPS section labels, boxes, emoji (`// 🚀 Performance`) and end markers
(`} // end if`). One plain line, or nothing.
### K4 No empty labels or vague TODOs
`// Main logic`, `// Helper function`, `// TODO: improve this`. A TODO names the task and the reason:
`// TODO: paginate once accounts exceed 1,000 rows (API caps at 1,000)`.
### K5 Docs that say something
A docblock that only repeats the parameter names (`@param price The price`) goes. Keep docs that state
units, ranges, side effects, errors thrown, or behaviour a caller would not guess.
### K6 Short comments
One line, two when the second carries a new fact. Drop the issue number, the version history and the
"because, so, therefore" chain. Sentence case, plain words.
### Keep these
Business rules, security notes, performance trade-offs, concurrency, protocol details, workarounds,
edge cases, licence headers. For example:
```js
// Stripe retries webhooks for up to three days; skip events whose ID we have seen.
```
When you only fix comments, change only comments: never the code, names, imports or formatting.
## Code
### K7 Errors are handled or they travel
No empty `catch {}`, no `catch (e) { console.log(e) }` that carries on as if nothing failed, no
try/catch wrapped around code that cannot throw. Handle the error where you can do something about it;
otherwise let it reach a caller that can.
### K8 No placeholder bodies
`// implementation goes here`, `return true; // TODO`, `pass`, a function that returns hard-coded
sample data. If it is not built, it does not exist yet (H6 in the design rules): leave it out or fail
loudly.
### K9 No abstraction for one caller
A factory, interface, base class, config flag or wrapper with a single user is extra code to read.
Write the direct version; extract when the second caller arrives.
### K10 Use what is already there
Before writing a helper, check the standard library, the framework and the project's own utilities.
No hand-rolled `deepClone`, `debounce` or date formatting when the codebase already has one.
### K11 No defensive noise
No `if (x !== null && x !== undefined && typeof x === "object")` chains for values the types already
guarantee, no optional chaining on things that cannot be missing, no re-validating the same input in
three layers. Validate once, at the boundary.
### K12 Logs for people who debug
No emoji, no `"✅ Success!"`, no logging every step. Log failures and decisions with the values that
explain them: `failed to refresh token for user ${id}: ${err.message}`.
### K13 Tests test something
A test fails when the behaviour breaks. No tests that assert a mock returns what it was told to
return, no `expect(true).toBe(true)`, no snapshot of an error page. Name the behaviour in the test
title.
### K14 No sample data posing as real
Fixture users, fake prices and sample metrics live in test or demo folders and are labelled. They
never ship as the production default (H3 and H23 in the design rules).
### K15 Names say what, briefly
`userList` beats `arrayOfAllTheUserObjectsFromTheDatabase`, and `retryCount` beats `rc`. No
`data2`, `handleStuff`, `utils2.ts`, `newHelperFinal`.
### K16 Leave nothing behind
No commented-out code, unused imports, dead branches, debug logs or files the change no longer needs.
Version control remembers the old version.
## Checklist
Run before handing over code. Every answer is yes:
- Does every comment say something the code cannot? (K1 to K6)
- Is every error either handled or passed to a caller that can handle it? (K7)
- Is every function body real? (K8)
- Does each abstraction have at least two callers, or a reason written next to it? (K9)
- Are logs free of emoji and useful to someone debugging? (K12)
- Would each test fail if the behaviour broke? (K13)
- Is all sample data in test or demo code and labelled? (K14)
- Is the diff free of commented-out code, unused imports and debug output? (K16)
`scripts/audit.mjs` in the artled skill flags decorative banners, emoji in comments, step narration
and empty catch blocks in `.js`, `.ts` and `.css` files. The rest needs a reader.
The comment rules (K1 to K6) are adapted from the antislop-code skill by Miqdad Badjuber, MIT licence.