# coding

Hands the agent a set of coding principles — DRY, KISS, YAGNI, SOLID. Useful when writing features, refactoring or reviewing code.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 392 installs · ★ 4
- Author: davidkiss
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/davidkiss/smart-ai-skills/tree/HEAD/skills/coding/SKILL.md
- Updated: 2026-05-08
- HTML: https://affpapa.org/en/nevibecode/skills/coding

## What it does

The skill loads as a set of instructions and fires on code-related tasks. It covers the basics: no duplicated logic, pick the plain solution over the clever one, skip abstractions you do not need yet, keep one reason for a class or function to change. One bullet tells the agent to follow whatever rules the project already has in `CLAUDE.md`, `AGENT.md` and similar files.

Then come the day-to-day items. Descriptive names, functions that do one thing, input validation, graceful exception handling, comments that explain why rather than what. Security gets a short mention: sanitize input, keep secrets out of source, grant the least privilege. Performance is framed as something to keep in mind without optimizing early.

Before a task is called done, the skill runs a check loop: simplify the code with the code-simplifier plugin, compare the diff against the requirements, run the linter and formatter, add the missing tests and get them green. When a project has no linter or test runner set up, the agent proposes one — `npm install --save-dev eslint` is the example given. The simplification step depends on code-simplifier being available.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add davidkiss/smart-ai-skills --skill coding -a claude-code
```

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

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add davidkiss/smart-ai-skills --skill coding -a codex
```

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

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add davidkiss/smart-ai-skills --skill coding -a cursor
```

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

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install davidkiss/smart-ai-skills coding
```

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

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add davidkiss/smart-ai-skills --skill coding -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/davidkiss/smart-ai-skills --path skills/coding
```

### Windsurf (Devin Desktop)

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

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add davidkiss/smart-ai-skills --skill coding -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/davidkiss/smart-ai-skills/tree/HEAD/skills/coding/SKILL.md

## When to use it
- split a new feature into functions without copy-paste
- clean up code before a review
- add a linter and formatter to a project that lacks them
- write tests for new logic and run them
- check a diff for leaked secrets and excess permissions

## Example prompts
- Build an avatar upload endpoint and check it against the coding skill
- Refactor this module: remove duplication and break up the large functions
- Run the linter and tests before I commit, add whatever is missing

## Similar
- [setup-matt-pocock-skills](https://affpapa.org/en/nevibecode/skills/setup-matt-pocock-skills.md) — skill · 1052851 installs
- [ask-matt](https://affpapa.org/en/nevibecode/skills/ask-matt.md) — skill · 766587 installs
- [to-tickets](https://affpapa.org/en/nevibecode/skills/to-tickets.md) — skill · 711230 installs
- [writing-plans](https://affpapa.org/en/nevibecode/skills/writing-plans.md) — skill · 282859 installs
- [caveman-review](https://affpapa.org/en/nevibecode/skills/caveman-review.md) — skill · 411800 installs
- [caveman-compress](https://affpapa.org/en/nevibecode/skills/caveman-compress.md) — skill · 411500 installs

From the same set: [davidkiss/smart-ai-skills](https://affpapa.org/en/nevibecode/by/davidkiss/smart-ai-skills.md) — 2 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
