nw-fp-principles

nw-fp-principles is a skill for Claude Code from nWave-ai/nWave. It costs 21 tokens per session (2,236 once invoked), scanned A, original, MIT.

A language-independent guide to functional programming: a way of writing software around data transformations and explicit state changes. It explains functions that transform, select, or combine collections and how types support clearer models.

In plain words
What is it for?
Use it when designing functions, processing collections, modelling state changes, or learning the basic ideas behind functional programming.
Why use it?
It helps make code’s intent easier to see and reduces hidden state and unclear loops. The patterns can make complex data processing easier to reason about.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: agent in frontmatter.

Good fit Use it when designing functions, processing collections, modelling state changes, or learning the basic ideas behind functional programming.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/nwave-ai/nwave/nw-fp-principles
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add nWave-ai/nWave --skill nw-fp-principles
Clone the repo
git clone --depth 1 https://github.com/nWave-ai/nWave

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for nw-fp-principles

README.md
[![agentmods](https://agentmods.dev/badge/skills/nwave-ai/nwave/nw-fp-principles/github.svg)](https://agentmods.dev/skills/nwave-ai/nwave/nw-fp-principles)
Your own site
<a href="https://agentmods.dev/skills/nwave-ai/nwave/nw-fp-principles"><img src="https://agentmods.dev/badge/skills/nwave-ai/nwave/nw-fp-principles/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for nw-fp-principles

Your own site · 80×15
<a href="https://agentmods.dev/skills/nwave-ai/nwave/nw-fp-principles"><img src="https://agentmods.dev/badge/skills/nwave-ai/nwave/nw-fp-principles.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 21 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,236 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00021 $0.02236
Opus 5.5 $0.00008 $0.00894
Sonnet 5.5 $0.00004 $0.00447
Haiku 4.5 $0.00002 $0.00224

Measured 4d ago against content hash 66d64990023f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

nw-fp-principles scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

nWave/skills/nw-fp-principles/SKILL.md · 233 lines

How it starts

The opening of the file, as written. The whole thing — 233 lines — stays where its author put it; the contents beside it link to each section on GitHub.

FP Principles

Core functional programming thinking patterns. Language-agnostic.

Cross-references: fp-domain-modeling | code-craftsmanship: FP Hexagonal Architecture | fp-algebra-driven-design


1. Higher-Order Functions as Problem Decomposition

[STARTER]

Three operations replace most loops:

Operation Purpose Replaces
Map Transform each element, preserve structure Loop building new collection
Filter Keep elements matching condition Loop with conditional
Fold Accumulate elements into single result Loop with running total

When to use Map: Transform every element without changing collection shape. Nested maps handle nested structures. When to use Filter: Select elements without changing their values. When to use Fold: Reduce collection to single value. Accumulator IS your state. Combining function IS your state transition. Folds make state machines explicit.

Dependent streams: Fold over the evolving descriptive state, not the initial state for every item. Approve then archive an invoice uses the post-approval invoice; snapshots project only the final register. Law: prepare(s, xs ++ ys) = prepare(prepare(s, xs), ys) on admitted transitions. When refusal forbids construction activity, load nw-certainty-by-construction for its readiness boundary before execution. Basis: Sandy Maguire, Algebra-Driven Design, Designing Algebras → Scavenger Hunt → A Unified Observation; Thinking with Types, Indexed Monads → Definition and Necessary Machinery.

Decision: "Am I transforming, selecting, or accumulating?" Pick matching operation. If none fit, compose two.

Why: These operations communicate intent. Map says "same shape, different values." Fold says "many inputs, one output." Loops say nothing about intent until you read every line.


2. Type-Driven Design

Read the full file on GitHub · 233 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago Changed · +25 lines 66d64990023f
  2. 2mo ago First seen · 208 lines · 21 tokens per session scan A f590e3bfa75b

Subscribe to this mod's changes

nw-fp-principles is a skill published in the GitHub repository nWave-ai/nWave (631 stars, last pushed yesterday), licensed MIT. It adds 21 tokens to every session and 2,236 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

nw-fp-principles compared with skills from other repositories

nw-fp-principles next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
nw-fp-principlesnWave-ai/nWaveSkill631yesterdayMITA21Claude Code
founder-coachalirezarezvani/claude-skillsSkill29kyesterdayMITA41Claude Code
story-developmenta5c-ai/babysitterSkill1.9k5d agoMITA0Claude Code, Codex
foundations-consumer-neurosciencevasilyu1983/AI-Agents-publicSkill10121d agoMITA48Claude Code, Codex
rudderRudderCode/RudderSkill2425d agoApache-2.0A101Claude Code, Codex
test-first-executorstrikersam/autonomous-ai-agencySkill11yesterdayMITA29Claude Code, Codex
ai-safe2-development-methodCyberStrategyInstitute/ai-safe2-frameworkSkill1563d agononeA92Codex