using-fpdart

using-fpdart is a skill for Claude Code, Codex from Poorgramer-Zack/dart-expert-skills. It costs 46 tokens per session (738 once invoked), scanned A, original, MIT.

A guide to functional error handling in Dart, where success and failure are represented as values that can be combined through a workflow.

In plain words
What is it for?
Use it with Option for missing values, Either for success or failure, and TaskEither for composing API requests and other asynchronous operations.
Why use it?
It reduces scattered try-catch blocks and makes missing values, errors, and asynchronous operations explicit in the code.

Skill for Claude CodeCodex

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

Good fit Use it with Option for missing values, Either for success or failure, and TaskEither for composing API requests and other asynchronous operations.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/poorgramer-zack/dart-expert-skills/fpdart
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 Poorgramer-Zack/dart-expert-skills --skill fpdart
Clone the repo
git clone --depth 1 https://github.com/Poorgramer-Zack/dart-expert-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 using-fpdart

README.md
[![agentmods](https://agentmods.dev/badge/skills/poorgramer-zack/dart-expert-skills/fpdart/github.svg)](https://agentmods.dev/skills/poorgramer-zack/dart-expert-skills/fpdart)
Your own site
<a href="https://agentmods.dev/skills/poorgramer-zack/dart-expert-skills/fpdart"><img src="https://agentmods.dev/badge/skills/poorgramer-zack/dart-expert-skills/fpdart/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 using-fpdart

Your own site · 80×15
<a href="https://agentmods.dev/skills/poorgramer-zack/dart-expert-skills/fpdart"><img src="https://agentmods.dev/badge/skills/poorgramer-zack/dart-expert-skills/fpdart.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 46 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 738 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.00046 $0.00738
Opus 5 $0.00023 $0.00369
Sonnet 5 $0.00009 $0.00148
Haiku 4.5 $0.00005 $0.00074

Measured 11d ago against content hash 3321c42694ce, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

using-fpdart 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 11d 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.

skills/fpdart/SKILL.md · 71 lines

How it starts

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

Functional Programming with fpdart

Goal

Implement robust, type-safe, and predictable business logic using functional programming principles. Replace side-effect-prone imperative code with pure functions and composable monads (Option, Either, Task), ensuring that error handling and null-safety are enforced at the type level rather than through runtime exceptions.

Process

Phase 1: Basic Data Containment

Use primitives to handle common edge cases without branching logic:

  • Option<T>: Replaces T?. Use Option.of(val) or Option.none(). Access via match or getOrElse.
  • Either<L, R>: Replaces try-catch. L (Left) is for errors, R (Right) is for success.
  • Unit: Replaces void to allow functional composition.

Phase 2: Execution & Async Flow

Manage side effects and asynchronous operations through wrappers that defer execution:

  • IO<T>: Synchronous wrapper for pure/safe side effects.
  • Task<T>: Asynchronous wrapper for Future that never fails.
  • TaskEither<L, R>: The standard for API requests. Composes Future and Either into a single monadic flow.

Phase 3: Advanced Linear Chaining

Utilize the Do Notation to flatten nested flatMap calls into readable, imperative-style blocks while preserving monadic safety:

return TaskEither.Do(($) async {
  final user = await $(repository.getUser(id));
  final profile = await $(api.getProfile(user.code));
  return profile.toDomain();
});

⚡ Quick Reference

Error Handling (Either)

Either<String, int> checkValue(int v) => 
  v > 10 ? Either.of(v) : Either.left('Too small');

final result = checkValue(5).match(
  (error) => 'Failure: $error',
  (value) => 'Success: $value',
);

Async Operations (TaskEither)

TaskEither<Exception, User> fetchUser(String id) =>
  TaskEither.tryCatch(
    () => api.getUser(id),
    (error, stack) => Exception('Fetch failed: $error'),
  );

Collections Extension

fpdart extends Iterable with safer methods:

  • list.head -> Option<T> (Safe first)
  • list.all((e) => ...) -> bool

Read the full file on GitHub · 71 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. 11d ago First seen · 71 lines · 46 tokens per session scan A 3321c42694ce

Subscribe to this mod's changes

using-fpdart is a skill published in the GitHub repository Poorgramer-Zack/dart-expert-skills (7 stars, last pushed 1mo ago), licensed MIT. It adds 46 tokens to every session and 738 once invoked, about $0.0002 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.