# Build Clearer TypeScript with fp-ts

TypeScript error and null handling often becomes repetitive or unclear. This skill applies practical fp-ts patterns with readable examples and restrained functional design.

## Install

```bash
npx skillstore add sickn33/fp-ts-pragmatic
```

## Metadata

- Status: approved
- Slug: sickn33-fp-ts-pragmatic
- Skillstore revision: r2
- Version status: missing
- Tree hash: 1c901c7019ba45d8b4fa7d001917b704585da23d28bc03a163552c8b9d69052a
- Author: sickn33
- GitHub username: sickn33
- License: MIT
- Repository: https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/fp-ts-pragmatic
- Ref: 88a8e9a07f4c54ab105c1c41b6267c287146b07b
- Supported tools: Claude, Codex, Claude Code
- Audit status: complete
- Agent install advisory: allowed
- Manual install advisory: allowed
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Risk factors: external\_commands, network
- Quality score: 77
- Quality tier: bronze
- Public page: https://skillstore.pages.dev/skills/sickn33-fp-ts-pragmatic
- Manifest: https://skillstore.pages.dev/api/skills/sickn33-fp-ts-pragmatic/manifest

## Capabilities

- Explains pipe, Option, Either, map, and flatMap with practical TypeScript examples.
- Refactors nullable values, thrown errors, nested callbacks, and promise workflows into explicit functional patterns.
- Compares imperative and fp-ts approaches to identify the clearer implementation.
- Demonstrates typed error models, validation flows, and asynchronous failure handling.
- Provides quick-reference guidance for common fp-ts operations and use cases.

## Use Cases

- Learn Practical fp-ts: Understand core fp-ts types through direct explanations and focused TypeScript examples.
- Refactor Error Handling: Replace exceptions, null checks, and nested callbacks with explicit, typed workflows.
- Review Functional Design: Compare implementation options and keep functional patterns readable for the whole team.

## Prompt Templates

### Explain a Core Type

```
Explain how fp-ts Option handles nullable values, then show when native optional chaining is clearer.
```

### Refactor a Function

```
Refactor this TypeScript function with Either, preserve its behavior, and explain each transformation in direct language: [function].
```

### Design an Async Workflow

```
Model this asynchronous TypeScript workflow with TaskEither, typed failures, and readable pipe steps: [workflow requirements].
```

### Evaluate an fp-ts Architecture

```
Review this fp-ts design for readability, error types, unnecessary abstraction, and team maintainability: [design or code].
```

## Limitations

- Covers practical fp-ts fundamentals, not category theory or advanced functional programming.
- Examples require adaptation to project types, fp-ts versions, and local conventions.
- Does not execute code, install dependencies, or validate runtime behavior.
- Does not replace tests, performance measurements, or team review.

## Best Practices

- Introduce one fp-ts pattern at a time and preserve existing behavior.
- Use explicit domain error types for expected failures.
- Prefer the simplest approach that remains readable to the team.

## Anti Patterns

- Do not replace short optional chains with long Option pipelines.
- Do not hide simple transformations behind dense helper composition.
- Do not adopt fp-ts without tests for success and failure paths.

## Security Audit

- Audited at: 2026-07-23T22:30:58.801\+00:00
- Summary: All 81 static findings are false positives caused by Markdown backticks, TypeScript template literals, illustrative same-origin fetch calls, metadata, and ordinary validation methods. The skill contains documentation only, with no executable scripts, command invocation, external data transfer, reconnaissance behavior, or prompt injection.

## Stats

- Views: 106
- Downloads: 9
- Favorites: 0
- Popularity score: 0
