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-skillsinstall
npx skills add di0rio/cd-skillsto pick just one:
npx skills add di0rio/cd-skills --skill clean-code-aiclean-code-ai
the smallest correct, safe and readable change that fits the project.
the idea
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)the ladder
Stop at the first rung that solves it correctly.
- does it need to exist?
- remove code
- reuse what the project already has
- standard library
- native platform feature (HTML/CSS before JS)
- an already-installed dependency
- a few lines of code
- abstraction, only with 2+ real uses or an external boundary
- a new dependency
- 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.
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
- discover
- pick a flow
- prepare
- rehearse in Playwright
- shot list
- capture
- 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)
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
- abstract ranges like "from the database to the screen"
- a slogan at the end of the paragraph
- a colon followed by a list of three
- a clever image nobody gets
- jargon the person wouldn't say
- 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.