algorithm-design
FreeNo executable scriptsNot checkedDesign algorithms with LaTeX pseudocode and UML diagrams. Generate algorithmic environments, Mermaid class/sequence diagrams, and ensure consistency between…
by lingzhi227★ 486 GitHub starsAbout this skill
Algorithm Design
Formalize methods into algorithm pseudocode and system architecture diagrams.
Input
$0— Method description or implementation to formalize
References
- Algorithm and diagram templates:
~/.claude/skills/algorithm-design/references/algorithm-templates.md
Workflow
Step 1: Formalize the Algorithm
- Define clear inputs and outputs
- Identify the main loop / recursive structure
- Specify all parameters and their types
- Write step-by-step pseudocode
Step 2: Generate LaTeX Pseudocode
Use algorithm + algpseudocode environments:
\begin{algorithm}[t]
\caption{Method Name}
\label{alg:method}
\begin{algorithmic}[1]
\Require Input $x$, parameters $\theta$
\Ensure Output $y$
\State Initialize ...
\For{$t = 1$ to $T$}
\State $z_t \gets f(x_t; \theta)$
\If{convergence criterion met}
\State \textbf{break}
\EndIf
\EndFor
\State \Return $y$
\end{algorithmic}
\end{algorithm}
Step 3: Generate UML Diagrams (Mermaid)
Class Diagram
classDiagram
class Model {
+forward(x: Tensor) Tensor
+train_step(batch) float
}
Sequence Diagram
sequenceDiagram
participant M as Main
participant D as DataLoader
M->>D: load_data()
D-->>M: batches
Step 4: Verify Consistency
- Every pseudocode step must map to a code module
- Every class in the UML must exist in the implementation
- Parameter names must match between pseudocode and code
Rules
- Use standard algorithmic notation (not code syntax)
- Number lines for easy reference
- Include complexity analysis as a comment or proposition
- Use
\Require/\Ensurefor inputs/outputs - Keep pseudocode at the right abstraction level — not too detailed, not too vague
Related Skills
- Upstream: atomic-decomposition, math-reasoning
- Downstream: experiment-code, paper-writing-section
- See also: symbolic-equation
Install algorithm-design in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
Bundled files
FAQ
What does the algorithm-design skill do?
Design algorithms with LaTeX pseudocode and UML diagrams. Generate algorithmic environments, Mermaid class/sequence diagrams, and ensure consistency between pseudocode and implementation. Use when formalizing methods for a paper.
How do I install the algorithm-design skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the algorithm-design skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
frontend-design
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
by Anthropicwebapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
by Anthropicbrand-guidelines
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
by Anthropicweb-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…
by Anthropic