[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7F03KJRXA933XET4SY3R6RK":3,"skill-same:01M7F03KJRXA933XET4SY3R6RK":52},{"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":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":30,"commitSha":31,"skillDirectory":32,"forksCount":33,"repositoryHtmlUrl":34,"repositoryHomepageUrl":6,"ownerHtmlUrl":35,"ownerBlogUrl":6,"ownerDescription":36,"updatedAt":37,"install":38,"resources":51},"01M7F03KJRXA933XET4SY3R6RK","frontend-observability",null,"A portable, framework-agnostic field-side observability system for any React or React Native app.","lza6\u002FArmor-piercing-system-prompts","lza6","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F128880206?v=4","01M7EB3K7WPX5T28EJ2NVHE6EG","Chinese-tingfeng","01M7EB3K97E1KQ16QWKJMFNGX8",11,"MIT","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F05-技能与代理开发\u002Ffrontend-observability\u002FSKILL.md",[],[],"2026-11-16 10:05:34",false,"---\nname: frontend-observability\ndescription: \"A portable, framework-agnostic field-side observability system for any React or React Native app.\"\nrisk: critical\nsource: https:\u002F\u002Fgithub.com\u002Fstareezy-1\u002Ffrontend-architecture-skill\u002Ftree\u002Fmain\u002Fskills\u002Ffrontend-observability\nsource_repo: stareezy-1\u002Ffrontend-architecture-skill\nsource_type: community\ndate_added: 2026-07-01\nlicense: MIT\nlicense_source: https:\u002F\u002Fgithub.com\u002Fstareezy-1\u002Ffrontend-architecture-skill\u002Fblob\u002Fmain\u002FLICENSE\n---\n\n# Frontend Observability (the field side)\n## When to Use\n\nUse this skill when you need a portable, framework-agnostic field-side observability system for any React or React Native app. Establishes one typed event taxonomy (canonical event-name constants, never inline strings), a best-effort non-blocking provider fan-out so a failing or absent analytics provider can never...\n\n\n> Portable skill — readable by Claude Code, OpenCode, Codex, Cursor, Windsurf, and others.\n> This skill describes a **field-side observability system** — event taxonomy, provider fan-out,\n> real-user vitals, error reporting, consent — not a dashboard or a specific vendor. It is the\n> **field complement to the frontend-lighthouse skill**: Lighthouse is the _lab_ gate (synthetic,\n> pre-merge); this is the _field_ (what real users actually experience). It lives in a\n> `services\u002Fanalytics\u002F` module per the **frontend-architecture** skill.\n\nThe goal: you can answer \"what are real users doing, and what are they experiencing?\" — with a\n**typed event vocabulary** (no stringly-typed `track(\"clicked_thing\")` scattered everywhere), a\nfan-out that is **best-effort** (a broken provider never breaks the app), real **Core Web Vitals\nfrom the field**, and **consent** respected before anything fires.\n\n---\n\n## 0. The five core ideas\n\n1. **Events are a typed vocabulary.** Event names are canonical constants with a union type — never inline string literals. The taxonomy is reviewable in one file and the compiler rejects typos.\n2. **Fan-out is best-effort and non-blocking.** `track()` dispatches to every provider, each in its own try\u002Fcatch. A missing global, a thrown provider, an unloaded script — none can throw into the caller or stop the other providers.\n3. **One entry point, SSR-safe.** A single `track(event, props)` is the only way to record. It's reached through a context hook that no-ops outside a provider and on the server, so instrumented components render safely anywhere.\n4. **Field vitals complement lab budgets.** Real-user LCP\u002FINP\u002FCLS are reported to the same fan-out. Lighthouse proves the build _can_ be fast; field vitals prove it _is_ — together they close the loop.\n5. **Consent gates everything.** No telemetry (events, vitals, error reports with PII) fires before opt-in. Consent state is checked at the fan-out boundary, not sprinkled through call sites.\n\n---\n\n## 1. Directory layout\n\nThe system is one service module plus its constants (per frontend-architecture).\n\n```\nsrc\u002F\n├── constants\u002F\n│   └── analytics.ts           ← canonical event names + AnalyticsEvent union\n├── services\u002Fanalytics\u002F\n│   ├── index.ts               ← barrel: track, adapters, types\n│   ├── track.ts               ← the best-effort fan-out (single entry point)\n│   ├── adapters.ts            ← one (event, props) => void per provider, window-guarded\n│   ├── web-vitals.ts          ← report real-user LCP\u002FINP\u002FCLS into track()\n│   └── consent.ts             ← consent gate read by the fan-out\n├── providers\u002F\n│   └── AnalyticsProvider.tsx  ← 'use client' context exposing useAnalytics().track\n└── error\u002F\n    └── ErrorBoundary.tsx      ← reports caught render errors via the fan-out\n```\n\n---\n\n## 2. The event taxonomy (typed, never inline)\n\nOne file owns every event name. Components reference constants; the union type makes typos a compile\nerror and the catalog a single source of truth.\n\n```ts\n\u002F\u002F constants\u002Fanalytics.ts\nexport const ANALYTICS_EVENTS = {\n  PROJECT_CLICK: \"project_click\",\n  GITHUB_CLICK: \"github_click\",\n  RESUME_DOWNLOAD: \"resume_download\",\n  CONTACT_SUBMISSION: \"contact_submission\",\n} as const;\n\nexport type AnalyticsEvent =\n  (typeof ANALYTICS_EVENTS)[keyof typeof ANALYTICS_EVENTS];\n```\n\n```ts\n\u002F\u002F CORRECT — typed constant, autocompletes, can't typo\ntrack(ANALYTICS_EVENTS.GITHUB_CLICK, { url });\n\n\u002F\u002F WRONG — stringly-typed, drifts, no compile check\ntrack(\"github-click\"); \u002F\u002F ❌ silently a different event from \"github_click\"\n```\n\n**Hard rules:**\n\n- No inline event-name strings anywhere; only `ANALYTICS_EVENTS.*`.\n- Event names are snake_case and stable — renaming one breaks historical dashboards, so treat the catalog as a contract.\n- Keep `props` shapes small and PII-light (see §6); prefer ids over names, never raw emails.\n\n---\n\n## 3. Best-effort, non-blocking fan-out\n\n`track()` is the single entry point. It iterates the adapter registry, guarding **each** call so one\nprovider can't affect the caller or the others.\n\n```ts\n\u002F\u002F services\u002Fanalytics\u002Ftrack.ts\nimport type { AnalyticsEvent } from \"@\u002Fconstants\u002Fanalytics\";\nimport { analyticsAdapters } from \".\u002Fadapters\";\nimport { hasConsent } from \".\u002Fconsent\";\n\nexport function track(\n  event: AnalyticsEvent,\n  props?: Record\u003Cstring, unknown>,\n): void {\n  if (!hasConsent()) return; \u002F\u002F §6 — nothing fires before opt-in\n  for (const adapter of analyticsAdapters) {\n    try {\n      adapter(event, props);\n    } catch {\n      \u002F* best-effort: a failing\u002Fabsent provider must never throw into the\n         caller or block dispatch to the remaining providers. *\u002F\n    }\n  }\n}\n```\n\nEach adapter is a tiny `(event, props) => void` that **guards its provider global** — it no-ops on\nthe server (no `window`) and when the provider script is absent, so a missing or unloaded provider\nnever throws.\n\n```ts\n\u002F\u002F services\u002Fanalytics\u002Fadapters.ts\nexport type AnalyticsAdapter = (\n  event: AnalyticsEvent,\n  props?: Record\u003Cstring, unknown>,\n) => void;\n\nexport const googleAnalyticsAdapter: AnalyticsAdapter = (event, props) => {\n  const w =\n    typeof window !== \"undefined\" ? (window as AnalyticsGlobals) : undefined;\n  if (!w || typeof w.gtag !== \"function\") return; \u002F\u002F SSR-safe + absent-safe\n  w.gtag(\"event\", event, props ?? {});\n};\n\nexport const clarityAdapter: AnalyticsAdapter = (event) => {\n  const w =\n    typeof window !== \"undefined\" ? (window as AnalyticsGlobals) : undefined;\n  if (!w || typeof w.clarity !== \"function\") return;\n  w.clarity(\"event\", event);\n};\n\n\u002F\u002F The registry track() fans out across. Exported + mutable so tests can swap\n\u002F\u002F in a recording sink to assert dispatch.\nexport const analyticsAdapters: AnalyticsAdapter[] = [\n  googleAnalyticsAdapter,\n  clarityAdapter,\n  firebaseAdapter,\n  \u002F\u002F posthogAdapter, openPanelAdapter, …\n];\n```\n\n### 3.1 Firebase Analytics — one adapter, two platforms\n\nFirebase Analytics ships two SDKs that share the **same `logEvent(name, params)` contract**, so a\nsingle conceptual adapter covers both web and React Native — only the import and the \"is it\navailable?\" guard differ. On web the adapter never imports the SDK at module top level (it's\nbrowser-only and async), so it stays SSR-safe.\n\n```ts\n\u002F\u002F services\u002Fanalytics\u002Fadapters.firebase.web.ts — Firebase JS SDK (web)\nimport type { Analytics } from \"firebase\u002Fanalytics\";\nimport type { AnalyticsAdapter } from \".\u002Fadapters\";\n\n\u002F\u002F Held after a lazy, browser-only init (below) so the adapter stays synchronous + SSR-safe.\nlet analytics: Analytics | undefined;\nexport function setFirebaseAnalytics(instance: Analytics): void {\n  analytics = instance;\n}\n\nexport const firebaseAdapter: AnalyticsAdapter = (event, props) => {\n  if (typeof window === \"undefined\" || !analytics) return; \u002F\u002F SSR-safe + not-yet-ready safe\n  void import(\"firebase\u002Fanalytics\").then(({ logEvent }) =>\n    logEvent(analytics!, event, props),\n  );\n};\n```\n\n```ts\n\u002F\u002F services\u002Fanalytics\u002Ffirebase.init.ts — lazy, browser-only init (web)\nimport { initializeApp, getApps } from \"firebase\u002Fapp\";\nimport { getAnalytics, isSupported } from \"firebase\u002Fanalytics\";\nimport { setFirebaseAnalytics } from \".\u002Fadapters.firebase.web\";\nimport { FIREBASE_CONFIG } from \"@\u002Fconstants\u002Fanalytics\";\n\nexport async function initFirebaseAnalytics(): Promise\u003Cvoid> {\n  if (typeof window === \"undefined\") return; \u002F\u002F never on the server\n  if (!(await isSupported())) return; \u002F\u002F unsupported browser → no-op\n  const app = getApps()[0] ?? initializeApp(FIREBASE_CONFIG);\n  setFirebaseAnalytics(getAnalytics(app)); \u002F\u002F adapter goes live after this\n}\n```\n\n```ts\n\u002F\u002F services\u002Fanalytics\u002Fadapters.firebase.native.ts — @react-native-firebase\u002Fanalytics (RN \u002F Expo)\nimport analytics from \"@react-native-firebase\u002Fanalytics\";\nimport type { AnalyticsAdapter } from \".\u002Fadapters\";\n\nexport const firebaseAdapter: AnalyticsAdapter = (event, props) => {\n  \u002F\u002F RN: no window; the native module is present once the app boots.\n  void analytics().logEvent(event, props);\n};\n```\n\n**Same shape, two files.** Resolve the platform variant by file extension\n(`adapters.firebase.native.ts` via Metro's `.native.ts` resolution, or a `Platform.OS` switch) so\nthe **registry, `track` fan-out, consent gate, taxonomy, and `useAnalytics` hook never change**\nacross platforms. Firebase's event-name rules (snake_case, lowercase, ≤ 40 chars) line up with the\ntaxonomy rules in §2, so the canonical `ANALYTICS_EVENTS` constants are valid Firebase event names\nas-is. Gate `initFirebaseAnalytics()` on consent (§6) — Firebase also exposes\n`setAnalyticsCollectionEnabled(false)` to harden the opt-out.\n\n**Why this shape:** analytics is the _last_ thing that should crash an app. A vendor script that\nfails to load, a global that isn't there yet, an adapter that throws on a malformed prop — all are\ncontained. The registry being exported and mutable makes dispatch unit-testable without mounting any\nprovider.\n\n---\n\n## 4. The provider + hook (SSR-safe entry)\n\nA `'use client'` context exposes `track` through `useAnalytics()`. Outside a provider (tests,\nserver) it returns a **no-op**, so instrumented components never throw in isolation.\n\n```tsx\n\u002F\u002F providers\u002FAnalyticsProvider.tsx\n\"use client\";\nimport { createContext, useContext, useMemo, type ReactNode } from \"react\";\nimport { track as trackEvent } from \"@\u002Fservices\u002Fanalytics\";\nimport type { AnalyticsEvent } from \"@\u002Fconstants\u002Fanalytics\";\n\ninterface AnalyticsContextValue {\n  track: (event: AnalyticsEvent, props?: Record\u003Cstring, unknown>) => void;\n}\nconst AnalyticsContext = createContext\u003CAnalyticsContextValue | null>(null);\n\nexport function AnalyticsProvider({ children }: { children: ReactNode }) {\n  \u002F\u002F track is module-level and stable → memoize once, never re-render consumers.\n  const value = useMemo\u003CAnalyticsContextValue>(\n    () => ({ track: trackEvent }),\n    [],\n  );\n  return (\n    \u003CAnalyticsContext.Provider value={value}>\n      {children}\n    \u003C\u002FAnalyticsContext.Provider>\n  );\n}\n\nconst NOOP: AnalyticsContextValue = { track: () => undefined };\nexport function useAnalytics(): AnalyticsContextValue {\n  return useContext(AnalyticsContext) ?? NOOP; \u002F\u002F safe outside a provider \u002F on server\n}\n```\n\n```tsx\n\u002F\u002F a tracked leaf — Server Components can't use the hook, so wrap in a thin client component\n\"use client\";\nexport function TrackedGithubLink({ href, children }: Props) {\n  const { track } = useAnalytics();\n  return (\n    \u003Ca\n      href={href}\n      onClick={() => track(ANALYTICS_EVENTS.GITHUB_CLICK, { url: href })}\n    >\n      {children}\n    \u003C\u002Fa>\n  );\n}\n```\n\nThe provider does **no work during render** — `track` is stable and adapters guard their own\n`window` access — so it's safe to mount at the root, including in SSR\u002FRSC trees.\n\n---\n\n## 5. Real-user Core Web Vitals (the lab\u002Ffield loop)\n\nReport field vitals through the **same fan-out**. This is the complement to the lighthouse skill:\nthe lab gate sets the budget; the field tells you whether real users hit it.\n\n```ts\n\u002F\u002F services\u002Fanalytics\u002Fweb-vitals.ts\nimport { onLCP, onINP, onCLS, onFCP, onTTFB, type Metric } from \"web-vitals\";\nimport { track } from \".\u002Ftrack\";\n\nexport function reportWebVitals(): void {\n  const send = (m: Metric) =>\n    track(\"web_vital\" as AnalyticsEvent, {\n      name: m.name, \u002F\u002F LCP | INP | CLS | FCP | TTFB\n      value: Math.round(m.name === \"CLS\" ? m.value * 1000 : m.value),\n      rating: m.rating, \u002F\u002F good | needs-improvement | poor\n      id: m.id,\n    });\n  onLCP(send);\n  onINP(send);\n  onCLS(send);\n  onFCP(send);\n  onTTFB(send);\n}\n```\n\n- Call `reportWebVitals()` once on the client (e.g. in the analytics provider's effect, or Next.js `useReportWebVitals`).\n- Use the **same metrics and thresholds** as the lighthouse skill (LCP ≤ 2500, INP ≤ 200, CLS ≤ 0.1) so lab and field speak the same language.\n- Lab budget green + field \"poor\" = a gap between your test conditions and real devices\u002Fnetworks — exactly what field RUM exists to reveal.\n\n---\n\n## 6. Consent and privacy gating\n\nTelemetry fires only after opt-in, checked **once at the fan-out boundary** (§3) — not duplicated at\nevery call site.\n\n```ts\n\u002F\u002F services\u002Fanalytics\u002Fconsent.ts\nlet granted = false; \u002F\u002F hydrate from a stored consent cookie\u002FlocalStorage on init\nexport function setConsent(value: boolean): void {\n  granted = value;\n}\nexport function hasConsent(): boolean {\n  return granted;\n}\n```\n\n**Hard rules:**\n\n- `track()` early-returns when consent is absent — no events, no vitals, no error PII before opt-in.\n- Keep `props` PII-light: ids and enums, not emails\u002Fnames\u002Ffree text. Treat anything user-entered as sensitive.\n- Respect \"Do Not Track\" \u002F regional regimes (GDPR\u002FCCPA) by defaulting consent to `false` where required.\n- Error reports must scrub PII before leaving the device.\n\n---\n\n## 7. Error reporting at boundaries\n\nCaught render errors and unhandled rejections go through the same fan-out (or a dedicated Sentry\nadapter), at **deliberate boundaries** — not a global swallow.\n\n```tsx\n\u002F\u002F error\u002FErrorBoundary.tsx (essence)\ncomponentDidCatch(error: Error, info: ErrorInfo) {\n  track(\"client_error\" as AnalyticsEvent, {\n    message: error.message, component: info.componentStack?.split(\"\\n\")[1]?.trim(),\n  }); \u002F\u002F or sentryAdapter(error, info)\n}\n```\n\n- Place boundaries at route\u002Fsegment level (per the frontend-architecture page-directory model), so a crash degrades one surface, not the app.\n- Pair with the data layer's typed `ApiError` (frontend-data-contracts §6): report _unexpected_ errors; expected ones (validation, 404) are handled, not reported as crashes.\n\n---\n\n## 8. Provider & framework adapters\n\nThe taxonomy + fan-out are constant; each provider is one window-guarded adapter.\n\n| Provider               | Adapter call                                                                 |\n| ---------------------- | ---------------------------------------------------------------------------- |\n| **Firebase (web)**     | `logEvent(analytics, name, props)` (`firebase\u002Fanalytics`, lazy browser init) |\n| **Firebase (RN\u002FExpo)** | `analytics().logEvent(name, props)` (`@react-native-firebase\u002Fanalytics`)     |\n| **GA4**                | `window.gtag(\"event\", name, props)`                                          |\n| **Microsoft Clarity**  | `window.clarity(\"event\", name)`                                              |\n| **PostHog**            | `window.posthog?.capture(name, props)`                                       |\n| **OpenPanel**          | `op(\"track\", name, props)` or `op.track(name, props)`                        |\n| **Sentry**             | `Sentry.captureException(error)` (error adapter)                             |\n\n| Framework                | Wiring                                                                                                                                                                                                                                                                                                                                                        |\n| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| **Next.js**              | `AnalyticsProvider` in the root layout (client boundary); call `initFirebaseAnalytics()` in a client effect; vitals via `useReportWebVitals`.                                                                                                                                                                                                                 |\n| **React + Vite \u002F Remix** | provider at app root; `initFirebaseAnalytics()` + `reportWebVitals()` in a top-level effect.                                                                                                                                                                                                                                                                  |\n| **Expo \u002F React Native**  | swap the web-vitals source for RN performance APIs and the web provider scripts for native SDKs (**`@react-native-firebase\u002Fanalytics`**, Amplitude, PostHog-RN); the **taxonomy, `track` fan-out, consent gate, and `useAnalytics` hook are unchanged**. The Firebase adapter is the same shape — it guards the native module instead of `window` (see §3.1). |\n\n---\n\n## 9. Conventions checklist (enforce in review)\n\n- [ ] Event names are canonical constants with a union type — zero inline event strings.\n- [ ] `track()` is the single entry point; reached via `useAnalytics()` (no-op outside a provider\u002FSSR).\n- [ ] Every adapter guards its provider global and no-ops when absent or on the server.\n- [ ] Each adapter call is individually try\u002Fcaught — one provider can't break the app or the others.\n- [ ] Consent is checked once at the fan-out; nothing fires before opt-in.\n- [ ] `props` are PII-light (ids\u002Fenums, not emails\u002Fnames); error reports scrub PII.\n- [ ] Real-user Web Vitals report through the same fan-out, using the lighthouse skill's metrics\u002Fthresholds.\n- [ ] Error boundaries are placed per route\u002Fsegment and report unexpected errors only.\n- [ ] The provider does no render-time work; the context value is memoized\u002Fstable.\n- [ ] Mutating the adapter registry (tests) is the dispatch-observation seam — no real provider mounted in tests.\n\n---\n\n## 10. How to apply this skill\n\n**Adding analytics to a project:** create `constants\u002Fanalytics.ts` (taxonomy), `services\u002Fanalytics\u002F`\n(track + adapters + consent), and `AnalyticsProvider`. Mount the provider at the root; wrap tracked\nleaves in thin client components.\n\n**Adding an event:** add a constant to `ANALYTICS_EVENTS`, then `track(ANALYTICS_EVENTS.NEW_ONE, props)`\nat the interaction. Never inline the string.\n\n**Wiring Firebase Analytics (web + RN):** add a `firebaseAdapter` to the registry using the\nplatform-resolved files in §3.1 (`firebase\u002Fanalytics` on web behind a lazy browser-only\n`initFirebaseAnalytics()`; `@react-native-firebase\u002Fanalytics` on native). Gate init on consent. The\ntaxonomy and fan-out are untouched — Firebase is just one more entry in `analyticsAdapters`.\n\n**Closing the lab\u002Ffield loop:** wire `reportWebVitals()` and compare field ratings against the\nlighthouse skill's budgets; investigate any \"lab green \u002F field poor\" gap.\n\n**Reviewing observability:** run the checklist in §9. The highest-value catches are inline event\nstrings (taxonomy drift), an un-guarded adapter (a provider that can crash the app), and telemetry\nfiring before consent.\n\n---\n\n## Publishing \u002F installing this skill\n\nThis skill follows the Anthropic `SKILL.md` format and is portable across agents.\n\n1. Keep it under `skills\u002Ffrontend-observability\u002FSKILL.md` in a public GitHub repo.\n2. Keep the frontmatter `name` and high-signal `description` — discovery indexes match against it.\n3. Install with: `npx skills add \u003Corg>\u002F\u003Crepo> --skill \"frontend-observability\"`.\n4. Non-`SKILL.md` agents can be pointed here from `AGENTS.md` \u002F `CLAUDE.md`; Kiro can mirror it as a steering file.\n\n## Limitations\n\n- Use this skill only when the task clearly matches its upstream source and local project context.\n- Verify commands, generated code, dependencies, credentials, and external service behavior before applying changes.\n- Do not treat examples as a substitute for environment-specific tests, security review, or user approval for destructive or costly actions.\n","# Frontend Observability (the field side)\n## When to Use\n\nUse this skill when you need a portable, framework-agnostic field-side observability system for any React or React Native app. Establishes one typed event taxonomy (canonical event-name constants, never inline strings), a best-effort non-blocking provider fan-out so a failing or absent analytics provider can never...\n\n\n> Portable skill — readable by Claude Code, OpenCode, Codex, Cursor, Windsurf, and others.\n> This skill describes a **field-side observability system** — event taxonomy, provider fan-out,\n> real-user vitals, error reporting, consent — not a dashboard or a specific vendor. It is the\n> **field complement to the frontend-lighthouse skill**: Lighthouse is the _lab_ gate (synthetic,\n> pre-merge); this is the _field_ (what real users actually experience). It lives in a\n> `services\u002Fanalytics\u002F` module per the **frontend-architecture** skill.\n\nThe goal: you can answer \"what are real users doing, and what are they experiencing?\" — with a\n**typed event vocabulary** (no stringly-typed `track(\"clicked_thing\")` scattered everywhere), a\nfan-out that is **best-effort** (a broken provider never breaks the app), real **Core Web Vitals\nfrom the field**, and **consent** respected before anything fires.\n\n---\n\n## 0. The five core ideas\n\n1. **Events are a typed vocabulary.** Event names are canonical constants with a union type — never inline string literals. The taxonomy is reviewable in one file and the compiler rejects typos.\n2. **Fan-out is best-effort and non-blocking.** `track()` dispatches to every provider, each in its own try\u002Fcatch. A missing global, a thrown provider, an unloaded script — none can throw into the caller or stop the other providers.\n3. **One entry point, SSR-safe.** A single `track(event, props)` is the only way to record. It's reached through a context hook that no-ops outside a provider and on the server, so instrumented components render safely anywhere.\n4. **Field vitals complement lab budgets.** Real-user LCP\u002FINP\u002FCLS are reported to the same fan-out. Lighthouse proves the build _can_ be fast; field vitals prove it _is_ — together they close the loop.\n5. **Consent gates everything.** No telemetry (events, vitals, error reports with PII) fires before opt-in. Consent state is checked at the fan-out boundary, not sprinkled through call sites.\n\n---\n\n## 1. Directory layout\n\nThe system is one service module plus its constants (per frontend-architecture).\n\n```\nsrc\u002F\n├── constants\u002F\n│   └── analytics.ts           ← canonical event names + AnalyticsEvent union\n├── services\u002Fanalytics\u002F\n│   ├── index.ts               ← barrel: track, adapters, types\n│   ├── track.ts               ← the best-effort fan-out (single entry point)\n│   ├── adapters.ts            ← one (event, props) => void per provider, window-guarded\n│   ├── web-vitals.ts          ← report real-user LCP\u002FINP\u002FCLS into track()\n│   └── consent.ts             ← consent gate read by the fan-out\n├── providers\u002F\n│   └── AnalyticsProvider.tsx  ← 'use client' context exposing useAnalytics().track\n└── error\u002F\n    └── ErrorBoundary.tsx      ← reports caught render errors via the fan-out\n```\n\n---\n\n## 2. The event taxonomy (typed, never inline)\n\nOne file owns every event name. Components reference constants; the union type makes typos a compile\nerror and the catalog a single source of truth.\n\n```ts\n\u002F\u002F constants\u002Fanalytics.ts\nexport const ANALYTICS_EVENTS = {\n  PROJECT_CLICK: \"project_click\",\n  GITHUB_CLICK: \"github_click\",\n  RESUME_DOWNLOAD: \"resume_download\",\n  CONTACT_SUBMISSION: \"contact_submission\",\n} as const;\n\nexport type AnalyticsEvent =\n  (typeof ANALYTICS_EVENTS)[keyof typeof ANALYTICS_EVENTS];\n```\n\n```ts\n\u002F\u002F CORRECT — typed constant, autocompletes, can't typo\ntrack(ANALYTICS_EVENTS.GITHUB_CLICK, { url });\n\n\u002F\u002F WRONG — stringly-typed, drifts, no compile check\ntrack(\"github-click\"); \u002F\u002F ❌ silently a different event from \"github_click\"\n```\n\n**Hard rules:**\n\n- No inline event-name strings anywhere; only `ANALYTICS_EVENTS.*`.\n- Event names are snake_case and stable — renaming one breaks historical dashboards, so treat the catalog as a contract.\n- Keep `props` shapes small and PII-light (see §6); prefer ids over names, never raw emails.\n\n---\n\n## 3. Best-effort, non-blocking fan-out\n\n`track()` is the single entry point. It iterates the adapter registry, guarding **each** call so one\nprovider can't affect the caller or the others.\n\n```ts\n\u002F\u002F services\u002Fanalytics\u002Ftrack.ts\nimport type { AnalyticsEvent } from \"@\u002Fconstants\u002Fanalytics\";\nimport { analyticsAdapters } from \".\u002Fadapters\";\nimport { hasConsent } from \".\u002Fconsent\";\n\nexport function track(\n  event: AnalyticsEvent,\n  props?: Record\u003Cstring, unknown>,\n): void {\n  if (!hasConsent()) return; \u002F\u002F §6 — nothing fires before opt-in\n  for (const adapter of analyticsAdapters) {\n    try {\n      adapter(event, props);\n    } catch {\n      \u002F* best-effort: a failing\u002Fabsent provider must never throw into the\n         caller or block dispatch to the remaining providers. *\u002F\n    }\n  }\n}\n```\n\nEach adapter is a tiny `(event, props) => void` that **guards its provider global** — it no-ops on\nthe server (no `window`) and when the provider script is absent, so a missing or unloaded provider\nnever throws.\n\n```ts\n\u002F\u002F services\u002Fanalytics\u002Fadapters.ts\nexport type AnalyticsAdapter = (\n  event: AnalyticsEvent,\n  props?: Record\u003Cstring, unknown>,\n) => void;\n\nexport const googleAnalyticsAdapter: AnalyticsAdapter = (event, props) => {\n  const w =\n    typeof window !== \"undefined\" ? (window as AnalyticsGlobals) : undefined;\n  if (!w || typeof w.gtag !== \"function\") return; \u002F\u002F SSR-safe + absent-safe\n  w.gtag(\"event\", event, props ?? {});\n};\n\nexport const clarityAdapter: AnalyticsAdapter = (event) => {\n  const w =\n    typeof window !== \"undefined\" ? (window as AnalyticsGlobals) : undefined;\n  if (!w || typeof w.clarity !== \"function\") return;\n  w.clarity(\"event\", event);\n};\n\n\u002F\u002F The registry track() fans out across. Exported + mutable so tests can swap\n\u002F\u002F in a recording sink to assert dispatch.\nexport const analyticsAdapters: AnalyticsAdapter[] = [\n  googleAnalyticsAdapter,\n  clarityAdapter,\n  firebaseAdapter,\n  \u002F\u002F posthogAdapter, openPanelAdapter, …\n];\n```\n\n### 3.1 Firebase Analytics — one adapter, two platforms\n\nFirebase Analytics ships two SDKs that share the **same `logEvent(name, params)` contract**, so a\nsingle conceptual adapter covers both web and React Native — only the import and the \"is it\navailable?\" guard differ. On web the adapter never imports the SDK at module top level (it's\nbrowser-only and async), so it stays SSR-safe.\n\n```ts\n\u002F\u002F services\u002Fanalytics\u002Fadapters.firebase.web.ts — Firebase JS SDK (web)\nimport type { Analytics } from \"firebase\u002Fanalytics\";\nimport type { AnalyticsAdapter } from \".\u002Fadapters\";\n\n\u002F\u002F Held after a lazy, browser-only init (below) so the adapter stays synchronous + SSR-safe.\nlet analytics: Analytics | undefined;\nexport function setFirebaseAnalytics(instance: Analytics): void {\n  analytics = instance;\n}\n\nexport const firebaseAdapter: AnalyticsAdapter = (event, props) => {\n  if (typeof window === \"undefined\" || !analytics) return; \u002F\u002F SSR-safe + not-yet-ready safe\n  void import(\"firebase\u002Fanalytics\").then(({ logEvent }) =>\n    logEvent(analytics!, event, props),\n  );\n};\n```\n\n```ts\n\u002F\u002F services\u002Fanalytics\u002Ffirebase.init.ts — lazy, browser-only init (web)\nimport { initializeApp, getApps } from \"firebase\u002Fapp\";\nimport { getAnalytics, isSupported } from \"firebase\u002Fanalytics\";\nimport { setFirebaseAnalytics } from \".\u002Fadapters.firebase.web\";\nimport { FIREBASE_CONFIG } from \"@\u002Fconstants\u002Fanalytics\";\n\nexport async function initFirebaseAnalytics(): Promise\u003Cvoid> {\n  if (typeof window === \"undefined\") return; \u002F\u002F never on the server\n  if (!(await isSupported())) return; \u002F\u002F unsupported browser → no-op\n  const app = getApps()[0] ?? initializeApp(FIREBASE_CONFIG);\n  setFirebaseAnalytics(getAnalytics(app)); \u002F\u002F adapter goes live after this\n}\n```\n\n```ts\n\u002F\u002F services\u002Fanalytics\u002Fadapters.firebase.native.ts — @react-native-firebase\u002Fanalytics (RN \u002F Expo)\nimport analytics from \"@react-native-firebase\u002Fanalytics\";\nimport type { AnalyticsAdapter } from \".\u002Fadapters\";\n\nexport const firebaseAdapter: AnalyticsAdapter = (event, props) => {\n  \u002F\u002F RN: no window; the native module is present once the app boots.\n  void analytics().logEvent(event, props);\n};\n```\n\n**Same shape, two files.** Resolve the platform variant by file extension\n(`adapters.firebase.native.ts` via Metro's `.native.ts` resolution, or a `Platform.OS` switch) so\nthe **registry, `track` fan-out, consent gate, taxonomy, and `useAnalytics` hook never change**\nacross platforms. Firebase's event-name rules (snake_case, lowercase, ≤ 40 chars) line up with the\ntaxonomy rules in §2, so the canonical `ANALYTICS_EVENTS` constants are valid Firebase event names\nas-is. Gate `initFirebaseAnalytics()` on consent (§6) — Firebase also exposes\n`setAnalyticsCollectionEnabled(false)` to harden the opt-out.\n\n**Why this shape:** analytics is the _last_ thing that should crash an app. A vendor script that\nfails to load, a global that isn't there yet, an adapter that throws on a malformed prop — all are\ncontained. The registry being exported and mutable makes dispatch unit-testable without mounting any\nprovider.\n\n---\n\n## 4. The provider + hook (SSR-safe entry)\n\nA `'use client'` context exposes `track` through `useAnalytics()`. Outside a provider (tests,\nserver) it returns a **no-op**, so instrumented components never throw in isolation.\n\n```tsx\n\u002F\u002F providers\u002FAnalyticsProvider.tsx\n\"use client\";\nimport { createContext, useContext, useMemo, type ReactNode } from \"react\";\nimport { track as trackEvent } from \"@\u002Fservices\u002Fanalytics\";\nimport type { AnalyticsEvent } from \"@\u002Fconstants\u002Fanalytics\";\n\ninterface AnalyticsContextValue {\n  track: (event: AnalyticsEvent, props?: Record\u003Cstring, unknown>) => void;\n}\nconst AnalyticsContext = createContext\u003CAnalyticsContextValue | null>(null);\n\nexport function AnalyticsProvider({ children }: { children: ReactNode }) {\n  \u002F\u002F track is module-level and stable → memoize once, never re-render consumers.\n  const value = useMemo\u003CAnalyticsContextValue>(\n    () => ({ track: trackEvent }),\n    [],\n  );\n  return (\n    \u003CAnalyticsContext.Provider value={value}>\n      {children}\n    \u003C\u002FAnalyticsContext.Provider>\n  );\n}\n\nconst NOOP: AnalyticsContextValue = { track: () => undefined };\nexport function useAnalytics(): AnalyticsContextValue {\n  return useContext(AnalyticsContext) ?? NOOP; \u002F\u002F safe outside a provider \u002F on server\n}\n```\n\n```tsx\n\u002F\u002F a tracked leaf — Server Components can't use the hook, so wrap in a thin client component\n\"use client\";\nexport function TrackedGithubLink({ href, children }: Props) {\n  const { track } = useAnalytics();\n  return (\n    \u003Ca\n      href={href}\n      onClick={() => track(ANALYTICS_EVENTS.GITHUB_CLICK, { url: href })}\n    >\n      {children}\n    \u003C\u002Fa>\n  );\n}\n```\n\nThe provider does **no work during render** — `track` is stable and adapters guard their own\n`window` access — so it's safe to mount at the root, including in SSR\u002FRSC trees.\n\n---\n\n## 5. Real-user Core Web Vitals (the lab\u002Ffield loop)\n\nReport field vitals through the **same fan-out**. This is the complement to the lighthouse skill:\nthe lab gate sets the budget; the field tells you whether real users hit it.\n\n```ts\n\u002F\u002F services\u002Fanalytics\u002Fweb-vitals.ts\nimport { onLCP, onINP, onCLS, onFCP, onTTFB, type Metric } from \"web-vitals\";\nimport { track } from \".\u002Ftrack\";\n\nexport function reportWebVitals(): void {\n  const send = (m: Metric) =>\n    track(\"web_vital\" as AnalyticsEvent, {\n      name: m.name, \u002F\u002F LCP | INP | CLS | FCP | TTFB\n      value: Math.round(m.name === \"CLS\" ? m.value * 1000 : m.value),\n      rating: m.rating, \u002F\u002F good | needs-improvement | poor\n      id: m.id,\n    });\n  onLCP(send);\n  onINP(send);\n  onCLS(send);\n  onFCP(send);\n  onTTFB(send);\n}\n```\n\n- Call `reportWebVitals()` once on the client (e.g. in the analytics provider's effect, or Next.js `useReportWebVitals`).\n- Use the **same metrics and thresholds** as the lighthouse skill (LCP ≤ 2500, INP ≤ 200, CLS ≤ 0.1) so lab and field speak the same language.\n- Lab budget green + field \"poor\" = a gap between your test conditions and real devices\u002Fnetworks — exactly what field RUM exists to reveal.\n\n---\n\n## 6. Consent and privacy gating\n\nTelemetry fires only after opt-in, checked **once at the fan-out boundary** (§3) — not duplicated at\nevery call site.\n\n```ts\n\u002F\u002F services\u002Fanalytics\u002Fconsent.ts\nlet granted = false; \u002F\u002F hydrate from a stored consent cookie\u002FlocalStorage on init\nexport function setConsent(value: boolean): void {\n  granted = value;\n}\nexport function hasConsent(): boolean {\n  return granted;\n}\n```\n\n**Hard rules:**\n\n- `track()` early-returns when consent is absent — no events, no vitals, no error PII before opt-in.\n- Keep `props` PII-light: ids and enums, not emails\u002Fnames\u002Ffree text. Treat anything user-entered as sensitive.\n- Respect \"Do Not Track\" \u002F regional regimes (GDPR\u002FCCPA) by defaulting consent to `false` where required.\n- Error reports must scrub PII before leaving the device.\n\n---\n\n## 7. Error reporting at boundaries\n\nCaught render errors and unhandled rejections go through the same fan-out (or a dedicated Sentry\nadapter), at **deliberate boundaries** — not a global swallow.\n\n```tsx\n\u002F\u002F error\u002FErrorBoundary.tsx (essence)\ncomponentDidCatch(error: Error, info: ErrorInfo) {\n  track(\"client_error\" as AnalyticsEvent, {\n    message: error.message, component: info.componentStack?.split(\"\\n\")[1]?.trim(),\n  }); \u002F\u002F or sentryAdapter(error, info)\n}\n```\n\n- Place boundaries at route\u002Fsegment level (per the frontend-architecture page-directory model), so a crash degrades one surface, not the app.\n- Pair with the data layer's typed `ApiError` (frontend-data-contracts §6): report _unexpected_ errors; expected ones (validation, 404) are handled, not reported as crashes.\n\n---\n\n## 8. Provider & framework adapters\n\nThe taxonomy + fan-out are constant; each provider is one window-guarded adapter.\n\n| Provider               | Adapter call                                                                 |\n| ---------------------- | ---------------------------------------------------------------------------- |\n| **Firebase (web)**     | `logEvent(analytics, name, props)` (`firebase\u002Fanalytics`, lazy browser init) |\n| **Firebase (RN\u002FExpo)** | `analytics().logEvent(name, props)` (`@react-native-firebase\u002Fanalytics`)     |\n| **GA4**                | `window.gtag(\"event\", name, props)`                                          |\n| **Microsoft Clarity**  | `window.clarity(\"event\", name)`                                              |\n| **PostHog**            | `window.posthog?.capture(name, props)`                                       |\n| **OpenPanel**          | `op(\"track\", name, props)` or `op.track(name, props)`                        |\n| **Sentry**             | `Sentry.captureException(error)` (error adapter)                             |\n\n| Framework                | Wiring                                                                                                                                                                                                                                                                                                                                                        |\n| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| **Next.js**              | `AnalyticsProvider` in the root layout (client boundary); call `initFirebaseAnalytics()` in a client effect; vitals via `useReportWebVitals`.                                                                                                                                                                                                                 |\n| **React + Vite \u002F Remix** | provider at app root; `initFirebaseAnalytics()` + `reportWebVitals()` in a top-level effect.                                                                                                                                                                                                                                                                  |\n| **Expo \u002F React Native**  | swap the web-vitals source for RN performance APIs and the web provider scripts for native SDKs (**`@react-native-firebase\u002Fanalytics`**, Amplitude, PostHog-RN); the **taxonomy, `track` fan-out, consent gate, and `useAnalytics` hook are unchanged**. The Firebase adapter is the same shape — it guards the native module instead of `window` (see §3.1). |\n\n---\n\n## 9. Conventions checklist (enforce in review)\n\n- [ ] Event names are canonical constants with a union type — zero inline event strings.\n- [ ] `track()` is the single entry point; reached via `useAnalytics()` (no-op outside a provider\u002FSSR).\n- [ ] Every adapter guards its provider global and no-ops when absent or on the server.\n- [ ] Each adapter call is individually try\u002Fcaught — one provider can't break the app or the others.\n- [ ] Consent is checked once at the fan-out; nothing fires before opt-in.\n- [ ] `props` are PII-light (ids\u002Fenums, not emails\u002Fnames); error reports scrub PII.\n- [ ] Real-user Web Vitals report through the same fan-out, using the lighthouse skill's metrics\u002Fthresholds.\n- [ ] Error boundaries are placed per route\u002Fsegment and report unexpected errors only.\n- [ ] The provider does no render-time work; the context value is memoized\u002Fstable.\n- [ ] Mutating the adapter registry (tests) is the dispatch-observation seam — no real provider mounted in tests.\n\n---\n\n## 10. How to apply this skill\n\n**Adding analytics to a project:** create `constants\u002Fanalytics.ts` (taxonomy), `services\u002Fanalytics\u002F`\n(track + adapters + consent), and `AnalyticsProvider`. Mount the provider at the root; wrap tracked\nleaves in thin client components.\n\n**Adding an event:** add a constant to `ANALYTICS_EVENTS`, then `track(ANALYTICS_EVENTS.NEW_ONE, props)`\nat the interaction. Never inline the string.\n\n**Wiring Firebase Analytics (web + RN):** add a `firebaseAdapter` to the registry using the\nplatform-resolved files in §3.1 (`firebase\u002Fanalytics` on web behind a lazy browser-only\n`initFirebaseAnalytics()`; `@react-native-firebase\u002Fanalytics` on native). Gate init on consent. The\ntaxonomy and fan-out are untouched — Firebase is just one more entry in `analyticsAdapters`.\n\n**Closing the lab\u002Ffield loop:** wire `reportWebVitals()` and compare field ratings against the\nlighthouse skill's budgets; investigate any \"lab green \u002F field poor\" gap.\n\n**Reviewing observability:** run the checklist in §9. The highest-value catches are inline event\nstrings (taxonomy drift), an un-guarded adapter (a provider that can crash the app), and telemetry\nfiring before consent.\n\n---\n\n## Publishing \u002F installing this skill\n\nThis skill follows the Anthropic `SKILL.md` format and is portable across agents.\n\n1. Keep it under `skills\u002Ffrontend-observability\u002FSKILL.md` in a public GitHub repo.\n2. Keep the frontmatter `name` and high-signal `description` — discovery indexes match against it.\n3. Install with: `npx skills add \u003Corg>\u002F\u003Crepo> --skill \"frontend-observability\"`.\n4. Non-`SKILL.md` agents can be pointed here from `AGENTS.md` \u002F `CLAUDE.md`; Kiro can mirror it as a steering file.\n\n## Limitations\n\n- Use this skill only when the task clearly matches its upstream source and local project context.\n- Verify commands, generated code, dependencies, credentials, and external service behavior before applying changes.\n- Do not treat examples as a substitute for environment-specific tests, security review, or user approval for destructive or costly actions.\n",{"name":5,"risk":24,"source":25,"license":15,"date_added":26,"description":7,"source_repo":27,"source_type":28,"license_source":29},"critical","https:\u002F\u002Fgithub.com\u002Fstareezy-1\u002Ffrontend-architecture-skill\u002Ftree\u002Fmain\u002Fskills\u002Ffrontend-observability",1782864000000,"stareezy-1\u002Ffrontend-architecture-skill","community","https:\u002F\u002Fgithub.com\u002Fstareezy-1\u002Ffrontend-architecture-skill\u002Fblob\u002Fmain\u002FLICENSE","main","d69096e239f2a89aabc2cd078c47664a9d3b1e11","05-技能与代理开发\u002Ffrontend-observability",3,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts","https:\u002F\u002Fgithub.com\u002Flza6","个人vx：Tf00798\r\n个人✈：@TFGY999","2026-10-08 14:29:22",{"source":8,"skillName":5,"commands":39,"prompt":49,"zipAvailable":50},[40,43,46],{"tool":41,"command":42},"npx","npx skills add lza6\u002FArmor-piercing-system-prompts --skill frontend-observability",{"tool":44,"command":45},"bunx","bunx skills add lza6\u002FArmor-piercing-system-prompts --skill frontend-observability",{"tool":47,"command":48},"pnpm","pnpm dlx skills add lza6\u002FArmor-piercing-system-prompts --skill frontend-observability","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F05-技能与代理开发\u002Ffrontend-observability\u002FSKILL.md",true,[],[53,60,65,72,79,86],{"skillNo":54,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":57,"categories":58,"keywords":59,"publishedAt":19},"01M7FFG485KY83TD6HSC4YPCMC","obsidian-clipper-template-creator","Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator\u002FSKILL.md",[],[],{"skillNo":61,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":19},"01M7FFG0T6AZ0STEJPSB3CX84K","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator-antigravity-awesome-skills-main\u002FSKILL.md",[],[],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":19},"01M7FFFY0QEM14SKWPDYGMXM2P","python-api","Programmatic Object-Detection-Metrics API guidance for BoundingBox, BoundingBoxes, Evaluator, enums, coordinate conversion, AP\u002FmAP semantics, and source-style import diagnostics.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002Fsub-skills\u002Fpython-api\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":19},"01M7FFFVZQZ2GJ0C0TGP7JHD20","file-evaluation","Folder-based PASCAL VOC AP\u002FmAP evaluation from ground-truth and detection text files.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002Fsub-skills\u002Ffile-evaluation\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":19},"01M7FFFSFNYSE77SJ6PE1CK2DA","object-detection-metrics","Guides legacy Object-Detection-Metrics PASCAL VOC AP\u002FmAP evaluation from detection text folders and direct Python API classes.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":19},"01M7FFFP0GCK1RVXBCPQ8APBMT","nx-workspace-patterns","Configure and optimize Nx monorepo workspaces. Use when setting up Nx, configuring project boundaries, optimizing build caching, or implementing affected commands.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fnx-workspace-patterns\u002FSKILL.md",[],[]]