用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/VilnaCRM-Org/crm --skill observability-instrumentation命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Use when placing features, repositories, hooks, or fixing dependency-cruiser errors.
Use when improving frontend performance, Lighthouse, web-vitals, or a11y.
Keep the Bats make-target contract in sync when adding or renaming a Makefile target so the bats CI check stays green
正在显示 SKILL.md
基于 SOC 职业分类
| name | observability-instrumentation |
| description | Use when adding frontend telemetry, logs, Sentry, or web-vitals signals. |
This repo is a frontend SPA. Instrument client-side failures and user-impacting signals; do not copy backend AWS EMF patterns from user-service.
@sentry/react.web-vitals package.The auth page enforces a hard mobile Lighthouse budget. Observability wiring must keep SDKs and the DI container out of the render path:
src/services/observability/ (no tsyringe, no @injectable()) that the
render path imports; (b) a thin @injectable() ObservabilityService adapter (behind a DI
token) used only by the service layer (ErrorHandler, ApolloLinkFactory, AuthStoreActions).@sentry/react and web-vitals only via dynamic import() gated on
REACT_APP_SENTRY_DSN being non-empty. Rsbuild still emits them as separate async
chunks, but an empty DSN (dev, CI, Lighthouse) is a verified no-op: those chunks are
never fetched or executed at runtime, so no SDK code runs and no telemetry network
requests are made.@sentry/react or tsyringe into anything the auth page renders.Jest coverage is "loaded-files-only" but global 100% is enforced per suite. Observability files must reach 100% in both the unit and the integration suite:
dependency-injection-config, which transitively
module-evals the whole observability tree, so those files are loaded and subject to the gate.@sentry/react,
web-vitals) and resolve the service via the DI container. Do not mirror collaborator-mocked
unit tests into integration — that is a coverage dodge.A key-only Sentry beforeSend scrubber misses error strings that echo PII. Deep-walk the
entire event:
event.exception, event.message, event.breadcrumbs, and all nested values.sendDefaultPii: false in the Sentry init options.rust-code-analysis hard-fails on per-file function counts:
nom_functions_file > 10 (named methods per file).nom_total_file > 15 (methods plus closures per file).Adding a helper method or a .catch(() => {}) closure can tip a class over the limit. Extract
to a separate file or drop a closure — never skip or suppress.
dependency-cruiser enforces no-feature-ui-to-services:
src/modules/*/features/*/components|hooks|routes must not import src/services/*.utils/ bridge module (utils may import
services), not directly from a component, hook, or route.make test-unit-client
make lint
Use browser verification for runtime-only telemetry paths when unit tests cannot prove the integration.
Before applying this skill, confirm the active task against ../AI-AGENT-GUIDE.md and ../SKILL-DECISION-GUIDE.md so every relevant skill is consulted.
Before presenting changes, check changed text files for lines longer than 100 characters.
If any exist, tell the user each path:line and measured character count.
Treat this as disclosure, not failure, unless a project gate fails.