# principle-the-algorithm

The principle-the-algorithm skill for Claude Code runs a five-step engineering review on non-trivial changes before design.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 135 installs · ★ 18130 repo stars
- Author: cursor
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/cursor/plugins/tree/HEAD/dyl-stack/skills/principle-the-algorithm/SKILL.md
- Updated: 2026-10-25
- Security check: automated, 2026-11-17 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/principle-the-algorithm

## What it does

The skill enforces a strict five-step order for changes exceeding a simple edit, adapted from engineering principles. It questions requirements at the source, deletes unnecessary parts or process steps, optimizes what survives, accelerates the workflow, and automates last. Skipping early steps leads to optimizing code that should not exist. The review repeats before shipping, and the model must name the questioned requirement and deleted items in its reply.

The process mandates strict adherence to the sequence without jumping to optimization prematurely. Requirements from any source undergo validation of their underlying reasoning. Model invocation is disabled by default via `disable-model-invocation: true`, requiring explicit triggers.

Execution relies on manual activation to maintain sequence integrity throughout the review workflow.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add cursor/plugins --skill principle-the-algorithm -a claude-code
```

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

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add cursor/plugins --skill principle-the-algorithm -a codex
```

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

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add cursor/plugins --skill principle-the-algorithm -a cursor
```

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

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install cursor/plugins dyl-stack/skills/principle-the-algorithm
```

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

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add cursor/plugins --skill principle-the-algorithm -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/cursor/plugins --path dyl-stack/skills/principle-the-algorithm
```

### Windsurf (Devin Desktop)

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

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add cursor/plugins --skill principle-the-algorithm -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/cursor/plugins/tree/HEAD/dyl-stack/skills/principle-the-algorithm/SKILL.md

## When to use it
- validate requirements before designing code changes
- remove redundant parts and process steps before optimization
- optimize surviving components
- accelerate the edit, build, and review workflow
- automate processes only after eliminating waste

## Example prompts
- Apply principle-the-algorithm to the upcoming authentication refactor
- Review the new database schema requirements using the engineering algorithm
- Run the five-step check on the payment module changes

## Similar
- [principle-never-block-on-the-human](https://affpapa.org/en/nevibecode/skills/principle-never-block-on-the-human.md) — skill · 10200 installs
- [principle-prove-it-works](https://affpapa.org/en/nevibecode/skills/principle-prove-it-works.md) — skill · 10300 installs
- [JWT Decoder — Inspect Claims, Expiry & Algorithm](https://affpapa.org/en/nevibecode/mcp/jwt-decoder-inspect-claims-expiry-algorithm.md) — MCP server · 4612 installs
- [kiss-principle](https://affpapa.org/en/nevibecode/skills/kiss-principle.md) — skill · 251 installs
- [algorithm-design](https://affpapa.org/en/nevibecode/skills/algorithm-design.md) — skill · 1800 installs
- [exploiting-jwt-algorithm-confusion-attack](https://affpapa.org/en/nevibecode/skills/exploiting-jwt-algorithm-confusion-attack.md) — skill · 303 installs

From the same set: [cursor/plugins](https://affpapa.org/en/nevibecode/by/cursor/plugins.md) — 53 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
