Skip to content

spilberks/craftcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CraftCode

Code that looks hand-built, not AI-generated.

License: Free with attribution Claude Code skill Pure markdown, no scripts PRs welcome

The senior-engineer patterns behind the code people call "special" in top models like Fable 5 — packaged as a drop-in skill for Claude Code, so any model writes that way.

There's no secret model and no hidden architecture behind crafted-looking code. It comes from a handful of countable conventions plus care in the details. CraftCode writes those conventions down and makes your AI apply them every time.


Before / After

What you usually get:

def process_order(order_id):
    # get the order
    order = db.get(order_id)
    # try to charge and email, retry if it fails
    for i in range(3):
        try:
            charge_card(order.amount)
            send_receipt(order.email)
            return True
        except Exception as e:
            time.sleep(1)
    return False

What CraftCode gets you:

def process_order(order_id: str) -> bool:
    order = db.get(order_id)

    # charge_card is NOT idempotent — a blind retry would double-charge. Retry only
    # transient gateway errors; let permanent declines fail through to the caller.
    charge = retry(
        lambda: charge_card(order.amount),
        should_retry=lambda e: isinstance(e, GatewayTimeout),
    )

    # Receipt email is a peripheral side effect: run it once, and never let it
    # undo a successful charge (fail open, log, move on).
    try:
        send_receipt(order.email)
    except EmailError:
        log.warning("receipt email failed for order %s; charge already succeeded", order_id)

    return charge.ok

Same behavior, senior texture: the double-charge bug is gone, the why is in the code, and the happy path reads straight through.


What it fixes

CraftCode teaches the model seven conventions:

  1. Mirror before you write — read the neighbors, match their style. (Consistency beats cleverness.)
  2. Intent comments — explain why, never what.
  3. Fail-open at the edges, fail-closed on money & auth.
  4. Idempotency awareness — never blindly retry an email/deploy/charge.
  5. Native over library — no dependency for three lines of work.
  6. Constraints baked in — security/privacy/market designed in, not bolted on.
  7. Defensive boundary, clean core — keep try/except at the I/O edge.

Each comes with before/after code and a "watch for" list, plus an output checklist the model runs before it says "done." They're defaults, not dogma — the skill also spells out when a senior bends them (prototypes, house style, readability).


See it in six languages

Every pattern is a real before / after pair you can open side by side, spread across Python, Go, Rust, JavaScript, and HTML/CSS — because the ideas are language-agnostic:

examples/

Does it actually work?

The skill was checked with a small A/B recall probe before release, and the test is written down so you can reproduce it in a few minutes (no invented benchmarks):

PROOF.md

Why this exists

CraftCode started as an argument. People said a certain top model's code just felt special — like it had taste no other model could match. Pulling that texture apart, there was no secret model and no hidden architecture: it was a small set of countable conventions plus care in the details, every one reproducible. So we wrote them down. If the "magic" is countable, it isn't magic — it's a checklist, and any model can run it.


Install

CraftCode is a single self-contained folder. Drop it into your skills directory:

# Claude Code (global skills)
cp -R craftcode ~/.claude/skills/craftcode

Then just ask: "write this the CraftCode way", "make this look senior", or "de-AI this code" — the skill triggers on its own when you're writing or refactoring code.

It's pure markdown — no scripts, nothing executable — so it's safe to audit in ten seconds.


License

Free to use, modify, and redistribute (including commercially) with attribution. See LICENSE.txt.


More from otonit

CraftCode came out of the day-to-day of shipping real AI systems at otonit — the same eye for detail, packaged so anyone's model can borrow it. If it saved you from a wall of AI boilerplate and you want the systems behind it (automation, agents, things that actually ship), that's what we build.

getotonit.com


Built by otonit — automation and AI systems that ship.

About

Make any AI write code like a senior engineer — a drop-in Claude Code skill. By otonit.

Topics

Resources

License

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors