skip to content
cd/

skills

Rules I wrote so AI agents (Claude Code, Codex, Cursor) work the way I do. Each skill is a single SKILL.md file, in Portuguese and English. Free, under the MIT license.

npx skills add di0rio/cd-skills
view on github

install

npx skills add di0rio/cd-skills

to pick just one:

npx skills add di0rio/cd-skills --skill clean-code-ai

clean-code-ai

the smallest correct, safe and readable change that fits the project.

the idea

total.ts-6 +1
removed: interface PriceCalculator { calculate(items: Item[]): number }removed: class DefaultPriceCalculator implements PriceCalculator {removed:   calculate(items: Item[]) {removed:     return items.reduce((sum, item) => sum + item.price, 0)removed:   }removed: }added: const total = items.reduce((sum, item) => sum + item.price, 0)
Same result, without an interface and a class for a sum that only happens here. Shorter is never worth dropping validation, error handling or accessibility.

the ladder

Stop at the first rung that solves it correctly.

  1. does it need to exist?
  2. remove code
  3. reuse what the project already has
  4. standard library
  5. native platform feature (HTML/CSS before JS)
  6. an already-installed dependency
  7. a few lines of code
  8. abstraction, only with 2+ real uses or an external boundary
  9. a new dependency
  10. new infrastructure

benchmark

  • 191/200clean-code-ai
  • 176/200no rules
  • 166/200ponytail

5 small tasks I wrote, graded blind by another model. Each version ran once, so read it as a rough check, not proof. see results

levels

Switch the level with /clean-code-ai lite|full|ultra|off.

lite
does what was asked and mentions the simplest alternative in one line.
full
the default. Follows the ladder and, when a change goes past ~50 lines or adds a file, abstraction or dependency, says why.
ultra
extreme YAGNI. Removes before adding and questions the rest of the request.

SKILL.mdpost

portfolio-demo

short demo videos that follow one flow and end on the result.

the idea

  • before: 72s, Button, Zod, Dialog and Table with nothing tying them together
  • after: 45s, one flow: search → component → block

The cd/ui video before and after the skill. The old one jumped from component to component without explaining any of them. The new one goes from Ctrl K to a finished block and stops there.

the workflow

  1. discover
  2. pick a flow
  3. prepare
  4. rehearse in Playwright
  5. shot list
  6. capture
  7. review and integrate

modes

script
the default when the flow runs in the browser. The AI captures, edits and reviews it.
manual
you record in Recordly from the shot list. For flows that use system windows, like the file picker.

in numbers

  • 3videos in the portfolio
  • 28-45sper video
  • 2themes (dark and light)

SKILL.mdpostwatch the videos

humanizar

keeps the text in the voice of whoever signs it, without the AI feel.

the idea

  • before: I work at Loopscape building products end to end. Front-end is my thing, but I go from the database and API all the way to the last screen state.
  • after: I'm a junior front-end dev at Loopscape, working on Loopvet, a system for veterinary clinics. What I enjoy most is motion and design, and the lab on this site is where I show that.

The home bio before and after. The 'before' is where AI gets on its own. The 'after' came out of several rounds of 'no, I don't talk like that'.

what it catches

  1. abstract ranges like "from the database to the screen"
  2. a slogan at the end of the paragraph
  3. a colon followed by a list of three
  4. a clever image nobody gets
  5. jargon the person wouldn't say
  6. copying the reference instead of taking inspiration

modes

reescrever
you paste a text and get it back in your voice.
escrever
it writes posts, bios or READMEs following the rules from the start.
inspirar
you send someone else's text and it takes the idea without copying it.

SKILL.mdpost

MIT · di0rio/cd-skills