# algorithm-design

Turn a method description or implementation into LaTeX pseudocode and Mermaid diagrams. Use it to formalize an algorithm and check its representation against code.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 1700 installs · ★ 433
- Author: lingzhi227
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/lingzhi227/agent-research-skills/tree/HEAD/skills/algorithm-design/SKILL.md
- Updated: 2026-02-27
- HTML: https://affpapa.org/en/nevibecode/skills/algorithm-design

## What it does

The skill lays out an algorithm’s inputs, outputs, parameters, and control flow, then formats the result with LaTeX `algorithm` and `algpseudocode` environments. It can also produce Mermaid UML class and sequence diagrams. Diagram and algorithm templates are referenced at `~/.claude/skills/algorithm-design/references/algorithm-templates.md`.

It checks whether pseudocode steps correspond to code modules, diagram classes appear in the implementation, and parameter names agree across both. The rules call for numbered lines and complexity analysis as a comment or proposition. That consistency check depends on having an implementation to compare against.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add lingzhi227/agent-research-skills --skill algorithm-design -a claude-code
```

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

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add lingzhi227/agent-research-skills --skill algorithm-design -a codex
```

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

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add lingzhi227/agent-research-skills --skill algorithm-design -a cursor
```

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

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install lingzhi227/agent-research-skills algorithm-design
```

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

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add lingzhi227/agent-research-skills --skill algorithm-design -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/lingzhi227/agent-research-skills --path skills/algorithm-design
```

### Windsurf (Devin Desktop)

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

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add lingzhi227/agent-research-skills --skill algorithm-design -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/lingzhi227/agent-research-skills/tree/HEAD/skills/algorithm-design/SKILL.md

## When to use it
- write LaTeX pseudocode from a method description
- map system classes in a Mermaid diagram
- show component interactions in a sequence diagram
- check algorithm parameters against implementation names
- add complexity analysis to an algorithm description

## Example prompts
- Turn this method description into LaTeX pseudocode with inputs, outputs, and numbered lines.
- Create Mermaid class and sequence diagrams from this implementation.
- Check that the pseudocode and diagrams match the code modules, classes, and parameter names.

## Similar
- [frontend-design](https://affpapa.org/en/nevibecode/skills/frontend-design.md) — skill · 1025790 installs
- [grill-me](https://affpapa.org/en/nevibecode/skills/grill-me.md) — skill · 1424476 installs
- [design-taste-frontend](https://affpapa.org/en/nevibecode/skills/design-taste-frontend.md) — skill · 678700 installs
- [prototype](https://affpapa.org/en/nevibecode/skills/prototype.md) — skill · 986201 installs
- [grilling](https://affpapa.org/en/nevibecode/skills/grilling.md) — skill · 979543 installs
- [codebase-design](https://affpapa.org/en/nevibecode/skills/codebase-design.md) — skill · 850344 installs

From the same set: [lingzhi227/agent-research-skills](https://affpapa.org/en/nevibecode/by/lingzhi227/agent-research-skills.md) — 30 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
