Typescript Advanced Types
rolling-scopes/rsschool-app
Master TypeScript's advanced type system including generics, conditional types, mapped types, template literals, and utility types for building type-safe applications.
A skill your agent uses when working in projects that use fp-pack; follow pipe, SideEffect, and curry guidelines.
$ npx skills add superlucky84/fp-pack --skill fp-pack -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install superlucky84/fp-pack fp-pack --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/superlucky84/fp-pack.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/fp-pack .claude/skills/fp-pack && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "fp-pack" agent skill from https://github.com/superlucky84/fp-pack/tree/main/skills/fp-pack into .claude/skills/fp-pack/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "fp-pack", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/superlucky84/fp-pack/tree/main/skills/fp-packType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add superlucky84/fp-pack --skill fp-pack -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install superlucky84/fp-pack fp-pack --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/superlucky84/fp-pack.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/fp-pack .agents/skills/fp-pack && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "fp-pack" agent skill from https://github.com/superlucky84/fp-pack/tree/main/skills/fp-pack into .agents/skills/fp-pack/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "fp-pack", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add superlucky84/fp-pack --skill fp-pack -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install superlucky84/fp-pack fp-pack --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/superlucky84/fp-pack.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/fp-pack .cursor/skills/fp-pack && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "fp-pack" agent skill from https://github.com/superlucky84/fp-pack/tree/main/skills/fp-pack into .cursor/skills/fp-pack/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "fp-pack", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/superlucky84/fp-pack.git --path skills/fp-pack--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add superlucky84/fp-pack --skill fp-pack -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install superlucky84/fp-pack fp-pack --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/superlucky84/fp-pack.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/fp-pack .gemini/skills/fp-pack && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "fp-pack" agent skill from https://github.com/superlucky84/fp-pack/tree/main/skills/fp-pack into .gemini/skills/fp-pack/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "fp-pack", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install superlucky84/fp-pack fp-packInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add superlucky84/fp-pack --skill fp-pack -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/superlucky84/fp-pack.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/fp-pack .github/skills/fp-pack && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "fp-pack" agent skill from https://github.com/superlucky84/fp-pack/tree/main/skills/fp-pack into .github/skills/fp-pack/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "fp-pack", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add superlucky84/fp-pack --skill fp-pack -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install superlucky84/fp-pack fp-pack --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/superlucky84/fp-pack.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/fp-pack .opencode/skills/fp-pack && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "fp-pack" agent skill from https://github.com/superlucky84/fp-pack/tree/main/skills/fp-pack into .opencode/skills/fp-pack/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "fp-pack", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
fp-packA skill your agent uses when working in projects that use fp-pack; follow pipe, SideEffect, and curry guidelines.
Fp Pack is an agent skill from superlucky84/fp-pack. Use when working in projects that use fp-pack; follow pipe, SideEffect, and curry guidelines.
Its SKILL.md is about 3.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 10 other files (for example `constraints/common-mistakes.md`, `constraints/core-rules.md` and `constraints/troubleshooting.md`).
It sits in Development, covering Type safety. It works with TypeScript. The repository describes itself as: A functional toolkit focused on type-safe pipelines, not FP dogma, for JavaScript and TypeScript. The licence is MIT.
Read from SKILL.md and the folder at commit b9a92e0. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Fp Pack loads about 3.4k tokens when it runs. Until then it costs about 25 tokens; SKILL.md has 1,157 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from superlucky84/fp-pack at commit b9a92e0, republished under its MIT licence (© superlucky84). 1,157 words, ~3,374 tokens.
.claude/skills/fp-pack/SKILL.md (or your agent's skills folder). This skill also uses 7 other files; get the full folder from GitHub.Document Version: {{version}}
Additional materials (optional):
These guidelines apply only when fp-pack is installed in the current project.
Before following this document:
package.json for fp-pack in dependencies/devDependenciesnode_modules/fp-pack existsfp-pack or fp-pack/streamIf fp-pack is not installed, use the project's existing conventions. Do not suggest adding fp-pack unless the user asks.
pipe/pipeAsync for 2+ steps; for a single step, call the function directly.*Strict variants (pipeStrict, pipeAsyncStrict, pipeSideEffectStrict, pipeAsyncSideEffectStrict).pipe(value, ...) / pipeAsync(value, ...) runs immediately and improves inference (the input anchors types). Use functions-first only when you need a reusable pipeline.pipeWithDeps infers intermediate values and intersects dependency contracts. Default and deprecated variants have identical checks. Annotate the dependency contract where needed, not every value parameter.from().map/filter are for arrays/iterables, not single values.from() only for constants or 0-arg pipelines (including function values you need to pass as data). Otherwise pass data as the first argument.pipeSideEffect* only when you need early exit; otherwise use pipe/pipeAsync.runPipeResult/matchSideEffect inside pipelines; call at boundaries.isSideEffect for precise narrowing; runPipeResult for unwrapping (pipe results are precise; use generics only for values you widened yourself).SideEffect is an instance type: use SideEffect<E> (not typeof SideEffect).pipeHint or a tiny wrapper.fp-pack/stream for large/lazy iterables; array/object utils for small/eager data.dist/index.d.ts or dist/stream/index.d.ts.Note: For trivial one-liners, using native JS directly is fine. Reach for fp-pack when composition adds clarity or reuse. Keep pipelines short and readable.
// ❌ BAD
pipe(() => [1, 2, 3], filter((n: number) => n % 2 === 0));
// ✅ GOOD (value-first)
pipe([1, 2, 3], filter((n: number) => n % 2 === 0));
// ✅ GOOD (no-input pipeline)
pipe(from([1, 2, 3]), filter((n: number) => n % 2 === 0))();ifElse/cond need total branchesconst status = ifElse((n: number) => n > 0, from('ok'), from('fail'));
const label = cond<number, string>([
[(n) => n > 0, () => 'positive'],
[() => true, () => 'non-positive'] // default keeps it total
]);map is for arrays/iterables (not single values)const save = pipe(
(s: AppState) => JSON.stringify({ todos: s.todos, nextId: s.nextId }),
tap((json) => localStorage.setItem(STORAGE_KEY, json))
);
save(state);runPipeResult belong at the boundaryconst pipeline = pipeSideEffect(findUser, (user) => user.email);
const result = runPipeResult(pipeline(input)); // outside the pipelineDOM APIs are imperative by nature—keep them outside or at the boundary (use tap for final effects).
map, filter, reduce) on non-arrays?cond ([() => true, () => ...])?SideEffect from a pipe pipeline? (Use pipeSideEffect*.)runPipeResult inside a pipeline? (Move it to the boundary.)pipe instead of pipeAsync?pipeHint or a tiny wrapper.)from() for constants only, not normal input?tap.)dist/index.d.ts / dist/stream/index.d.ts for the expected signature.If the error persists, reduce the pipeline to the smallest failing step and add types there first.
import { pipe, filter, map, take, sortBy } from 'fp-pack';
const result = pipe(
users,
filter((user: User) => user.active),
sortBy((user) => -user.activityScore),
map((user) => user.name),
take(10)
);import { pipeAsyncSideEffect, SideEffect, runPipeResult } from 'fp-pack';
const result = runPipeResult(
await pipeAsyncSideEffect(
'user-123',
async (userId: string) => {
const res = await fetch(`/api/users/${userId}`);
return res.ok ? res : SideEffect.of(() => `HTTP ${res.status}`);
},
async (res) => res.json()
)
);import { pipe, filter, map } from 'fp-pack';
const result = pipe(
[1, 2, 3, 4, 5],
filter((n: number) => n % 2 === 0),
map((n) => n * 2)
);pipe (sync)import { pipe, filter, map, take } from 'fp-pack';
const result = pipe(
users,
filter((u: User) => u.active),
map((u) => u.name),
take(10)
);pipeAsync (async)import { pipeAsync } from 'fp-pack';
const user = await pipeAsync(
userId,
async (id: string) => fetch(`/api/users/${id}`),
async (res) => res.json(),
(data) => data.user
);Most multi-arg helpers are data-last and curried. Pair them with value-first pipe(value, ...) to anchor types:
map(fn), filter(pred), replace(from, to), assoc('k', v), path(['a','b'])Some data-last helpers return a generic function whose type is only determined by the final data argument. Prefer value-first pipe(value, ...) so the input anchors generics; use hints when needed.
import { pipe, pipeHint, zip, some } from 'fp-pack';
// Prefer value-first to anchor generics
const values: number[] = [1, 2, 3];
const withValueFirst = pipe(
values,
zip([1, 2, 3]),
some(([a, b]) => a > b)
);
const withPipeHint = pipe(
pipeHint<number[], Array<[number, number]>>(zip([1, 2, 3])),
some(([a, b]) => a > b)
);If you prefer, a tiny wrapper like (values) => zip([1, 2, 3], values) works too.
Utilities that may need a hint in data-last pipelines:
chunk, drop, take, zipassoc, assocPath, dissocPath, evolve, mapValues, merge, mergeDeep, omit, path, pick, proptimeoutchunk, drop, take, zipMost code should use pipe / pipeAsync. Use SideEffect-aware pipes only when you need early termination:
pipeSideEffect / pipeAsyncSideEffect: stop at the first SideEffect; the result carries the precise effect union (plain T when no step can return a SideEffect)pipeSideEffectStrict / pipeAsyncSideEffectStrict: deprecated aliases — do not useSideEffect.of(effectFn, label?)isSideEffect(value) (type guard)runPipeResult(result) (execute effect or return value; outside pipelines)import { pipeSideEffect, SideEffect, isSideEffect, runPipeResult } from 'fp-pack';
const validate = (n: number) => (n > 0 ? n : SideEffect.of(() => 'NEG' as const));
const result = pipeSideEffect(
-1,
validate,
(n) => n + 1
); // number | SideEffect<'NEG'>
if (isSideEffect(result)) {
const err = runPipeResult(result); // 'NEG'
} else {
// result is number
}pipeSideEffect/pipeAsyncSideEffect preserve precise effect unions.runPipeResult returns T | E for a pipe result and E after narrowing to SideEffect<E>; it becomes any only if you widen the input yourself to SideEffect<any>/any.isSideEffect for precise branch narrowing.fp-pack/stream)Use stream utilities when:
Iterable and AsyncIterableIf any input is async, the output is async. Use toAsync to normalize inputs when needed.
import { pipe } from 'fp-pack';
import { range, filter, map, take, toArray } from 'fp-pack/stream';
const result = pipe(
range(Infinity),
filter((n: number) => n % 2 === 0),
map((n) => n * n),
take(100),
toArray
);pipe, pipeAsyncpipeSideEffect, pipeAsyncSideEffectpipeStrict, pipeAsyncStrict, pipeSideEffectStrict, pipeAsyncSideEffectStrictfrom, tap, tap0, once, memoize, identity, constant, curry, composeSideEffect, isSideEffect, matchSideEffect, runPipeResultmap, filter, flatMap, reduce, scanfind, some, everytake, drop, chunksort, sortBy, groupBy, uniqByzip, concat, append, flattenprop, path, propOr, pathOrpick, omitassoc, assocPath, dissocPathmerge, mergeDeepmapValues, evolveifElse, when, unless, cond, guard, tryCatchretry, timeout, delaydebounce*, throttlerangemap, filter, flatMap, flattentake, drop, chunkfind, some, every, reducezip, concattoArray, toAsyncadd, sub, mul, div, clampsplit, join, replace, trimequals, isNilassert, invariantconst pipeline = pipeSideEffect(validate, process);
export const handler = (data) => {
const result = pipeline(data);
if (isSideEffect(result)) return runPipeResult(result);
return result;
};const result = pipe(
[1, 2, 3, 4, 5],
filter((n: number) => n % 2 === 0),
map((n) => n * 10)
); // [20, 40]const result = pipe(
from([1, 2, 3, 4, 5]),
filter((n: number) => n % 2 === 0),
map((n) => n * 10)
)(); // [20, 40]const toIds = pipe(
filter((u: User) => u.active),
map((u) => u.id),
toArray
);const updateAccount = pipe(
assocPath(['profile', 'role'], 'member'),
merge({ updatedAt: Date.now() })
);pipepipeAsyncpipeSideEffect / pipeAsyncSideEffect (effect unions are precise)pipe)isSideEffect for branching, runPipeResult to unwrapfp-pack/streamimport { pipe, map, filter } from 'fp-pack'import { pipeSideEffect, SideEffect } from 'fp-pack'import { pipeAsync, retry, timeout } from 'fp-pack'import { map, filter, toArray } from 'fp-pack/stream'If TypeScript inference is stuck or you need to verify a function signature:
In fp-pack project:
dist/index.d.tsdist/stream/index.d.tsIn consumer project:
node_modules/fp-pack/dist/index.d.tsnode_modules/fp-pack/dist/stream/index.d.tsDefault to value-first pipe / pipeAsync for inference, keep helpers data-last and unary, switch to stream/* when laziness matters, and reserve SideEffect-aware pipelines for true early-exit flows. Use functions-first only for reusable pipelines. Use isSideEffect for precise narrowing and call runPipeResult only at the boundary.
© superlucky84, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 7 other files in skills/fp-pack of superlucky84/fp-pack.
Open the folder on GitHubat commit b9a92e0
Fp Pack next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Fp Pack this skillsuperlucky84/fp-pack | 112 | — | ~3.4k | Automated safety check: Pass | MIT | |
| Typescript Advanced Typesrolling-scopes/rsschool-app | 10k | 25 repos | ~4.2k | Automated safety check: Pass | MPL-2.0 | |
| Wagmi Feature Developmentwevm/wagmi | 6.8k | — | ~3.8k | Automated safety check: Pass | MIT | |
| Convert Internal Package to TypeScriptTryGhost/Ghost | 55k | — | ~1.2k | Automated safety check: Pass | MIT | |
| Add NodeBridge Handlerneovateai/neovate-code | 1.6k | — | ~1k | Automated safety check: Pass | MIT | |
| AST Visitor Pattern for Unionsprisma/orm | 48k | — | ~830 | Automated safety check: Pass | Apache-2.0 |
rolling-scopes/rsschool-app
Master TypeScript's advanced type system including generics, conditional types, mapped types, template literals, and utility types for building type-safe applications.
wevm/wagmi
Walks through adding a Wagmi feature across its layers: a Viem-based core action, TanStack Query options, and React and Vue bindings.
TryGhost/Ghost
Moves a legacy internal Ghost package from JavaScript and CommonJS to TypeScript and ESM in three focused commits that keep git file history intact.
neovateai/neovate-code
Walks through adding a message handler to NodeBridge in Neovate Code, from the implementation and its types to an optional test entry and a run with Bun.
prisma/orm
Replaces a plain TypeScript union plus switch statements with frozen subclasses and a visitor interface when several places dispatch on the same variants.
zap-studio/monorepo
Create a bumpy bump file describing which packages changed and how, for version bumping and changelog generation.
Works with
Categories
A skill your agent uses when working in projects that use fp-pack; follow pipe, SideEffect, and curry guidelines. Fp Pack is an agent skill from superlucky84/fp-pack. Use when working in projects that use fp-pack; follow pipe, SideEffect, and curry guidelines.
Fp Pack fits situations like: working in projects that use fp-pack; curry guidelines.
Run `npx skills add superlucky84/fp-pack --skill fp-pack -a claude-code`. Or copy the skill folder (skills/fp-pack in superlucky84/fp-pack) into .claude/skills/fp-pack in your project. Claude Code loads it when a task matches its description.
Run `npx skills add superlucky84/fp-pack --skill fp-pack -a codex`. Or copy the skill folder (skills/fp-pack in superlucky84/fp-pack) into .agents/skills/fp-pack in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add superlucky84/fp-pack --skill fp-pack -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/fp-pack, .gemini/skills/fp-pack, .github/skills/fp-pack and .opencode/skills/fp-pack in your project.
SKILL.md names no scripts, command-line tools or credentials: Fp Pack is instructions for the agent only. Our summary lists: A credential in STORAGE_KEY.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Fp Pack is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 3.4k tokens (SKILL.md is roughly 13k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Fp Pack: Typescript Advanced Types (rolling-scopes/rsschool-app, 10k stars), Wagmi Feature Development (wevm/wagmi, 6.8k stars), Convert Internal Package to TypeScript (TryGhost/Ghost, 55k stars) and Add NodeBridge Handler (neovateai/neovate-code, 1.6k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
superlucky84 (a GitHub user) maintains it in superlucky84/fp-pack, which has 112 GitHub stars. The repository was last updated on October 2, 2026.
Source: superlucky84/fp-pack on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.