[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71H8GV6ARD7CWSFWYTQH8SF":3,"skill-same:01M71H8GV6ARD7CWSFWYTQH8SF":53},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":28,"linkOnly":29,"markdownContent":30,"markdownBody":31,"frontMatter":32,"refName":33,"commitSha":34,"skillDirectory":35,"forksCount":13,"repositoryHtmlUrl":36,"repositoryHomepageUrl":6,"ownerHtmlUrl":37,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":38,"install":39,"resources":52},"01M71H8GV6ARD7CWSFWYTQH8SF","04-observability",null,"Effect-TS 4 observability — structured logging, spans, tracing, annotations, and metrics","lambda-solver\u002Flambdabench-pro","lambda-solver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F279071046?v=4","01M71H55W2WK3PM6RRAY9JZWAJ","01M71H55WRT9XAFDAVACTCC2XP",0,"MIT","https:\u002F\u002Fgithub.com\u002Flambda-solver\u002Flambdabench-pro\u002Fblob\u002Fmain\u002Freference\u002Fghui\u002F.opencode\u002Fskills\u002Feffect-ts\u002Fpatterns\u002F04-observability\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27],"observability","04 observability","effect","opencode","structured logging","tracing","annotations","logging","structured","metrics","2026-11-10 10:12:30",false,"---\nname: 04-observability\ndescription: Effect-TS 4 observability — structured logging, spans, tracing, annotations, and metrics\nlicense: MIT\ncompatibility: opencode\n---\n\n# Observability\n\n## Structured logging\n\n```typescript\nyield * Effect.log(\"info message\");\nyield * Effect.logInfo(\"user:\", id);\nyield * Effect.logWarning(\"slow query:\", sql);\nyield * Effect.logError(\"fetch failed:\", url);\nyield * Effect.logDebug(\"cache hit:\", key);\nyield * Effect.logTrace(\"verbose detail:\", payload);\n```\n\n## Spans — tracing\n\n`Effect.fn(\"name\")` automatically creates a span from the name argument.\nThis is the preferred way — no manual `withSpan` needed.\n\n```typescript\n\u002F\u002F ✅ span created automatically from name\nexport const processItem = Effect.fn(\"processItem\")(function* (id: string) {\n  return yield* doWork(id);\n});\n\n\u002F\u002F Manual span — for one-off wrapping\nprogram.pipe(Effect.withSpan(\"myOperation\"));\n\n\u002F\u002F Span with attributes\nprogram.pipe(\n  Effect.withSpan(\"myOperation\", {\n    attributes: { userId: id, requestId },\n  }),\n);\n```\n\n## Annotating the current span\n\n```typescript\nyield * Effect.annotateCurrentSpan({ userId: id, requestId });\n```\n\n## Log annotations — attach context to all logs in scope\n\n```typescript\n\u002F\u002F Attach to any effect\nprogram.pipe(\n  Effect.annotateLogs({ component: \"auth\", requestId }),\n)\n\n\u002F\u002F As extra arg in Effect.fn — applies to all logs in the function\nexport const login = Effect.fn(\"login\")(\n  function* (input: LoginInput) { ... },\n  Effect.annotateLogs({ method: \"login\" }),\n)\n```\n\n## Effect.fn extra-arg pattern — span + annotations together\n\n```typescript\nexport const runEval = Effect.fn(\"runEval\")(\n  function* (taskId: string) {\n    yield* Effect.log(\"running eval\");\n    return yield* evaluate(taskId);\n  },\n  Effect.withSpan(\"runEval\"),\n  Effect.annotateLogs({ component: \"evaluator\" }),\n);\n```\n\n## Metrics\n\n```typescript\nimport { Metric } from \"effect\";\n\nconst requestCount = Metric.counter(\"http.requests\");\nconst latency = Metric.histogram(\"http.latency.ms\", {\n  boundaries: Metric.linearBoundaries({ start: 0, width: 50, count: 20 }),\n});\n\nyield * Metric.increment(requestCount);\nyield * Metric.record(latency, elapsedMs);\n```\n\n## DevTools (browser \u002F development)\n\n```typescript\nimport { DevTools } from \"effect\u002Funstable\u002Fdevtools\";\n\nconst runtime = Atom.runtime(\n  FetchHttpClient.layer.pipe(\n    Layer.provideMerge(import.meta.env.VITE_ENABLE_DEVTOOLS === \"true\" ? DevTools.layer() : Layer.empty),\n  ),\n);\n```\n","# Observability\n\n## Structured logging\n\n```typescript\nyield * Effect.log(\"info message\");\nyield * Effect.logInfo(\"user:\", id);\nyield * Effect.logWarning(\"slow query:\", sql);\nyield * Effect.logError(\"fetch failed:\", url);\nyield * Effect.logDebug(\"cache hit:\", key);\nyield * Effect.logTrace(\"verbose detail:\", payload);\n```\n\n## Spans — tracing\n\n`Effect.fn(\"name\")` automatically creates a span from the name argument.\nThis is the preferred way — no manual `withSpan` needed.\n\n```typescript\n\u002F\u002F ✅ span created automatically from name\nexport const processItem = Effect.fn(\"processItem\")(function* (id: string) {\n  return yield* doWork(id);\n});\n\n\u002F\u002F Manual span — for one-off wrapping\nprogram.pipe(Effect.withSpan(\"myOperation\"));\n\n\u002F\u002F Span with attributes\nprogram.pipe(\n  Effect.withSpan(\"myOperation\", {\n    attributes: { userId: id, requestId },\n  }),\n);\n```\n\n## Annotating the current span\n\n```typescript\nyield * Effect.annotateCurrentSpan({ userId: id, requestId });\n```\n\n## Log annotations — attach context to all logs in scope\n\n```typescript\n\u002F\u002F Attach to any effect\nprogram.pipe(\n  Effect.annotateLogs({ component: \"auth\", requestId }),\n)\n\n\u002F\u002F As extra arg in Effect.fn — applies to all logs in the function\nexport const login = Effect.fn(\"login\")(\n  function* (input: LoginInput) { ... },\n  Effect.annotateLogs({ method: \"login\" }),\n)\n```\n\n## Effect.fn extra-arg pattern — span + annotations together\n\n```typescript\nexport const runEval = Effect.fn(\"runEval\")(\n  function* (taskId: string) {\n    yield* Effect.log(\"running eval\");\n    return yield* evaluate(taskId);\n  },\n  Effect.withSpan(\"runEval\"),\n  Effect.annotateLogs({ component: \"evaluator\" }),\n);\n```\n\n## Metrics\n\n```typescript\nimport { Metric } from \"effect\";\n\nconst requestCount = Metric.counter(\"http.requests\");\nconst latency = Metric.histogram(\"http.latency.ms\", {\n  boundaries: Metric.linearBoundaries({ start: 0, width: 50, count: 20 }),\n});\n\nyield * Metric.increment(requestCount);\nyield * Metric.record(latency, elapsedMs);\n```\n\n## DevTools (browser \u002F development)\n\n```typescript\nimport { DevTools } from \"effect\u002Funstable\u002Fdevtools\";\n\nconst runtime = Atom.runtime(\n  FetchHttpClient.layer.pipe(\n    Layer.provideMerge(import.meta.env.VITE_ENABLE_DEVTOOLS === \"true\" ? DevTools.layer() : Layer.empty),\n  ),\n);\n```\n",{"name":5,"license":14,"description":7,"compatibility":21},"main","816c073aaf171300af3605b06f7ec5aa7370ef0b","reference\u002Fghui\u002F.opencode\u002Fskills\u002Feffect-ts\u002Fpatterns\u002F04-observability","https:\u002F\u002Fgithub.com\u002Flambda-solver\u002Flambdabench-pro","https:\u002F\u002Fgithub.com\u002Flambda-solver","2026-05-31 17:08:46",{"source":8,"skillName":5,"commands":40,"prompt":50,"zipAvailable":51},[41,44,47],{"tool":42,"command":43},"npx","npx skills add lambda-solver\u002Flambdabench-pro --skill 04-observability",{"tool":45,"command":46},"bunx","bunx skills add lambda-solver\u002Flambdabench-pro --skill 04-observability",{"tool":48,"command":49},"pnpm","pnpm dlx skills add lambda-solver\u002Flambdabench-pro --skill 04-observability","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flambda-solver\u002Flambdabench-pro\u002Fblob\u002Fmain\u002Freference\u002Fghui\u002F.opencode\u002Fskills\u002Feffect-ts\u002Fpatterns\u002F04-observability\u002FSKILL.md",true,[],[54,85,107,126,147,165],{"skillNo":55,"name":56,"nameZh":6,"description":57,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":58,"categories":59,"keywords":65,"publishedAt":28},"01M71H9FNA5D6Y4ANXD18Z1Z3X","tmux-workflow","Development workflow with tmux — run dev servers, Storybook, and background processes in persistent sessions with live logs, while keeping OpenCode free for chat","https:\u002F\u002Fgithub.com\u002Flambda-solver\u002Flambdabench-pro\u002Fblob\u002Fmain\u002Freference\u002Fghui\u002F.opencode\u002Fskills\u002Ftmux\u002FSKILL.md",[60],{"categoryNo":61,"categoryName":62,"taxonomyType":63,"taxonomyTypeDesc":64},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[66,67,68,69,70,71,72,73,74,75,76,21,77,78,79,80,81,82,83,84],"tmux","workflow","tmux workflow","chat","dev servers","background","processes","storybook","live","servers","run","with","logs","development workflow","free","dev","sessions","for","development",{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":94,"publishedAt":28},"01M71H9DQJDAJVZX37NDN99D3P","04-anti-patterns","React anti-patterns to avoid — manual JSX repetition, useEffect misuse, reference instability, prop drilling, conditional hooks, and common performance traps","https:\u002F\u002Fgithub.com\u002Flambda-solver\u002Flambdabench-pro\u002Fblob\u002Fmain\u002Freference\u002Fghui\u002F.opencode\u002Fskills\u002Freact\u002Fpatterns\u002F04-anti-patterns\u002FSKILL.md",[91],{"categoryNo":92,"categoryName":93,"taxonomyType":63,"taxonomyTypeDesc":64},"01JBSEEDCAT000000000000009","前端开发",[95,96,97,98,99,100,101,102,103,104,105,21,106],"patterns","anti patterns","04 anti patterns","common","jsx","reference","conditional","hooks","manual","performance","anti-patterns","react",{"skillNo":108,"name":109,"nameZh":6,"description":110,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":111,"categories":112,"keywords":114,"publishedAt":28},"01M71H9BXF511W2R3B73S5P9ZN","03-state-management","React state management patterns — lifting state, colocation, URL state, server state with TanStack Query, local state with useState\u002FuseReducer","https:\u002F\u002Fgithub.com\u002Flambda-solver\u002Flambdabench-pro\u002Fblob\u002Fmain\u002Freference\u002Fghui\u002F.opencode\u002Fskills\u002Freact\u002Fpatterns\u002F03-state-management\u002FSKILL.md",[113],{"categoryNo":92,"categoryName":93,"taxonomyType":63,"taxonomyTypeDesc":64},[115,116,117,118,106,119,95,120,121,122,123,21,124,77,125],"management","state management","state","03 state management","query","URL","tanstack","react state management","local","server","tanstack query",{"skillNo":127,"name":128,"nameZh":6,"description":129,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":130,"categories":131,"keywords":133,"publishedAt":28},"01M71H9AAGVWMYQ4NG82QPYCTE","02-component-composition","React component composition patterns — render props, compound components, list rendering with map, slot patterns, and layout primitives","https:\u002F\u002Fgithub.com\u002Flambda-solver\u002Flambdabench-pro\u002Fblob\u002Fmain\u002Freference\u002Fghui\u002F.opencode\u002Fskills\u002Freact\u002Fpatterns\u002F02-component-composition\u002FSKILL.md",[132],{"categoryNo":92,"categoryName":93,"taxonomyType":63,"taxonomyTypeDesc":64},[134,135,136,21,77,137,138,106,139,95,140,141,142,143,144,145,146],"02 component composition","component","Composition","compound","components","primitives","composition patterns","list","map","rendering","render","react component","layout",{"skillNo":148,"name":149,"nameZh":6,"description":150,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":151,"categories":152,"keywords":154,"publishedAt":28},"01M71H98RDXRQZDR496SRD906M","01-fp-style","React functional programming style — pure components, hooks conventions, Effect Atom integration, and Tailwind patterns","https:\u002F\u002Fgithub.com\u002Flambda-solver\u002Flambdabench-pro\u002Fblob\u002Fmain\u002Freference\u002Fghui\u002F.opencode\u002Fskills\u002Freact\u002Fpatterns\u002F01-fp-style\u002FSKILL.md",[153],{"categoryNo":92,"categoryName":93,"taxonomyType":63,"taxonomyTypeDesc":64},[155,156,157,95,158,159,21,160,106,161,138,102,162,163,164,20],"01 fp style","style","atom","conventions","integration","functional","programming","Tailwind","tailwind patterns","functional programming",{"skillNo":166,"name":167,"nameZh":6,"description":168,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":169,"categories":170,"keywords":172,"publishedAt":28},"01M71H95PYGAWBS5C8KN0C4WGT","react-animation","React animation with react\u002Fmotion (Framer Motion) — declarative animations, gestures, layout animations, and performance best practices","https:\u002F\u002Fgithub.com\u002Flambda-solver\u002Flambdabench-pro\u002Fblob\u002Fmain\u002Freference\u002Fghui\u002F.opencode\u002Fskills\u002Freact\u002Fanimation\u002FSKILL.md",[171],{"categoryNo":92,"categoryName":93,"taxonomyType":63,"taxonomyTypeDesc":64},[106,173,174,104,175,21,146,176,177,77,178,179,180,181],"react animation","Animation","framer motion","motion","best practices","framer","gestures","animations","declarative"]