/software-design-plugin:design-pseudocode a routine to design (free text), or a stub file|diff; omit for current changefrom software-design-plugin
Designs complex routines via stepwise pseudocode refinement before coding, then promotes pseudocode to comments. Based on Code Complete's Pseudocode Programming Process.
Ships in software-design-plugin. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
From Code Complete (McConnell), the Pseudocode Programming Process: before writing a non-trivial routine, design it in pseudocode — intent-level English statements, one per step — refining top-down until each line is obvious to translate into code. You catch the hard cases, the wrong decomposition, and the missing error path while editing prose, which is an order of magnitude cheaper than catching them while editing code. The finished pseudocode then becomes the routine's comments, so the design survives as documentation.
This is a pre-implementation design technique: it decides a routine's internal structure, names its steps, and surfaces its edge cases before a single line of real code is committed.
| Use this skill when... | Use something else instead when... |
|---|---|
| Designing a complex routine or non-trivial algorithm before coding | Verifying whole-project premises before a wave → agent-patterns-plugin:verify-before-plan |
| The decomposition isn't obvious and you want to fail cheap in prose | Choosing a structural design pattern → software-design-plugin:design-patterns |
| Naming steps + edge cases up front, then keeping them as comments | A multi-file refactor plan → workflow-orchestration-plugin:workflow-checkpoint-refactor |
| Reviewing whether a stub's intended logic is sound before it's built | Reviewing already-written code → code-quality-plugin:code-review |
| Step | What you do | What it buys |
|---|---|---|
| 1. Intent | State the routine's contract: inputs, output, one-line job | A clear target before mechanism |
| 2. Refine | Decompose into intent-level steps; refine each until trivial | The decomposition is judged in prose |
| 3. Check edges | Walk error paths, empty/boundary inputs, failure modes | Missing cases found before code |
| 4. Promote | Each pseudocode line becomes a comment; fill code beneath | Design survives as documentation |
Pseudocode is intent, not syntax: "find the first overdue invoice" — not
for (i=0; i<n; i++). If a line is already code-shaped, it's too low; if you
can't translate a line directly to a few statements, it's too high — refine it.
Parse $ARGUMENTS:
git diff HEAD) and design the routine it
stubs.Execute this pseudocode design pass:
One line each: what the routine takes, what it returns/guarantees, and its single
job. If it has more than one job, that's a decomposition signal — design the
pieces separately (pairs well with software-design-plugin:design-by-contract).
Write the routine as a short list of intent-level steps. Refine any step that isn't obvious-to-code into sub-steps. Stop when every line maps to a few statements. Resist writing real syntax — the value is judging the shape before committing to it.
Against the pseudocode, walk: empty/null/boundary inputs, the failure of each external call, and the postcondition under each path. Add the handling as pseudocode lines. A case you can't place is a sign the decomposition is wrong — revise the steps, not just patch the end.
Emit the refined pseudocode as the routine's comment skeleton (each line a comment, code to be filled beneath). Report: the contract, the step decomposition, the edge cases surfaced, and any decomposition smell (a step doing two jobs, a missing error path) found during refinement.
| Mistake | Correct approach |
|---|---|
| Writing real code and calling it pseudocode | Intent-level English; if it's syntax, raise the altitude |
| Pseudocode so vague a step hides a whole algorithm | If a line won't translate to a few statements, refine it |
| Skipping the edge-case walk | Step 3 is where pseudocode pays for itself |
| Throwing the pseudocode away after coding | Promote it to comments — the design becomes the docs |
| Altitude check | Verdict |
|---|---|
Line reads as for/if/while (...) | Too low — that's code |
| Line maps to 1-5 statements of intent | Just right |
| Line hides a whole sub-algorithm | Too high — refine it |
| A step does two distinct jobs | Decompose into separate routines |
software-design-plugin:design-by-contract — Step 1's contract is the
precondition/postcondition pair, made explicitsoftware-design-plugin:design-patterns — when refinement reveals recurring
variation, a pattern may be the right step structurecode-quality-plugin:code-review — reviews the code after; this designs it
beforeagent-patterns-plugin:verify-before-plan — the project-scale sibling:
verify premises before a multi-agent plan, as this refines a routine before codeWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
pseudocode, stepwise-refinement, code-design, algorithm-design
npx claudepluginhub laurigates/claude-plugins --plugin software-design-plugin6 skills in this plugin
/design-by-contractDesign with explicit contracts — preconditions, postconditions, invariants, guard clauses. Use when designing a function/class, hardening a boundary, or adding assertions./design-deep-modulesJudge interface depth — deep modules hide complexity behind small interfaces. Use when designing a module/API, reviewing a class boundary, or reducing complexity./design-diy-vs-dependencyEvaluate a transparent DIY reimplementation before depending on a heavy single-purpose tool — GUI wrapper, bundled runtime, unaudited or non-cross-platform binary. Use when a task is about to install such a tool, or when auditing an existing dependency for removal./design-legacy-seamsGet legacy code under test before changing it — find seams, write characterization tests. Use when changing untested code, breaking dependencies, or taming legacy./design-patternsSelect a design pattern from a symptom — strategy, observer, factory, adapter, decorator. Use when a structure resists change, or choosing between Gang-of-Four patterns.Other plugins' skills for the same job