[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M718NY887FWJR0D5HNET586J":3,"skill-same:01M718NY887FWJR0D5HNET586J":66},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":46,"commitSha":47,"skillDirectory":48,"forksCount":14,"repositoryHtmlUrl":49,"repositoryHomepageUrl":6,"ownerHtmlUrl":50,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":51,"install":52,"resources":65},"01M718NY887FWJR0D5HNET586J","fp-either-ref",null,"Quick reference for Either type. Use when user needs error handling, validation, or operations that can fail with typed errors.","sapsapshen\u002Fai-memory-router","sapsapshen","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F20347959?v=4","01M6XDQEF1DP50DKF37H81J3J5","shenmian","01M6XDQEJPE41Y3DT2763X8ZJN",0,"MIT","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fglobal\u002Ffp-either-ref\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"fp either ref","either","validation","operations","with","type","error handling","can","unknown","when","quick-reference","error-handling","use","errors","for","quick reference","quick","community","fp-ts","error","2026-11-10 10:12:30",false,"---\nname: fp-either-ref\ndescription: Quick reference for Either type. Use when user needs error handling, validation, or operations that can fail with typed errors.\nrisk: unknown\nsource: community\nversion: 1.0.0\ntags: [fp-ts, either, error-handling, validation, quick-reference]\n---\n\n# Either Quick Reference\n\nEither = success or failure. `Right(value)` or `Left(error)`.\n\n## When to Use\n\n- You need a quick fp-ts reference for typed synchronous error handling.\n- The task involves validation, fallible operations, or converting throwing code to `Either`.\n- You want a compact cheat sheet rather than a long tutorial.\n\n## Create\n\n```typescript\nimport * as E from 'fp-ts\u002FEither'\n\nE.right(value)           \u002F\u002F Success\nE.left(error)            \u002F\u002F Failure\nE.fromNullable(err)(x)   \u002F\u002F null → Left(err), else Right(x)\nE.tryCatch(fn, toError)  \u002F\u002F try\u002Fcatch → Either\n```\n\n## Transform\n\n```typescript\nE.map(fn)                \u002F\u002F Transform Right value\nE.mapLeft(fn)            \u002F\u002F Transform Left error\nE.flatMap(fn)            \u002F\u002F Chain (fn returns Either)\nE.filterOrElse(pred, toErr) \u002F\u002F Right → Left if pred fails\n```\n\n## Extract\n\n```typescript\nE.getOrElse(err => default)  \u002F\u002F Get Right or default\nE.match(onLeft, onRight)     \u002F\u002F Pattern match\nE.toUnion(either)            \u002F\u002F E | A (loses type info)\n```\n\n## Common Patterns\n\n```typescript\nimport { pipe } from 'fp-ts\u002Ffunction'\nimport * as E from 'fp-ts\u002FEither'\n\n\u002F\u002F Validation\nconst validateEmail = (s: string): E.Either\u003Cstring, string> =>\n  s.includes('@') ? E.right(s) : E.left('Invalid email')\n\n\u002F\u002F Chain validations (stops at first error)\npipe(\n  E.right({ email: 'test@example.com', age: 25 }),\n  E.flatMap(d => pipe(validateEmail(d.email), E.map(() => d))),\n  E.flatMap(d => d.age >= 18 ? E.right(d) : E.left('Must be 18+'))\n)\n\n\u002F\u002F Convert throwing code\nconst parseJson = (s: string) => E.tryCatch(\n  () => JSON.parse(s),\n  (e) => `Parse error: ${e}`\n)\n```\n\n## vs try\u002Fcatch\n\n```typescript\n\u002F\u002F ❌ try\u002Fcatch - errors not in types\ntry {\n  const data = JSON.parse(input)\n  process(data)\n} catch (e) {\n  handleError(e)\n}\n\n\u002F\u002F ✅ Either - errors explicit in types\npipe(\n  E.tryCatch(() => JSON.parse(input), String),\n  E.map(process),\n  E.match(handleError, identity)\n)\n```\n\nUse Either when **error type matters** and you want to chain operations.\n","# Either Quick Reference\n\nEither = success or failure. `Right(value)` or `Left(error)`.\n\n## When to Use\n\n- You need a quick fp-ts reference for typed synchronous error handling.\n- The task involves validation, fallible operations, or converting throwing code to `Either`.\n- You want a compact cheat sheet rather than a long tutorial.\n\n## Create\n\n```typescript\nimport * as E from 'fp-ts\u002FEither'\n\nE.right(value)           \u002F\u002F Success\nE.left(error)            \u002F\u002F Failure\nE.fromNullable(err)(x)   \u002F\u002F null → Left(err), else Right(x)\nE.tryCatch(fn, toError)  \u002F\u002F try\u002Fcatch → Either\n```\n\n## Transform\n\n```typescript\nE.map(fn)                \u002F\u002F Transform Right value\nE.mapLeft(fn)            \u002F\u002F Transform Left error\nE.flatMap(fn)            \u002F\u002F Chain (fn returns Either)\nE.filterOrElse(pred, toErr) \u002F\u002F Right → Left if pred fails\n```\n\n## Extract\n\n```typescript\nE.getOrElse(err => default)  \u002F\u002F Get Right or default\nE.match(onLeft, onRight)     \u002F\u002F Pattern match\nE.toUnion(either)            \u002F\u002F E | A (loses type info)\n```\n\n## Common Patterns\n\n```typescript\nimport { pipe } from 'fp-ts\u002Ffunction'\nimport * as E from 'fp-ts\u002FEither'\n\n\u002F\u002F Validation\nconst validateEmail = (s: string): E.Either\u003Cstring, string> =>\n  s.includes('@') ? E.right(s) : E.left('Invalid email')\n\n\u002F\u002F Chain validations (stops at first error)\npipe(\n  E.right({ email: 'test@example.com', age: 25 }),\n  E.flatMap(d => pipe(validateEmail(d.email), E.map(() => d))),\n  E.flatMap(d => d.age >= 18 ? E.right(d) : E.left('Must be 18+'))\n)\n\n\u002F\u002F Convert throwing code\nconst parseJson = (s: string) => E.tryCatch(\n  () => JSON.parse(s),\n  (e) => `Parse error: ${e}`\n)\n```\n\n## vs try\u002Fcatch\n\n```typescript\n\u002F\u002F ❌ try\u002Fcatch - errors not in types\ntry {\n  const data = JSON.parse(input)\n  process(data)\n} catch (e) {\n  handleError(e)\n}\n\n\u002F\u002F ✅ Either - errors explicit in types\npipe(\n  E.tryCatch(() => JSON.parse(input), String),\n  E.map(process),\n  E.match(handleError, identity)\n)\n```\n\nUse Either when **error type matters** and you want to chain operations.\n",{"name":5,"risk":27,"tags":44,"source":36,"version":45,"description":7},[37,20,30,21,29],"1.0.0","main","7a38d8e7073e61c16eda85681cb32fb68a8657a5","skills-store\u002Fglobal\u002Ffp-either-ref","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router","https:\u002F\u002Fgithub.com\u002Fsapsapshen","2026-04-14 21:12:12",{"source":8,"skillName":5,"commands":53,"prompt":63,"zipAvailable":64},[54,57,60],{"tool":55,"command":56},"npx","npx skills add sapsapshen\u002Fai-memory-router --skill fp-either-ref",{"tool":58,"command":59},"bunx","bunx skills add sapsapshen\u002Fai-memory-router --skill fp-either-ref",{"tool":61,"command":62},"pnpm","pnpm dlx skills add sapsapshen\u002Fai-memory-router --skill fp-either-ref","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fglobal\u002Ffp-either-ref\u002FSKILL.md",true,[],[67,90,115,125,138,157],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":78,"publishedAt":39},"01M71ATQRKG48SH06FQ697T5G9","wechat-search","Search WeChat Official Account articles using OpenClaw's web search and fetch capabilities with compliance-focused design.","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fopenclaw\u002Fwechat-search-release\u002FSKILL.md",[73],{"categoryNo":74,"categoryName":75,"taxonomyType":76,"taxonomyTypeDesc":77},"01JBSEEDCAT000000000000037","律师与法务","PROFESSION","适用职业",[79,80,81,82,83,84,85,86,87,88,89,23],"wechat search","wechat","search","capabilities","openclaw","design","web search","compliance","web","official","fetch",{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":39},"01M71ATNAVGZB35PFYM2GC5N00","trend-tap","Real-time trending topics aggregator across 7 platforms (X\u002FTwitter, Reddit, Google Trends, Hacker News, Zhihu, Bilibili, Weibo). Trigger: when user says 'trend', 'trends', 'trend tap', '热点', '热搜', or asks what is trending\u002Fhot. Do NOT use web_search — this skill already fetches live data from all platforms with zero API keys.","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fopenclaw\u002Ftrend-tap\u002FSKILL.md",[],[97,98,99,100,101,102,81,103,104,105,106,28,107,108,109,110,111,112,113,114],"trend","trend tap","tap","api keys","Bash","time","trending","hacker","aggregator","do","brew","live","data","google","install","read","across","api",{"skillNo":116,"name":117,"nameZh":6,"description":118,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":119,"categories":120,"keywords":121,"publishedAt":39},"01M71ATJ9AM5KM15AA8PS302EB","trend-radar","Real-time trending topics aggregator across 7 platforms (X\u002FTwitter, Reddit, Google Trends, Hacker News, Zhihu, Bilibili, Weibo). Trigger: when user says 'trend', 'trends', 'trend pulse', '热点', '热搜', or asks what is trending\u002Fhot. Do NOT use web_search — this skill already fetches live data from all platforms with zero API keys.","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fopenclaw\u002Ftrend-radar\u002FSKILL.md",[],[122,123,97,107,108,109,110,101,81,112,124,113,114,28,105,104,103,111,102,100],"trend radar","radar","pulse",{"skillNo":126,"name":127,"nameZh":6,"description":128,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":129,"categories":130,"keywords":131,"publishedAt":39},"01M71ATGF095N3EJM9G8SD0BB5","tech-news-daily","每日科技新闻汇——从全球多个 RSS 源抓取最新科技新闻，翻译（英→中）、去重、排版成每日简报。当用户询问科技新闻、科技新鲜事、每日科技、技术动态、Daily Tech News 或类似表达时触发此技能。","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fopenclaw\u002Ftech-news-daily\u002FSKILL.md",[],[132,133,134,135,136,137],"news","tech","tech news daily","daily","rss","翻译",{"skillNo":139,"name":140,"nameZh":6,"description":141,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":142,"categories":143,"keywords":149,"publishedAt":39},"01M71ATFAEAMQ17M70NQNY7SR8","summarize","Summarize URLs or files with the summarize CLI (web, PDFs, images, audio, YouTube).","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fopenclaw\u002Fsummarize\u002FSKILL.md",[144],{"categoryNo":145,"categoryName":146,"taxonomyType":147,"taxonomyTypeDesc":148},"01JBSEEDCAT000000000000021","资料检索与研究","SCENARIO","使用场景",[140,87,150,151,152,23,107,153,154,155,99,156,111],"Audio","cli","youtube","images","https","files","pdfs",{"skillNo":158,"name":159,"nameZh":6,"description":160,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":161,"categories":162,"keywords":163,"publishedAt":39},"01M71ATDNS3R0M4H936PACQAWZ","sonoscli","Control Sonos speakers (discover\u002Fstatus\u002Fplay\u002Fvolume\u002Fgroup).","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fopenclaw\u002Fsonoscli\u002FSKILL.md",[],[159,164,165,166,111,167,154,168,169,170,171,172],"status","play","go","latest","github","discover","control","cmd","volume"]