本文へスキップ
Skillpedia
一般的なプログラミング48k · #4649

fp-ts-errors

できること

このツールは、プログラムのエラーを整理された方法で扱う方法を教えます。エラーを捨てるのではなく、コンピューターが理解して追跡できる情報として扱います。

使う場面

  • ✓プログラムのコードで、エラーを安全かつ予測可能な形で処理したいとき。
  • ✓コードが分かりにくくなりがちな`try/catch`の使用を避けたいとき。
  • ✓発生しうるエラーの種類を明確に特定する必要があるシステムを作るとき。

スキルのリンク

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/fp-ts-errors/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/fp-ts-errors/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“この方法を使って、コードがエラーを安全に処理するようにするにはどうすればよいですか?”

毎週5つの新しいスキル。1分で読めます。

仕組み

エラーが発生したときにプログラムが「停止」するのではなく、エラーをデータとして返します。これによりプログラムは問題の内容を正確に把握し、制御された方法で対処できます。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

Practical Error Handling with fp-ts

This skill teaches you how to handle errors without try/catch spaghetti. No academic jargon - just practical patterns for real problems.

Detailed Guide

Read the detailed guide before executing this skill. It retains the complete procedure and reference material. Treat its safety, prerequisites, and validation requirements as mandatory. For focused work, load the relevant sections; for end-to-end work, read the guide completely.

When to Use This Skill

  • When you want type-safe error handling in TypeScript
  • When replacing try/catch with Either and TaskEither patterns
  • When building APIs or services that need explicit error types
  • When accumulating multiple validation errors

The core idea: Errors are just data. Instead of throwing them into the void and hoping someone catches them, return them as values that TypeScript can track.


Limitations

  • Use this skill only when the task clearly matches the scope described above.
  • Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
  • Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
よくある質問

「Either」と「TaskEither」とは何ですか?

成功した結果とエラーの両方を、分かりやすく安全な形で返せるようにコードを整理する方法です。

なぜ`try/catch`を避けるのですか?

`try/catch`はエラーが多い場合にコードが読みにくく、理解しづらくなることがあるためです。この方法はより整理された代替手段を提供します。

「エラーはデータである(Errors are data)」とはどういう意味ですか?

エラーを、単なる予想外の中断ではなく、プログラムが利用して追跡できる情報として扱うという意味です。

詳細

作者による元の説明

Handle errors as values using fp-ts Either and TaskEither for cleaner, more predictable TypeScript code. Use when implementing error handling patterns with fp-ts.

repo: sickn33/agentic-awesome-skills

人気

GitHubのスター
48k
ランキング
#4649
ライセンス
MIT
更新日
2026/10/15

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル