# code-craft

code-craft guides type boundaries, invariants, state, effects, errors, and abstraction choices. Use it when an agent is shaping a code change.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 1700 installs
- Author: jssblck
- License: GPL-3.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/jssblck/agents/tree/HEAD/skills/code-craft/SKILL.md
- Updated: 2026-10-09
- HTML: https://affpapa.org/en/nevibecode/skills/code-craft

## What it does

code-craft gives an agent a way to place design guarantees at the right level. It favors types and linters first, then effects, proofs, database constraints, and tests when stronger checks cannot establish the rule. The skill also covers domain states, external input, dependency effects, recoverable errors, and module boundaries.

Its guidance is split across references for illegal states, parsing, effects, proof parameters, simplicity, and architecture docs. Language notes are available for Rust, TypeScript, Go, and Python. In an existing repository, adding Effect, Zod, `xstate`, `gdp-ts`, or the listed Rust stack counts as an architecture change that should be discussed first.

The skill points database work to `database-craft`, test-level decisions to `testing-craft`, and repository setup to `project-bootstrap`. Its argument hint accepts `[rust|typescript|go|python] [target]`.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add jssblck/agents --skill code-craft -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/code-craft/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/code-craft/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add jssblck/agents --skill code-craft -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/code-craft/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add jssblck/agents --skill code-craft -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/code-craft/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install jssblck/agents code-craft
```

2. **Manually: put the files in place**
- File: `.github/skills/code-craft/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add jssblck/agents --skill code-craft -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/jssblck/agents --path skills/code-craft
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/code-craft/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add jssblck/agents --skill code-craft -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/jssblck/agents/tree/HEAD/skills/code-craft/SKILL.md

## When to use it
- place invariants at the right verification level
- turn external input into useful types
- model domain states and identities
- separate recoverable errors from required gates
- choose a simpler abstraction for the change

## Example prompts
- Use `code-craft` for a `typescript` change in the billing module.
- Apply `code-craft` to this `rust` server and decide who owns each invariant.
- Review this `python` parser with `code-craft` for the target `parser`.

## Similar
- [python-best-practices](https://affpapa.org/en/nevibecode/skills/python-best-practices.md) — skill · 855 installs
- [python-code-review](https://affpapa.org/en/nevibecode/skills/python-code-review.md) — skill · 920 installs
- [voltagent-lang](https://affpapa.org/en/nevibecode/plugins/voltagent-lang.md) — plugin · ★ 26093
- [iii-sdk-reference](https://affpapa.org/en/nevibecode/skills/iii-sdk-reference.md) — skill · 4100 installs
- [poka-yoke](https://affpapa.org/en/nevibecode/skills/poka-yoke.md) — skill · 31 installs
- [error-handling](https://affpapa.org/en/nevibecode/skills/error-handling.md) — skill · 4800 installs

From the same set: [jssblck/agents](https://affpapa.org/en/nevibecode/by/jssblck/agents.md) — 6 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
