functional-light-js

functional-light-js is a skill for Claude Code, Codex from pktikkani/agent-skills. It costs 61 tokens per session (779 once invoked), scanned A, original, MIT.

Guidelines for writing and reviewing JavaScript and TypeScript functions using ideas from Kyle Simpson’s Functional-Light JavaScript. They focus on readable functions, predictable behavior, and clear handling of side effects.

In plain words
What is it for?
Use them when creating or refactoring JavaScript or TypeScript functions, designing function-based APIs, or reviewing code for unnecessary mutation and complexity.
Why use it?
They give developers practical ways to make functions easier to understand, test, reuse, and debug without requiring strict functional programming.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use them when creating or refactoring JavaScript or TypeScript functions, designing function-based APIs, or reviewing code for unnecessary mutation and complexity.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/pktikkani/agent-skills/functional-light-js
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 pktikkani/agent-skills --skill functional-light-js
Clone the repo
git clone --depth 1 https://github.com/pktikkani/agent-skills

Made for: Claude Code, Codex.

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 functional-light-js

README.md
[![agentmods](https://agentmods.dev/badge/skills/pktikkani/agent-skills/functional-light-js/github.svg)](https://agentmods.dev/skills/pktikkani/agent-skills/functional-light-js)
Your own site
<a href="https://agentmods.dev/skills/pktikkani/agent-skills/functional-light-js"><img src="https://agentmods.dev/badge/skills/pktikkani/agent-skills/functional-light-js/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 functional-light-js

Your own site · 80×15
<a href="https://agentmods.dev/skills/pktikkani/agent-skills/functional-light-js"><img src="https://agentmods.dev/badge/skills/pktikkani/agent-skills/functional-light-js.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 61 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 779 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.
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.00061 $0.00779
Opus 5 $0.00030 $0.00390
Sonnet 5 $0.00012 $0.00156
Haiku 4.5 $0.00006 $0.00078

Measured 8d ago against content hash 62b01b257899, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

functional-light-js 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 8d 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.

claude/skills/functional-light-js/SKILL.md · 65 lines

How it starts

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

Functional-Light JS (Kyle Simpson)

Core stance: FP for readability, not purity dogma. A technique earns its place only if the next reader trusts the code more because of it.

Function craft

  • Functions are values. Assign them, pass them, return them; design APIs that accept and return functions rather than flags and modes.
  • Name every function. Named function expressions over anonymous arrows for anything non-trivial — names document intent and appear in stack traces. An arrow is fine only when the whole body is self-evident.
  • Keep arity low. Prefer unary/binary. Three+ related args → single options object. Specialize with partial application / currying instead of adding parameters.
  • Pure by default. Same input → same output, no observed side effects. Push side effects to the edges (matches the pure-core/IO-shell rule); where a side effect is unavoidable, make it obvious, not buried.
  • Immutability as discipline: return new values instead of mutating arguments; treat received data as read-only even when the language won't enforce it.
  • Composition over orchestration. Build behavior from small composed functions (pipe/compose); each piece independently nameable and testable.
  • Closure over this. Capture state with closures; use this only for genuine method polymorphism, and never implicitly rebind it.

Readability guardrails (the "-light" part)

  • Declarative map/filter/reduce when it reads clearer — but a plain loop beats a clever reduce. Never stack transformations the reader must mentally unroll.
  • Point-free style only when it removes noise; if the reader must reconstruct the missing argument, write it out.
  • Don't import a heavy FP library for two helpers; write the small utility and name it well.
  • Understand coercion and use it deliberately (== where types are known and intended) rather than cargo-culting === everywhere — but in shared codebases, follow the house style.

Read the full file on GitHub · 65 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. 8d ago First seen · 65 lines · 61 tokens per session scan A 62b01b257899

Subscribe to this mod's changes

functional-light-js is a skill published in the GitHub repository pktikkani/agent-skills (2 stars, last pushed yesterday), licensed MIT. It adds 61 tokens to every session and 779 once invoked, about $0.0003 per session on Opus 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-08-31.

Related

Other skills, from other repositories

no-bare-casts

Writing as in TypeScript or TSX production code, modifying a file that contains a bare as cast, silencing a type error with a cast, encountering as unknown as, or reviewing a cast site.

prisma/orm · 52 tokens

coding-standards

Universal coding standards, best practices, and patterns for TypeScript, JavaScript, React, and Node.js development.

hashgraph-online/awesome-codex-plugins · 28 tokens

plankton-code-quality

Write-time code quality enforcement using Plankton — auto-formatting, linting, and Claude-powered fixes on every file edit via hooks.

loulanyue/awesome-claude-notes · 34 tokens

typescript-style-guide

Apply, review, and explain the opinionated conventions in the TypeScript Style Guide. Use automatically only when TypeScript conventions are part of the requested task, including type modelling, discriminated unions, function APIs, variables and state, naming, source organization, React props, component APIs, state…

mkosir/typescript-style-guide · 79 tokens

architecture-audit

Systematic architecture audit and refactoring methodology for Rust + TypeScript codebases. Use when performing refactoring, cleanup, unification, code review, dead code removal, module reorganization, or tech debt elimination. Ensures no naming confusion, semantic overloading, hidden defaults, duplicate logic, or…

org2AI/ORG2 · 70 tokens

stale-comments-audit

Audit and fix JavaScript, TypeScript, and Go comments that are verified as stale, orphaned, misleading, or redundant.

PaulRBerg/agent-skills · 32 tokens