{"id":"e070ff4a-b785-4cff-83d1-db043c230639","shortId":"hqmjNa","kind":"skill","title":"fp-taskeither-ref","tagline":"Quick reference for TaskEither. Use when user needs async error handling, API calls, or Promise-based operations that can fail.","description":"# TaskEither Quick Reference\n\nTaskEither = async operation that can fail. Like `Promise<Either<E, A>>`.\n\n## When to Use\n- You need a quick fp-ts reference for async operations that can fail.\n- The task involves API calls, Promise wrapping, or composing asynchronous error-handling pipelines.\n- You want a concise cheat sheet for `TaskEither` operators and patterns.\n\n## Create\n\n```typescript\nimport * as TE from 'fp-ts/TaskEither'\n\nTE.right(value)          // Async success\nTE.left(error)           // Async failure\nTE.tryCatch(asyncFn, toError)  // Promise → TaskEither\nTE.fromEither(either)    // Either → TaskEither\n```\n\n## Transform\n\n```typescript\nTE.map(fn)               // Transform success value\nTE.mapLeft(fn)           // Transform error\nTE.flatMap(fn)           // Chain (fn returns TaskEither)\nTE.orElse(fn)            // Recover from error\n```\n\n## Execute\n\n```typescript\n// TaskEither is lazy - must call () to run\nconst result = await myTaskEither()  // Either<E, A>\n\n// Or pattern match\nawait pipe(\n  myTaskEither,\n  TE.match(\n    (err) => console.error(err),\n    (val) => console.log(val)\n  )\n)()\n```\n\n## Common Patterns\n\n```typescript\nimport { pipe } from 'fp-ts/function'\nimport * as TE from 'fp-ts/TaskEither'\n\n// Wrap fetch\nconst fetchUser = (id: string) => TE.tryCatch(\n  () => fetch(`/api/users/${id}`).then(r => r.json()),\n  (e) => ({ type: 'NETWORK_ERROR', message: String(e) })\n)\n\n// Chain async calls\npipe(\n  fetchUser('123'),\n  TE.flatMap(user => fetchPosts(user.id)),\n  TE.map(posts => posts.length)\n)\n\n// Parallel calls\nimport { sequenceT } from 'fp-ts/Apply'\nsequenceT(TE.ApplyPar)(\n  fetchUser('1'),\n  fetchPosts('1'),\n  fetchComments('1')\n)\n\n// With recovery\npipe(\n  fetchUser('123'),\n  TE.orElse(() => TE.right(defaultUser)),\n  TE.getOrElse(() => defaultUser)\n)\n```\n\n## vs async/await\n\n```typescript\n// ❌ async/await - errors hidden\nasync function getUser(id: string) {\n  try {\n    const res = await fetch(`/api/users/${id}`)\n    return await res.json()\n  } catch (e) {\n    return null  // Error info lost\n  }\n}\n\n// ✅ TaskEither - errors typed and composable\nconst getUser = (id: string) => pipe(\n  TE.tryCatch(() => fetch(`/api/users/${id}`), toNetworkError),\n  TE.flatMap(res => TE.tryCatch(() => res.json(), toParseError))\n)\n```\n\nUse TaskEither when you need **typed errors** for async operations.\n\n## Limitations\n- Use this skill only when the task clearly matches the scope described above.\n- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.\n- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.","tags":["taskeither","ref","antigravity","awesome","skills","sickn33","agent-skills","agentic-skills","ai-agent-skills","ai-agents","ai-coding","ai-workflows"],"capabilities":["skill","source-sickn33","skill-fp-taskeither-ref","topic-agent-skills","topic-agentic-skills","topic-ai-agent-skills","topic-ai-agents","topic-ai-coding","topic-ai-workflows","topic-antigravity","topic-antigravity-skills","topic-claude-code","topic-claude-code-skills","topic-codex-cli","topic-codex-skills"],"categories":["antigravity-awesome-skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/sickn33/antigravity-awesome-skills/fp-taskeither-ref","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add sickn33/antigravity-awesome-skills","source_repo":"https://github.com/sickn33/antigravity-awesome-skills","install_from":"skills.sh"}},"qualityScore":"0.700","qualityRationale":"deterministic score 0.70 from registry signals: · indexed on github topic:agent-skills · 34793 github stars · SKILL.md body (2,652 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-04-24T00:50:58.570Z","embedding":null,"createdAt":"2026-04-18T21:37:30.466Z","updatedAt":"2026-04-24T00:50:58.570Z","lastSeenAt":"2026-04-24T00:50:58.570Z","tsv":"'/api/users':186,254,278 '/apply':219 '/function':169 '/taskeither':91,177 '1':223,225,227 '123':203,232 'api':16,60 'ask':329 'async':13,30,52,94,98,199,244,294 'async/await':239,241 'asyncfn':101 'asynchron':66 'await':142,150,252,257 'base':21 'boundari':337 'call':17,61,137,200,212 'catch':259 'chain':122,198 'cheat':75 'clarif':331 'clear':304 'common':160 'compos':65,270 'concis':74 'console.error':155 'console.log':158 'const':140,180,250,271 'creat':82 'criteria':340 'defaultus':235,237 'describ':308 'e':38,145,191,197,260 'either':37,106,107,144 'environ':320 'environment-specif':319 'err':154,156 'error':14,68,97,119,130,194,242,263,267,292 'error-handl':67 'execut':131 'expert':325 'fail':25,34,56 'failur':99 'fetch':179,185,253,277 'fetchcom':226 'fetchpost':206,224 'fetchus':181,202,222,231 'fn':112,117,121,123,127 'fp':2,48,89,167,175,217 'fp-taskeither-ref':1 'fp-ts':47,88,166,174,216 'function':245 'getus':246,272 'handl':15,69 'hidden':243 'id':182,187,247,255,273,279 'import':84,163,170,213 'info':264 'input':334 'involv':59 'lazi':135 'like':35 'limit':296 'lost':265 'match':149,305 'messag':195 'miss':342 'must':136 'mytaskeith':143,152 'need':12,44,290 'network':193 'null':262 'oper':22,31,53,79,295 'output':314 'parallel':211 'pattern':81,148,161 'permiss':335 'pipe':151,164,201,230,275 'pipelin':70 'post':209 'posts.length':210 'promis':20,36,62,103 'promise-bas':19 'quick':5,27,46 'r':189 'r.json':190 'recov':128 'recoveri':229 'ref':4 'refer':6,28,50 'requir':333 'res':251,282 'res.json':258,284 'result':141 'return':124,256,261 'review':326 'run':139 'safeti':336 'scope':307 'sequencet':214,220 'sheet':76 'skill':299 'skill-fp-taskeither-ref' 'source-sickn33' 'specif':321 'stop':327 'string':183,196,248,274 'substitut':317 'success':95,114,339 'task':58,303 'taskeith':3,8,26,29,78,104,108,125,133,266,287 'te':86,172 'te.applypar':221 'te.flatmap':120,204,281 'te.fromeither':105 'te.getorelse':236 'te.left':96 'te.map':111,208 'te.mapleft':116 'te.match':153 'te.orelse':126,233 'te.right':92,234 'te.trycatch':100,184,276,283 'test':323 'toerror':102 'tonetworkerror':280 'toparseerror':285 'topic-agent-skills' 'topic-agentic-skills' 'topic-ai-agent-skills' 'topic-ai-agents' 'topic-ai-coding' 'topic-ai-workflows' 'topic-antigravity' 'topic-antigravity-skills' 'topic-claude-code' 'topic-claude-code-skills' 'topic-codex-cli' 'topic-codex-skills' 'transform':109,113,118 'treat':312 'tri':249 'ts':49,90,168,176,218 'type':192,268,291 'typescript':83,110,132,162,240 'use':9,42,286,297 'user':11,205 'user.id':207 'val':157,159 'valid':322 'valu':93,115 'vs':238 'want':72 'wrap':63,178","prices":[{"id":"df73adef-7d15-4df4-a94c-ea1e867f3fbe","listingId":"e070ff4a-b785-4cff-83d1-db043c230639","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"sickn33","category":"antigravity-awesome-skills","install_from":"skills.sh"},"createdAt":"2026-04-18T21:37:30.466Z"}],"sources":[{"listingId":"e070ff4a-b785-4cff-83d1-db043c230639","source":"github","sourceId":"sickn33/antigravity-awesome-skills/fp-taskeither-ref","sourceUrl":"https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/fp-taskeither-ref","isPrimary":false,"firstSeenAt":"2026-04-18T21:37:30.466Z","lastSeenAt":"2026-04-24T00:50:58.570Z"}],"details":{"listingId":"e070ff4a-b785-4cff-83d1-db043c230639","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"sickn33","slug":"fp-taskeither-ref","github":{"repo":"sickn33/antigravity-awesome-skills","stars":34793,"topics":["agent-skills","agentic-skills","ai-agent-skills","ai-agents","ai-coding","ai-workflows","antigravity","antigravity-skills","claude-code","claude-code-skills","codex-cli","codex-skills","cursor","cursor-skills","developer-tools","gemini-cli","gemini-skills","kiro","mcp","skill-library"],"license":"mit","html_url":"https://github.com/sickn33/antigravity-awesome-skills","pushed_at":"2026-04-24T00:28:59Z","description":"Installable GitHub library of 1,400+ agentic skills for Claude Code, Cursor, Codex CLI, Gemini CLI, Antigravity, and more. Includes installer CLI, bundles, workflows, and official/community skill collections.","skill_md_sha":"d0900ecd728f50bc8c3bee6a567fd7a1af000b4f","skill_md_path":"skills/fp-taskeither-ref/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/fp-taskeither-ref"},"layout":"multi","source":"github","category":"antigravity-awesome-skills","frontmatter":{"name":"fp-taskeither-ref","description":"Quick reference for TaskEither. Use when user needs async error handling, API calls, or Promise-based operations that can fail."},"skills_sh_url":"https://skills.sh/sickn33/antigravity-awesome-skills/fp-taskeither-ref"},"updatedAt":"2026-04-24T00:50:58.570Z"}}