/nlsmdn:review-functional [--staged | --unpushed | --changed | --all]from nlsmdn
Review code against pragmatic functional principles — effects pushed to the edges, no hidden shared state, no mutation of a caller's data, deterministic functions, declarative transforms. Deliberately non-dogmatic: currying, point-free style, recursion and monads are out of scope and are never findings. Triggers "review functional", "functional review", "check for side effects", "is this pure", "too much mutable state", "check global state".
Ships in nlsmdn. 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.
Language-agnostic review for the functional-programming lessons that pay off in ordinary imperative languages: testable logic, contained effects, and state you can reason about locally.
This skill is explicitly not a push toward functional style: currying, point-free code, recursion and monads are out of scope and are never findings. What it does check is whether a reader can predict what a function does from its signature and its inputs, and whether the code states what it produces rather than how it accumulated it.
Use only these finding priorities, in descending order:
Grade the demonstrated consequence, realistic reachability, and available recovery against project priorities. A category, missing convention, hypothetical future problem, or confidence that a claim is true does not set its priority. Do not assign automatic severity floors or ceilings. Keep unverified claims in validation gaps, outside the graded finding count; distinguish suggestions from defects. For plans, trace the consequence if implemented and state the assumptions.
Use the short labels Must Fix, Should Fix, and Nice to Have in summaries and ledgers.
Keep effort, verification status, user-facing change size, and tool/vendor diagnostic ratings
separate. When called by code-review, return its requested evidence and impact fields; the parent
owns scoring and final triage. Otherwise apply this rubric directly. Omit empty priority sections.
/review-functional # Review context-related code
/review-functional --staged # Review staged changes
/review-functional --unpushed # Review files changed across all unpushed commits
/review-functional --changed # Review unstaged changes
/review-functional --all # Full codebase audit (parallel agents)
| Flag | Scope | Method |
|---|---|---|
| (none) | Context-related code | Files from the current conversation context: any files the user has discussed, opened, or that you have read/edited in this session. If no conversation context exists, ask the user to specify files or use --staged/--changed/--all. |
--staged | Staged changes | git diff --cached --name-only |
--unpushed | Files changed across unpushed commits | git diff --name-only $(git rev-list HEAD --not --remotes | tail -1)^..HEAD |
--changed | Unstaged changes | git diff --name-only |
--all | Full codebase | Glob source files, parallel agents |
--unpushed derives its range from git rev-list HEAD --not --remotes (oldest unpushed commit's parent → HEAD). If nothing is unpushed, or there is no remote/upstream (or the range walks back to the root commit) so it can't be determined reliably, stop and ask the user to pick another scope.
main, CLI command or migration whose whole job is I/O is doing its job. Only flag an effect when it is buried inside something that reads as a calculation.Determine scope based on flags (see Scope table above)
Read CLAUDE.md / AGENTS.md in the repository root for project conventions that override the defaults here
Review each file against all 5 categories in the Checklist below
Parallelize if scope has >5 files: spawn one sub-agent per category, each scanning all files for that category. Merge results and deduplicate.
Dispatch workers that return findings without editing files. Disable delegation tools where supported; read-only access alone does not prevent delegation. Any coordinating role needs explicit subtasks, a descendant limit, and a stopping condition in its brief.
Drop every finding that appears in Out of Scope below before classifying. Do this as an explicit pass, not as a background judgement.
Classify severity using Review grading; justify the impact with evidence.
Report findings grouped by severity using the Output Format below
Are decisions separable from the effects that carry them out?
calculate, format, validate, resolve, is*, should*) that also logs, writes, enqueues, or fires a requestDoes the function's result depend on anything it wasn't given?
Does a caller's data change under them?
push/sort/splice, dict assignment, object field writes on an argumentSame input, same output?
now(), random(), uuid(), getenv, locale or timezone read inside decision logic rather than passed inIs the code saying what it means?
for loop that maps, filters, sums, flattens, or checks any/all, where the language has map/filter/sum/any/all or a comprehension — the direct form names the result, the loop makes the reader derive it from an accumulator and a body. Flag the small ones too; this is the default, not a last resortreview-correctness in a coordinated review.These are never findings, no matter how the code is written. Do not report them, do not mention them as "worth considering", and do not use them as a tiebreaker on severity.
| Not a finding | Why |
|---|---|
A for loop that needs an early exit or break, one whose rewrite would run to four or more chained stages, or a reduce building a dict/object | These rewrites are regressions. Every other loop that is really a transformation is fair game — see category 5. |
| Absence of currying, partial application, point-free style, compose/pipe | Out of scope entirely. |
| Iteration instead of recursion | Recursion is the wrong default in any language without tail calls. Never suggest it. |
No Option/Either/Result/monad where the language has exceptions or error returns | Use the language's own idiom. |
| No FP utility library (lodash/fp, Ramda, funcy, …) | Never propose adding one. |
| Mutable locals inside a function | Idiomatic everywhere. |
| In-place mutation of a large structure in a measured hot path | Performance is a real constraint. |
| Classes, methods or inheritance as such | This is not an OO review. Use /review-cleancode for that. |
| Existing imperative code that works and wasn't touched by this change | Report only what the scoped diff introduces or makes worse. |
## Functional Review: {scope}
### Critical Issues (Must Fix)
- {file}:{line} - {category}: {description}
**Impact:** {the call ordering or sequence that produces the bug}
**Fix:** {solution with code example}
### Improvements (Should Fix)
- {file}:{line} - {category}: {description}
**Fix:** {solution}
### Suggestions (Nice to Have)
- {file} - {category}: {description}
If nothing survives the Out of Scope pass, say so plainly and stop. An empty result is a normal outcome for code that was already written this way.
A handler with the decision buried in it:
/review-functional --staged
Finds an updateSubscription handler that loads the account, computes the proration against datetime.now(), writes the new row, and sends the email — all in one function. Reports as Should Fix: the proration rule cannot be tested without a database and a frozen clock. Fix extracts compute_proration(account, plan, at) taking the timestamp as a parameter, leaving the handler to fetch, call, and persist.
Caller's list mutated:
/review-functional --changed
Finds normalize_tags(tags) calling tags.sort() before returning a new list. The caller's list is reordered as a side effect nobody declared. Reports Should Fix if callers depend on the original ordering, citing that caller, with the fix sorted(tags). Without a demonstrated behavioral or maintenance cost, treat the API surprise as Nice to Have.
Nothing to report:
/review-functional --staged
The diff adds two pure helpers and a thin handler that calls them. Reports no findings rather than manufacturing one.
map rewrite reads worse than the loopSolution: Check it against the three exclusions before reporting: an early exit, a chain of four or more stages, or a reduce building a dict/object. If it hits none of those, the rewrite stands — a two-stage filter/map chain is a normal finding, not an over-reach. Write the replacement out in the finding so the comparison is on the page rather than asserted.
Solution: Check whether the file is the shell — a route handler module, a CLI entry point, a migration, a job runner. Those are supposed to be impure. Point the review at the modules they call instead, and report at most one finding saying the logic hasn't been separated out.
Solution: Frameworks that own object lifecycle (ORM models with dirty tracking, Vue/MobX reactive stores, Android/SwiftUI view state) mutate by design. Working against the framework is worse than the mutation. Note the convention and move on.
--all, use parallel agents per category (5 agents)What SKILL.md sets; muted values are Claude Code's defaults
highnpx claudepluginhub nielsmadan/skills --plugin nlsmdnOther plugins' skills for the same job
65 skills in this plugin
/blind-spotsSurface consequential decisions a plan, design, or research brief left silently assumed, by interviewing the user in dependency order. Use when the user says "blind spots", "grill me", "stress-test this plan", "poke holes in this", "what am I missing", "interrogate this design", "what haven't I decided", or needs a loose idea or research brief clarified before work begins. Do NOT use for a clear factual lookup, to explain a previous reply in more detail (use `huh`), to generate ideas when it is unclear what to build (use `ideation`), or to review an already-written plan with agents (use `review-plan`)./brainstormWork out how to solve a problem the user can already name — interview them with `blind-spots` to understand it, generate structurally different approaches, validate each with an independent critic, then present the survivors with trade-offs and a recommendation. Use when the user says "brainstorm", "brainstorm approaches", "how should we solve/approach/tackle X", "what are our options", "compare approaches", "think this through with me", or wants solutions weighed before committing. Works on any topic, with codebase recon when a repo is involved; `--debate` adds external advisors for high-stakes calls. Do NOT use when stuck on what to build or what the problem is (use `ideation`), to probe an already-chosen plan (use `blind-spots`), or to pick a library or service (use `evaluate-tech`).