@cubis/foundry 0.3.71 → 0.3.73
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +23 -2
- package/dist/cli/core.js +9 -22
- package/dist/cli/core.js.map +1 -1
- package/package.json +1 -1
- package/src/cli/core.ts +13 -22
- package/workflows/powers/accessibility/POWER.md +83 -94
- package/workflows/powers/accessibility/SKILL.md +82 -94
- package/workflows/powers/agent-design/POWER.md +201 -0
- package/workflows/powers/agent-design/SKILL.md +198 -0
- package/workflows/powers/agent-design/references/clarification-patterns.md +153 -0
- package/workflows/powers/agent-design/references/skill-testing.md +164 -0
- package/workflows/powers/agent-design/references/workflow-patterns.md +226 -0
- package/workflows/powers/agentic-eval/POWER.md +62 -0
- package/workflows/powers/agentic-eval/SKILL.md +59 -0
- package/workflows/powers/agentic-eval/references/rubric-and-regression-checklist.md +11 -0
- package/workflows/powers/api-designer/POWER.md +43 -71
- package/workflows/powers/api-designer/SKILL.md +43 -71
- package/workflows/powers/api-patterns/POWER.md +42 -56
- package/workflows/powers/api-patterns/SKILL.md +42 -57
- package/workflows/powers/architecture-designer/POWER.md +43 -60
- package/workflows/powers/architecture-designer/SKILL.md +43 -60
- package/workflows/powers/ask-questions-if-underspecified/POWER.md +51 -3
- package/workflows/powers/auth-architect/POWER.md +69 -0
- package/workflows/powers/auth-architect/SKILL.md +66 -0
- package/workflows/powers/auth-architect/references/session-token-policy-checklist.md +45 -0
- package/workflows/powers/behavioral-modes/POWER.md +100 -9
- package/workflows/powers/c-pro/POWER.md +105 -0
- package/workflows/powers/c-pro/SKILL.md +102 -0
- package/workflows/powers/c-pro/references/build-systems-and-toolchains.md +148 -0
- package/workflows/powers/c-pro/references/common-ub-and-portability.md +166 -0
- package/workflows/powers/c-pro/references/debugging-with-sanitizers.md +205 -0
- package/workflows/powers/c-pro/references/memory-safety-and-build-checklist.md +60 -0
- package/workflows/powers/c-pro/references/posix-and-platform-apis.md +244 -0
- package/workflows/powers/changelog-generator/POWER.md +127 -63
- package/workflows/powers/changelog-generator/SKILL.md +126 -63
- package/workflows/powers/ci-cd-pipelines/POWER.md +156 -0
- package/workflows/powers/ci-cd-pipelines/SKILL.md +153 -0
- package/workflows/powers/ci-cd-pipelines/references/github-actions-patterns.md +160 -0
- package/workflows/powers/ci-cd-pipelines/references/pipeline-security-checklist.md +57 -0
- package/workflows/powers/cli-developer/POWER.md +152 -95
- package/workflows/powers/cli-developer/SKILL.md +152 -95
- package/workflows/powers/cpp-pro/POWER.md +111 -0
- package/workflows/powers/cpp-pro/SKILL.md +108 -0
- package/workflows/powers/cpp-pro/references/concurrency-primitives.md +266 -0
- package/workflows/powers/cpp-pro/references/move-semantics-and-value-types.md +149 -0
- package/workflows/powers/cpp-pro/references/performance-and-profiling.md +191 -0
- package/workflows/powers/cpp-pro/references/raii-and-modern-cpp-checklist.md +87 -0
- package/workflows/powers/cpp-pro/references/template-and-concepts-patterns.md +205 -0
- package/workflows/powers/csharp-pro/POWER.md +47 -22
- package/workflows/powers/csharp-pro/SKILL.md +47 -22
- package/workflows/powers/dart-pro/POWER.md +68 -0
- package/workflows/powers/dart-pro/SKILL.md +65 -0
- package/workflows/powers/dart-pro/references/isolate-and-concurrency.md +180 -0
- package/workflows/powers/dart-pro/references/null-safety-and-async-patterns.md +133 -0
- package/workflows/powers/dart-pro/references/package-structure-and-linting.md +193 -0
- package/workflows/powers/dart-pro/references/sealed-records-patterns.md +173 -0
- package/workflows/powers/dart-pro/references/testing-and-mocking.md +235 -0
- package/workflows/powers/database-design/POWER.md +47 -33
- package/workflows/powers/database-design/SKILL.md +47 -33
- package/workflows/powers/database-optimizer/POWER.md +43 -64
- package/workflows/powers/database-optimizer/SKILL.md +43 -64
- package/workflows/powers/database-skills/POWER.md +59 -93
- package/workflows/powers/database-skills/SKILL.md +59 -93
- package/workflows/powers/debugging-strategies/POWER.md +69 -0
- package/workflows/powers/debugging-strategies/SKILL.md +66 -0
- package/workflows/powers/debugging-strategies/references/reproduce-isolate-verify-checklist.md +42 -0
- package/workflows/powers/deep-research/POWER.md +67 -0
- package/workflows/powers/deep-research/SKILL.md +64 -0
- package/workflows/powers/deep-research/references/multi-round-research-loop.md +80 -0
- package/workflows/powers/design-system-builder/POWER.md +130 -116
- package/workflows/powers/design-system-builder/SKILL.md +130 -116
- package/workflows/powers/devops-engineer/POWER.md +120 -57
- package/workflows/powers/devops-engineer/SKILL.md +120 -57
- package/workflows/powers/docker-kubernetes/POWER.md +94 -0
- package/workflows/powers/docker-kubernetes/SKILL.md +91 -0
- package/workflows/powers/docker-kubernetes/references/dockerfile-optimization-checklist.md +35 -0
- package/workflows/powers/docker-kubernetes/references/kubernetes-deployment-patterns.md +59 -0
- package/workflows/powers/documentation-templates/POWER.md +158 -127
- package/workflows/powers/documentation-templates/SKILL.md +158 -127
- package/workflows/powers/drizzle-expert/POWER.md +66 -0
- package/workflows/powers/drizzle-expert/SKILL.md +63 -0
- package/workflows/powers/drizzle-expert/references/runtime-pairing-matrix.md +16 -0
- package/workflows/powers/drizzle-expert/references/schema-and-migration-playbook.md +18 -0
- package/workflows/powers/error-ux-observability/POWER.md +144 -131
- package/workflows/powers/error-ux-observability/SKILL.md +143 -131
- package/workflows/powers/fastapi-expert/POWER.md +46 -60
- package/workflows/powers/fastapi-expert/SKILL.md +46 -60
- package/workflows/powers/firebase/POWER.md +65 -0
- package/workflows/powers/firebase/SKILL.md +62 -0
- package/workflows/powers/firebase/references/platform-routing.md +16 -0
- package/workflows/powers/firebase/references/rules-and-indexes-checklist.md +11 -0
- package/workflows/powers/flutter-design-system/POWER.md +63 -0
- package/workflows/powers/flutter-design-system/SKILL.md +60 -0
- package/workflows/powers/flutter-design-system/references/shared-widgets.md +29 -0
- package/workflows/powers/flutter-design-system/references/tokens-and-theme.md +34 -0
- package/workflows/powers/flutter-drift/POWER.md +65 -0
- package/workflows/powers/flutter-drift/SKILL.md +62 -0
- package/workflows/powers/flutter-drift/references/migrations.md +22 -0
- package/workflows/powers/flutter-drift/references/query-patterns.md +26 -0
- package/workflows/powers/flutter-feature/POWER.md +65 -0
- package/workflows/powers/flutter-feature/SKILL.md +62 -0
- package/workflows/powers/flutter-feature/references/architecture-rules.md +85 -0
- package/workflows/powers/flutter-feature/references/composite-provider.md +58 -0
- package/workflows/powers/flutter-feature/references/outbox-pattern.md +87 -0
- package/workflows/powers/flutter-feature/references/testing-patterns.md +218 -0
- package/workflows/powers/flutter-go-router/POWER.md +64 -0
- package/workflows/powers/flutter-go-router/SKILL.md +61 -0
- package/workflows/powers/flutter-go-router/references/guards-and-deeplinks.md +20 -0
- package/workflows/powers/flutter-go-router/references/typed-routes.md +27 -0
- package/workflows/powers/flutter-offline-sync/POWER.md +62 -0
- package/workflows/powers/flutter-offline-sync/SKILL.md +59 -0
- package/workflows/powers/flutter-offline-sync/references/outbox-full.md +44 -0
- package/workflows/powers/flutter-repository/POWER.md +64 -0
- package/workflows/powers/flutter-repository/SKILL.md +61 -0
- package/workflows/powers/flutter-repository/references/drift-patterns.md +21 -0
- package/workflows/powers/flutter-repository/references/retrofit-patterns.md +20 -0
- package/workflows/powers/flutter-riverpod/POWER.md +70 -0
- package/workflows/powers/flutter-riverpod/SKILL.md +67 -0
- package/workflows/powers/flutter-riverpod/references/async-and-mutations.md +19 -0
- package/workflows/powers/flutter-riverpod/references/async-lifecycle.md +19 -0
- package/workflows/powers/flutter-riverpod/references/provider-selection.md +20 -0
- package/workflows/powers/flutter-riverpod/references/testing.md +21 -0
- package/workflows/powers/flutter-riverpod/references/version-matrix.md +24 -0
- package/workflows/powers/flutter-state-machine/POWER.md +62 -0
- package/workflows/powers/flutter-state-machine/SKILL.md +59 -0
- package/workflows/powers/flutter-state-machine/references/app-state-contract.md +23 -0
- package/workflows/powers/flutter-state-machine/references/ui-rendering.md +14 -0
- package/workflows/powers/flutter-testing/POWER.md +64 -0
- package/workflows/powers/flutter-testing/SKILL.md +61 -0
- package/workflows/powers/flutter-testing/references/offline-sync-tests.md +16 -0
- package/workflows/powers/flutter-testing/references/test-layers.md +33 -0
- package/workflows/powers/frontend-code-review/POWER.md +137 -0
- package/workflows/powers/frontend-code-review/SKILL.md +134 -0
- package/workflows/powers/frontend-code-review/references/common-antipatterns.md +86 -0
- package/workflows/powers/frontend-code-review/references/performance-budgets.md +56 -0
- package/workflows/powers/frontend-code-review/references/review-checklists.md +47 -0
- package/workflows/powers/frontend-design/POWER.md +163 -362
- package/workflows/powers/frontend-design/SKILL.md +163 -362
- package/workflows/powers/game-development/POWER.md +57 -140
- package/workflows/powers/game-development/SKILL.md +57 -140
- package/workflows/powers/geo-fundamentals/POWER.md +64 -126
- package/workflows/powers/geo-fundamentals/SKILL.md +64 -127
- package/workflows/powers/git-workflow/POWER.md +135 -0
- package/workflows/powers/git-workflow/SKILL.md +132 -0
- package/workflows/powers/git-workflow/references/pr-review-checklist.md +63 -0
- package/workflows/powers/golang-pro/POWER.md +46 -35
- package/workflows/powers/golang-pro/SKILL.md +46 -35
- package/workflows/powers/graphql-architect/POWER.md +44 -62
- package/workflows/powers/graphql-architect/SKILL.md +44 -62
- package/workflows/powers/i18n-localization/POWER.md +118 -103
- package/workflows/powers/i18n-localization/SKILL.md +118 -103
- package/workflows/powers/java-pro/POWER.md +47 -22
- package/workflows/powers/java-pro/SKILL.md +47 -22
- package/workflows/powers/javascript-pro/POWER.md +47 -34
- package/workflows/powers/javascript-pro/SKILL.md +47 -34
- package/workflows/powers/kotlin-pro/POWER.md +46 -23
- package/workflows/powers/kotlin-pro/SKILL.md +46 -23
- package/workflows/powers/legacy-modernizer/POWER.md +43 -60
- package/workflows/powers/legacy-modernizer/SKILL.md +43 -60
- package/workflows/powers/mcp-builder/POWER.md +65 -0
- package/workflows/powers/mcp-builder/SKILL.md +62 -0
- package/workflows/powers/mcp-builder/references/testing-and-evals.md +17 -0
- package/workflows/powers/mcp-builder/references/transport-and-tool-design.md +17 -0
- package/workflows/powers/microservices-architect/POWER.md +43 -70
- package/workflows/powers/microservices-architect/SKILL.md +43 -70
- package/workflows/powers/mobile-design/POWER.md +110 -345
- package/workflows/powers/mobile-design/SKILL.md +110 -345
- package/workflows/powers/mongodb/POWER.md +67 -0
- package/workflows/powers/mongodb/SKILL.md +64 -0
- package/workflows/powers/mongodb/references/mongodb-checklist.md +20 -0
- package/workflows/powers/mysql/POWER.md +67 -0
- package/workflows/powers/mysql/SKILL.md +64 -0
- package/workflows/powers/mysql/references/mysql-checklist.md +20 -0
- package/workflows/powers/neki/POWER.md +67 -0
- package/workflows/powers/neki/SKILL.md +64 -0
- package/workflows/powers/neki/references/neki-checklist.md +18 -0
- package/workflows/powers/nestjs-expert/POWER.md +45 -91
- package/workflows/powers/nestjs-expert/SKILL.md +45 -91
- package/workflows/powers/nextjs-developer/POWER.md +51 -44
- package/workflows/powers/nextjs-developer/SKILL.md +51 -44
- package/workflows/powers/nodejs-best-practices/POWER.md +48 -29
- package/workflows/powers/nodejs-best-practices/SKILL.md +48 -29
- package/workflows/powers/observability/POWER.md +109 -0
- package/workflows/powers/observability/SKILL.md +106 -0
- package/workflows/powers/observability/references/alerting-and-slo-checklist.md +87 -0
- package/workflows/powers/observability/references/opentelemetry-setup-guide.md +121 -0
- package/workflows/powers/openai-docs/POWER.md +61 -0
- package/workflows/powers/openai-docs/SKILL.md +58 -0
- package/workflows/powers/openai-docs/references/official-source-playbook.md +10 -0
- package/workflows/powers/performance-profiling/POWER.md +61 -114
- package/workflows/powers/performance-profiling/SKILL.md +61 -114
- package/workflows/powers/php-pro/POWER.md +116 -0
- package/workflows/powers/php-pro/SKILL.md +113 -0
- package/workflows/powers/php-pro/references/architecture-and-di.md +239 -0
- package/workflows/powers/php-pro/references/modern-php-features.md +189 -0
- package/workflows/powers/php-pro/references/performance-and-deployment.md +197 -0
- package/workflows/powers/php-pro/references/php84-strict-typing-checklist.md +161 -0
- package/workflows/powers/php-pro/references/testing-and-static-analysis.md +235 -0
- package/workflows/powers/playwright-e2e/POWER.md +85 -0
- package/workflows/powers/playwright-e2e/SKILL.md +82 -0
- package/workflows/powers/playwright-e2e/references/locator-trace-flake-checklist.md +80 -0
- package/workflows/powers/postgres/POWER.md +67 -0
- package/workflows/powers/postgres/SKILL.md +64 -0
- package/workflows/powers/postgres/references/postgres-checklist.md +20 -0
- package/workflows/powers/prompt-engineer/POWER.md +47 -30
- package/workflows/powers/prompt-engineer/SKILL.md +47 -30
- package/workflows/powers/python-pro/POWER.md +47 -36
- package/workflows/powers/python-pro/SKILL.md +47 -36
- package/workflows/powers/react-best-practices/POWER.md +56 -33
- package/workflows/powers/react-best-practices/SKILL.md +56 -33
- package/workflows/powers/react-expert/POWER.md +47 -37
- package/workflows/powers/react-expert/SKILL.md +47 -37
- package/workflows/powers/redis/POWER.md +67 -0
- package/workflows/powers/redis/SKILL.md +64 -0
- package/workflows/powers/redis/references/redis-checklist.md +19 -0
- package/workflows/powers/ruby-pro/POWER.md +118 -0
- package/workflows/powers/ruby-pro/SKILL.md +115 -0
- package/workflows/powers/ruby-pro/references/modern-ruby-features.md +189 -0
- package/workflows/powers/ruby-pro/references/object-design-patterns.md +220 -0
- package/workflows/powers/ruby-pro/references/performance-and-profiling.md +224 -0
- package/workflows/powers/ruby-pro/references/ruby-concurrency-and-testing.md +190 -0
- package/workflows/powers/ruby-pro/references/testing-and-rspec.md +236 -0
- package/workflows/powers/rust-pro/POWER.md +45 -31
- package/workflows/powers/rust-pro/SKILL.md +45 -31
- package/workflows/powers/security-engineer/POWER.md +129 -0
- package/workflows/powers/security-engineer/SKILL.md +126 -0
- package/workflows/powers/seo-fundamentals/POWER.md +59 -102
- package/workflows/powers/seo-fundamentals/SKILL.md +59 -102
- package/workflows/powers/serverless-patterns/POWER.md +171 -0
- package/workflows/powers/serverless-patterns/SKILL.md +168 -0
- package/workflows/powers/skill-creator/POWER.md +90 -0
- package/workflows/powers/skill-creator/SKILL.md +87 -0
- package/workflows/powers/skill-creator/references/platform-formats.md +181 -0
- package/workflows/powers/skill-creator/references/schemas.md +430 -0
- package/workflows/powers/spec-miner/POWER.md +49 -57
- package/workflows/powers/spec-miner/SKILL.md +49 -57
- package/workflows/powers/sqlite/POWER.md +67 -0
- package/workflows/powers/sqlite/SKILL.md +64 -0
- package/workflows/powers/sqlite/references/sqlite-checklist.md +19 -0
- package/workflows/powers/sre-engineer/POWER.md +123 -64
- package/workflows/powers/sre-engineer/SKILL.md +123 -64
- package/workflows/powers/static-analysis/POWER.md +121 -77
- package/workflows/powers/static-analysis/SKILL.md +121 -77
- package/workflows/powers/stripe-best-practices/POWER.md +140 -17
- package/workflows/powers/stripe-best-practices/SKILL.md +139 -17
- package/workflows/powers/supabase/POWER.md +67 -0
- package/workflows/powers/supabase/SKILL.md +64 -0
- package/workflows/powers/supabase/references/supabase-checklist.md +19 -0
- package/workflows/powers/swift-pro/POWER.md +118 -0
- package/workflows/powers/swift-pro/SKILL.md +115 -0
- package/workflows/powers/swift-pro/references/concurrency-patterns.md +165 -0
- package/workflows/powers/swift-pro/references/protocol-and-generics.md +172 -0
- package/workflows/powers/swift-pro/references/sendable-and-isolation.md +116 -0
- package/workflows/powers/swift-pro/references/swift-concurrency-and-protocols.md +260 -0
- package/workflows/powers/swift-pro/references/testing-and-packages.md +192 -0
- package/workflows/powers/tailwind-patterns/POWER.md +71 -240
- package/workflows/powers/tailwind-patterns/SKILL.md +71 -240
- package/workflows/powers/testing-patterns/POWER.md +155 -10
- package/workflows/powers/testing-patterns/SKILL.md +155 -10
- package/workflows/powers/typescript-pro/POWER.md +47 -38
- package/workflows/powers/typescript-pro/SKILL.md +47 -38
- package/workflows/powers/vitess/POWER.md +67 -0
- package/workflows/powers/vitess/SKILL.md +64 -0
- package/workflows/powers/vitess/references/vitess-checklist.md +19 -0
- package/workflows/powers/vulnerability-scanner/POWER.md +146 -10
- package/workflows/powers/vulnerability-scanner/SKILL.md +146 -10
- package/workflows/powers/web-perf/POWER.md +43 -170
- package/workflows/powers/web-perf/SKILL.md +43 -170
- package/workflows/powers/webapp-testing/POWER.md +43 -164
- package/workflows/powers/webapp-testing/SKILL.md +43 -164
- package/workflows/workflows/agent-environment-setup/platforms/antigravity/rules/GEMINI.md +65 -42
- package/workflows/workflows/agent-environment-setup/platforms/claude/rules/CLAUDE.md +8 -6
- package/workflows/workflows/agent-environment-setup/platforms/codex/rules/AGENTS.md +65 -41
- package/workflows/workflows/agent-environment-setup/platforms/copilot/rules/copilot-instructions.md +8 -6
- package/workflows/workflows/agent-environment-setup/shared/rules/STEERING.md +9 -8
- package/workflows/workflows/agent-environment-setup/shared/rules/overrides/codex.md +1 -1
|
@@ -1,62 +1,69 @@
|
|
|
1
1
|
````markdown
|
|
2
2
|
---
|
|
3
3
|
inclusion: manual
|
|
4
|
-
name:
|
|
5
|
-
|
|
6
|
-
description: "Use for implementing/refactoring Next.js App Router features, React Server Components/Actions, SEO, and production architecture."
|
|
4
|
+
name: nextjs-developer
|
|
5
|
+
description: "Use for implementing and reviewing Next.js App Router features, React Server Components and Actions, caching strategy, SEO, and production runtime behavior."
|
|
7
6
|
license: MIT
|
|
8
7
|
metadata:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
stack: "nextjs"
|
|
13
|
-
baseline: "Next.js 16 + React 19"
|
|
8
|
+
author: cubis-foundry
|
|
9
|
+
version: "3.0"
|
|
10
|
+
compatibility: Claude Code, Codex, GitHub Copilot
|
|
14
11
|
---
|
|
15
12
|
|
|
16
13
|
# Next.js Developer
|
|
17
14
|
|
|
18
|
-
##
|
|
15
|
+
## Purpose
|
|
19
16
|
|
|
20
|
-
|
|
21
|
-
- Not for version migration playbooks (`next-upgrade`) or cache-components-only tuning (`next-cache-components`).
|
|
17
|
+
Use for implementing and reviewing Next.js App Router features, React Server Components and Actions, caching strategy, SEO, and production runtime behavior.
|
|
22
18
|
|
|
23
|
-
## When to
|
|
19
|
+
## When to Use
|
|
24
20
|
|
|
25
|
-
- Building routes
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
- Improving
|
|
21
|
+
- Building or refactoring App Router routes, layouts, loading states, and errors.
|
|
22
|
+
- Choosing static, dynamic, or streaming rendering behavior per route.
|
|
23
|
+
- Implementing React Server Components, Server Actions, and cache invalidation.
|
|
24
|
+
- Improving metadata, structured data, and Core Web Vitals in a Next app.
|
|
29
25
|
|
|
30
|
-
##
|
|
26
|
+
## Instructions
|
|
31
27
|
|
|
32
|
-
1.
|
|
33
|
-
2. Keep server
|
|
34
|
-
3.
|
|
35
|
-
4. Add
|
|
36
|
-
5. Verify
|
|
28
|
+
1. Decide rendering mode and data boundary per route.
|
|
29
|
+
2. Keep server and client components separated by necessity, not habit.
|
|
30
|
+
3. Use caching and invalidation intentionally rather than globally.
|
|
31
|
+
4. Add route-level loading, error, and auth-sensitive behavior explicitly.
|
|
32
|
+
5. Verify SEO, accessibility, and runtime performance before shipping.
|
|
37
33
|
|
|
38
|
-
|
|
34
|
+
### Baseline standards
|
|
39
35
|
|
|
40
|
-
- Default to Server Components
|
|
36
|
+
- Default to Server Components and opt into client components deliberately.
|
|
41
37
|
- Keep server-only code out of client bundles.
|
|
42
|
-
- Use route-level loading
|
|
43
|
-
-
|
|
44
|
-
- Measure
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
-
|
|
49
|
-
-
|
|
50
|
-
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
38
|
+
- Use route-level loading and error states.
|
|
39
|
+
- Prefer targeted revalidation over broad cache busting.
|
|
40
|
+
- Measure Web Vitals after changes that affect rendering or data flow.
|
|
41
|
+
|
|
42
|
+
### Constraints
|
|
43
|
+
|
|
44
|
+
- Avoid unnecessary client hydration.
|
|
45
|
+
- Avoid mixing secret or auth-sensitive logic into client paths.
|
|
46
|
+
- Avoid global revalidation when route- or tag-scoped invalidation is enough.
|
|
47
|
+
- Avoid framework-heavy decisions without checking the underlying React boundary first.
|
|
48
|
+
|
|
49
|
+
## Output Format
|
|
50
|
+
|
|
51
|
+
Provide implementation guidance, code examples, and configuration as appropriate to the task.
|
|
52
|
+
|
|
53
|
+
## References
|
|
54
|
+
|
|
55
|
+
Load on demand. Do not preload all reference files.
|
|
56
|
+
|
|
57
|
+
| File | Load when |
|
|
58
|
+
| --- | --- |
|
|
59
|
+
| `references/app-router-cache-playbook.md` | The task needs route-level guidance for App Router rendering, caching, revalidation, metadata, and server/client boundaries. |
|
|
60
|
+
|
|
61
|
+
## Scripts
|
|
62
|
+
|
|
63
|
+
No helper scripts are required for this skill right now. Keep execution in `SKILL.md` and `references/` unless repeated automation becomes necessary.
|
|
64
|
+
|
|
65
|
+
## Examples
|
|
66
|
+
|
|
67
|
+
- "Help me with nextjs developer best practices in this project"
|
|
68
|
+
- "Review my nextjs developer implementation for issues"
|
|
62
69
|
````
|
|
@@ -1,59 +1,66 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
3
|
-
|
|
4
|
-
description: "Use for implementing/refactoring Next.js App Router features, React Server Components/Actions, SEO, and production architecture."
|
|
2
|
+
name: nextjs-developer
|
|
3
|
+
description: "Use for implementing and reviewing Next.js App Router features, React Server Components and Actions, caching strategy, SEO, and production runtime behavior."
|
|
5
4
|
license: MIT
|
|
6
5
|
metadata:
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
stack: "nextjs"
|
|
11
|
-
baseline: "Next.js 16 + React 19"
|
|
6
|
+
author: cubis-foundry
|
|
7
|
+
version: "3.0"
|
|
8
|
+
compatibility: Claude Code, Codex, GitHub Copilot
|
|
12
9
|
---
|
|
13
10
|
|
|
14
11
|
# Next.js Developer
|
|
15
12
|
|
|
16
|
-
##
|
|
13
|
+
## Purpose
|
|
17
14
|
|
|
18
|
-
|
|
19
|
-
- Not for version migration playbooks (`next-upgrade`) or cache-components-only tuning (`next-cache-components`).
|
|
15
|
+
Use for implementing and reviewing Next.js App Router features, React Server Components and Actions, caching strategy, SEO, and production runtime behavior.
|
|
20
16
|
|
|
21
|
-
## When to
|
|
17
|
+
## When to Use
|
|
22
18
|
|
|
23
|
-
- Building routes
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
- Improving
|
|
19
|
+
- Building or refactoring App Router routes, layouts, loading states, and errors.
|
|
20
|
+
- Choosing static, dynamic, or streaming rendering behavior per route.
|
|
21
|
+
- Implementing React Server Components, Server Actions, and cache invalidation.
|
|
22
|
+
- Improving metadata, structured data, and Core Web Vitals in a Next app.
|
|
27
23
|
|
|
28
|
-
##
|
|
24
|
+
## Instructions
|
|
29
25
|
|
|
30
|
-
1.
|
|
31
|
-
2. Keep server
|
|
32
|
-
3.
|
|
33
|
-
4. Add
|
|
34
|
-
5. Verify
|
|
26
|
+
1. Decide rendering mode and data boundary per route.
|
|
27
|
+
2. Keep server and client components separated by necessity, not habit.
|
|
28
|
+
3. Use caching and invalidation intentionally rather than globally.
|
|
29
|
+
4. Add route-level loading, error, and auth-sensitive behavior explicitly.
|
|
30
|
+
5. Verify SEO, accessibility, and runtime performance before shipping.
|
|
35
31
|
|
|
36
|
-
|
|
32
|
+
### Baseline standards
|
|
37
33
|
|
|
38
|
-
- Default to Server Components
|
|
34
|
+
- Default to Server Components and opt into client components deliberately.
|
|
39
35
|
- Keep server-only code out of client bundles.
|
|
40
|
-
- Use route-level loading
|
|
41
|
-
-
|
|
42
|
-
- Measure
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
-
|
|
47
|
-
-
|
|
48
|
-
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
36
|
+
- Use route-level loading and error states.
|
|
37
|
+
- Prefer targeted revalidation over broad cache busting.
|
|
38
|
+
- Measure Web Vitals after changes that affect rendering or data flow.
|
|
39
|
+
|
|
40
|
+
### Constraints
|
|
41
|
+
|
|
42
|
+
- Avoid unnecessary client hydration.
|
|
43
|
+
- Avoid mixing secret or auth-sensitive logic into client paths.
|
|
44
|
+
- Avoid global revalidation when route- or tag-scoped invalidation is enough.
|
|
45
|
+
- Avoid framework-heavy decisions without checking the underlying React boundary first.
|
|
46
|
+
|
|
47
|
+
## Output Format
|
|
48
|
+
|
|
49
|
+
Provide implementation guidance, code examples, and configuration as appropriate to the task.
|
|
50
|
+
|
|
51
|
+
## References
|
|
52
|
+
|
|
53
|
+
Load on demand. Do not preload all reference files.
|
|
54
|
+
|
|
55
|
+
| File | Load when |
|
|
56
|
+
| --- | --- |
|
|
57
|
+
| `references/app-router-cache-playbook.md` | The task needs route-level guidance for App Router rendering, caching, revalidation, metadata, and server/client boundaries. |
|
|
58
|
+
|
|
59
|
+
## Scripts
|
|
60
|
+
|
|
61
|
+
No helper scripts are required for this skill right now. Keep execution in `SKILL.md` and `references/` unless repeated automation becomes necessary.
|
|
62
|
+
|
|
63
|
+
## Examples
|
|
64
|
+
|
|
65
|
+
- "Help me with nextjs developer best practices in this project"
|
|
66
|
+
- "Review my nextjs developer implementation for issues"
|
|
@@ -1,52 +1,71 @@
|
|
|
1
1
|
````markdown
|
|
2
2
|
---
|
|
3
3
|
inclusion: manual
|
|
4
|
-
name:
|
|
5
|
-
description: "
|
|
4
|
+
name: nodejs-best-practices
|
|
5
|
+
description: "Use for modern Node.js backend architecture, runtime choices, worker or queue boundaries, edge-vs-server tradeoffs, reliability controls, and production-safe service implementation in the current LTS era."
|
|
6
6
|
license: MIT
|
|
7
7
|
metadata:
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
stack: "nodejs"
|
|
12
|
-
baseline: "Node 22/24 LTS era"
|
|
8
|
+
author: cubis-foundry
|
|
9
|
+
version: "3.0"
|
|
10
|
+
compatibility: Claude Code, Codex, GitHub Copilot
|
|
13
11
|
---
|
|
14
12
|
|
|
15
13
|
# Node.js Best Practices
|
|
16
14
|
|
|
17
15
|
## Purpose
|
|
18
16
|
|
|
19
|
-
Use
|
|
17
|
+
Use for modern Node.js backend architecture, runtime choices, worker or queue boundaries, edge-vs-server tradeoffs, reliability controls, and production-safe service implementation in the current LTS era.
|
|
20
18
|
|
|
21
|
-
##
|
|
19
|
+
## When to Use
|
|
22
20
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
21
|
+
- Choosing Node backend structure for APIs, workers, or service code.
|
|
22
|
+
- Making runtime, framework, validation, queue, and observability decisions.
|
|
23
|
+
- Hardening Node services for concurrency, deployment, and failure handling.
|
|
24
|
+
- Reviewing service code for event-loop safety, background work boundaries, and production behavior.
|
|
27
25
|
|
|
28
|
-
##
|
|
26
|
+
## Instructions
|
|
29
27
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
28
|
+
1. Confirm runtime context: container, serverless, edge, worker, queue consumer, or long-lived process.
|
|
29
|
+
2. Pick the smallest framework/runtime shape that fits latency, I/O profile, and deployment constraints.
|
|
30
|
+
3. Keep transport, business logic, persistence, and background execution boundaries explicit.
|
|
31
|
+
4. Add validation, timeout, retry, backpressure, and observability controls before shipping.
|
|
32
|
+
5. Verify graceful shutdown, health checks, worker behavior, and dependency failure handling.
|
|
35
33
|
|
|
36
|
-
|
|
34
|
+
### Baseline standards
|
|
37
35
|
|
|
38
|
-
-
|
|
39
|
-
- Use least-privilege credentials and secret rotation.
|
|
36
|
+
- Prefer typed boundaries and explicit schema validation.
|
|
40
37
|
- Avoid blocking the event loop in request paths.
|
|
41
|
-
-
|
|
38
|
+
- Use workers or queues when CPU-heavy or long-lived background work would distort request latency.
|
|
39
|
+
- Add correlation IDs and consistent error envelopes.
|
|
40
|
+
- Use graceful shutdown and readiness probes.
|
|
41
|
+
- Measure CPU, heap, and I/O hot paths before optimizing.
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
### Constraints
|
|
44
44
|
|
|
45
|
-
-
|
|
46
|
-
-
|
|
47
|
-
-
|
|
45
|
+
- Avoid framework-by-habit decisions.
|
|
46
|
+
- Avoid hidden background work with no timeout or cancellation path.
|
|
47
|
+
- Avoid running CPU-bound work on the main event loop when workers or out-of-process jobs are needed.
|
|
48
|
+
- Avoid unbounded retries and silent downstream failures.
|
|
49
|
+
- Avoid secret handling or auth logic without explicit least-privilege boundaries.
|
|
48
50
|
|
|
49
|
-
## Output
|
|
51
|
+
## Output Format
|
|
50
52
|
|
|
51
|
-
|
|
53
|
+
Provide implementation guidance, code examples, and configuration as appropriate to the task.
|
|
54
|
+
|
|
55
|
+
## References
|
|
56
|
+
|
|
57
|
+
Load on demand. Do not preload all reference files.
|
|
58
|
+
|
|
59
|
+
| File | Load when |
|
|
60
|
+
| --- | --- |
|
|
61
|
+
| `references/runtime-reliability-checklist.md` | You need a deeper checklist for runtime choice, shutdown, workers or queues, edge-vs-server tradeoffs, validation, retries, observability, and production failure handling. |
|
|
62
|
+
|
|
63
|
+
## Scripts
|
|
64
|
+
|
|
65
|
+
No helper scripts are required for this skill right now. Keep execution in `SKILL.md` and `references/` unless repeated automation becomes necessary.
|
|
66
|
+
|
|
67
|
+
## Examples
|
|
68
|
+
|
|
69
|
+
- "Help me with nodejs best practices best practices in this project"
|
|
70
|
+
- "Review my nodejs best practices implementation for issues"
|
|
52
71
|
````
|
|
@@ -1,49 +1,68 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
3
|
-
description: "
|
|
2
|
+
name: nodejs-best-practices
|
|
3
|
+
description: "Use for modern Node.js backend architecture, runtime choices, worker or queue boundaries, edge-vs-server tradeoffs, reliability controls, and production-safe service implementation in the current LTS era."
|
|
4
4
|
license: MIT
|
|
5
5
|
metadata:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
stack: "nodejs"
|
|
10
|
-
baseline: "Node 22/24 LTS era"
|
|
6
|
+
author: cubis-foundry
|
|
7
|
+
version: "3.0"
|
|
8
|
+
compatibility: Claude Code, Codex, GitHub Copilot
|
|
11
9
|
---
|
|
12
10
|
|
|
13
11
|
# Node.js Best Practices
|
|
14
12
|
|
|
15
13
|
## Purpose
|
|
16
14
|
|
|
17
|
-
Use
|
|
15
|
+
Use for modern Node.js backend architecture, runtime choices, worker or queue boundaries, edge-vs-server tradeoffs, reliability controls, and production-safe service implementation in the current LTS era.
|
|
18
16
|
|
|
19
|
-
##
|
|
17
|
+
## When to Use
|
|
20
18
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
19
|
+
- Choosing Node backend structure for APIs, workers, or service code.
|
|
20
|
+
- Making runtime, framework, validation, queue, and observability decisions.
|
|
21
|
+
- Hardening Node services for concurrency, deployment, and failure handling.
|
|
22
|
+
- Reviewing service code for event-loop safety, background work boundaries, and production behavior.
|
|
25
23
|
|
|
26
|
-
##
|
|
24
|
+
## Instructions
|
|
27
25
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
26
|
+
1. Confirm runtime context: container, serverless, edge, worker, queue consumer, or long-lived process.
|
|
27
|
+
2. Pick the smallest framework/runtime shape that fits latency, I/O profile, and deployment constraints.
|
|
28
|
+
3. Keep transport, business logic, persistence, and background execution boundaries explicit.
|
|
29
|
+
4. Add validation, timeout, retry, backpressure, and observability controls before shipping.
|
|
30
|
+
5. Verify graceful shutdown, health checks, worker behavior, and dependency failure handling.
|
|
33
31
|
|
|
34
|
-
|
|
32
|
+
### Baseline standards
|
|
35
33
|
|
|
36
|
-
-
|
|
37
|
-
- Use least-privilege credentials and secret rotation.
|
|
34
|
+
- Prefer typed boundaries and explicit schema validation.
|
|
38
35
|
- Avoid blocking the event loop in request paths.
|
|
39
|
-
-
|
|
36
|
+
- Use workers or queues when CPU-heavy or long-lived background work would distort request latency.
|
|
37
|
+
- Add correlation IDs and consistent error envelopes.
|
|
38
|
+
- Use graceful shutdown and readiness probes.
|
|
39
|
+
- Measure CPU, heap, and I/O hot paths before optimizing.
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
### Constraints
|
|
42
42
|
|
|
43
|
-
-
|
|
44
|
-
-
|
|
45
|
-
-
|
|
43
|
+
- Avoid framework-by-habit decisions.
|
|
44
|
+
- Avoid hidden background work with no timeout or cancellation path.
|
|
45
|
+
- Avoid running CPU-bound work on the main event loop when workers or out-of-process jobs are needed.
|
|
46
|
+
- Avoid unbounded retries and silent downstream failures.
|
|
47
|
+
- Avoid secret handling or auth logic without explicit least-privilege boundaries.
|
|
46
48
|
|
|
47
|
-
## Output
|
|
49
|
+
## Output Format
|
|
48
50
|
|
|
49
|
-
|
|
51
|
+
Provide implementation guidance, code examples, and configuration as appropriate to the task.
|
|
52
|
+
|
|
53
|
+
## References
|
|
54
|
+
|
|
55
|
+
Load on demand. Do not preload all reference files.
|
|
56
|
+
|
|
57
|
+
| File | Load when |
|
|
58
|
+
| --- | --- |
|
|
59
|
+
| `references/runtime-reliability-checklist.md` | You need a deeper checklist for runtime choice, shutdown, workers or queues, edge-vs-server tradeoffs, validation, retries, observability, and production failure handling. |
|
|
60
|
+
|
|
61
|
+
## Scripts
|
|
62
|
+
|
|
63
|
+
No helper scripts are required for this skill right now. Keep execution in `SKILL.md` and `references/` unless repeated automation becomes necessary.
|
|
64
|
+
|
|
65
|
+
## Examples
|
|
66
|
+
|
|
67
|
+
- "Help me with nodejs best practices best practices in this project"
|
|
68
|
+
- "Review my nodejs best practices implementation for issues"
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
````markdown
|
|
2
|
+
---
|
|
3
|
+
inclusion: manual
|
|
4
|
+
name: observability
|
|
5
|
+
description: "Use when designing or reviewing logging, monitoring, tracing, and alerting for production services. Covers structured logging, distributed tracing, metric collection, dashboard design, alert hygiene, SLO definition, and incident readiness across application and infrastructure layers."
|
|
6
|
+
license: MIT
|
|
7
|
+
metadata:
|
|
8
|
+
author: cubis-foundry
|
|
9
|
+
version: "1.0"
|
|
10
|
+
compatibility: Claude Code, Codex, GitHub Copilot
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Observability
|
|
14
|
+
|
|
15
|
+
## Purpose
|
|
16
|
+
|
|
17
|
+
Use when designing or reviewing logging, monitoring, tracing, and alerting for production services. Covers structured logging, distributed tracing, metric collection, dashboard design, alert hygiene, SLO definition, and incident readiness across application and infrastructure layers.
|
|
18
|
+
|
|
19
|
+
## When to Use
|
|
20
|
+
|
|
21
|
+
- Working on observability related tasks
|
|
22
|
+
|
|
23
|
+
## Instructions
|
|
24
|
+
|
|
25
|
+
1. **Define SLOs first** — decide what "healthy" means before instrumenting. SLOs drive alerting, not the other way around.
|
|
26
|
+
2. **Instrument the golden signals** — latency, traffic, errors, saturation. Every service must expose these four.
|
|
27
|
+
3. **Structured logging** — JSON to stdout. Include request ID, user context, operation name, and outcome. Never log secrets or PII.
|
|
28
|
+
4. **Distributed tracing** — propagate trace context across service boundaries. Instrument entry points, database calls, and external API calls.
|
|
29
|
+
5. **Alert on symptoms, not causes** — alert on SLO burn rate, not on CPU percentage. Alerts must be actionable.
|
|
30
|
+
|
|
31
|
+
### Three pillars
|
|
32
|
+
|
|
33
|
+
### Logs
|
|
34
|
+
|
|
35
|
+
- Write structured JSON logs to stdout/stderr. Let the platform handle collection.
|
|
36
|
+
- Include: timestamp (ISO 8601), level, service name, trace ID, span ID, message, and relevant context fields.
|
|
37
|
+
- Log levels: ERROR for failures requiring attention, WARN for degraded but functional, INFO for key business events, DEBUG for development only (disabled in production).
|
|
38
|
+
- Never log: passwords, tokens, credit card numbers, PII, or full request/response bodies in production.
|
|
39
|
+
- Correlation: every log line must include the request/trace ID for cross-referencing with traces and metrics.
|
|
40
|
+
|
|
41
|
+
### Metrics
|
|
42
|
+
|
|
43
|
+
- Use RED method for request-driven services: Rate, Errors, Duration.
|
|
44
|
+
- Use USE method for resources: Utilization, Saturation, Errors.
|
|
45
|
+
- Histogram for latency (not averages — p50/p95/p99 matter).
|
|
46
|
+
- Counter for request counts, error counts, and throughput.
|
|
47
|
+
- Gauge for current state (queue depth, active connections, cache size).
|
|
48
|
+
- Label cardinality: keep label values bounded. Never use user IDs or request IDs as metric labels.
|
|
49
|
+
|
|
50
|
+
### Traces
|
|
51
|
+
|
|
52
|
+
- Use OpenTelemetry SDK for instrumentation — vendor-neutral, industry standard.
|
|
53
|
+
- Auto-instrument HTTP clients, database drivers, and message consumers.
|
|
54
|
+
- Add custom spans for significant business operations.
|
|
55
|
+
- Propagate W3C Trace Context headers across all service boundaries.
|
|
56
|
+
- Sample appropriately: 100% for errors, tail-sampled for high-volume happy paths.
|
|
57
|
+
|
|
58
|
+
### SLO design
|
|
59
|
+
|
|
60
|
+
- Define SLIs (Service Level Indicators) from the user's perspective — e.g., "percentage of requests completing in under 200ms."
|
|
61
|
+
- Set SLOs at realistic targets — 99.9% is very different from 99.99%.
|
|
62
|
+
- Calculate error budget: `1 - SLO target`. When budget is consumed, prioritize reliability over features.
|
|
63
|
+
- Review SLOs quarterly. Adjust based on actual user impact data.
|
|
64
|
+
|
|
65
|
+
### Alerting hygiene
|
|
66
|
+
|
|
67
|
+
- Every alert must have: a clear title, expected impact, runbook link, and escalation path.
|
|
68
|
+
- Use multi-window burn rate alerts for SLO-based alerting.
|
|
69
|
+
- Suppress alerts during maintenance windows.
|
|
70
|
+
- Page only for user-facing impact. Use tickets for slow-burn degradation.
|
|
71
|
+
- Review alert fatigue monthly. If an alert fires more than weekly without action, fix or remove it.
|
|
72
|
+
|
|
73
|
+
### Dashboard design
|
|
74
|
+
|
|
75
|
+
- Start with a service overview dashboard: golden signals, SLO status, recent deployments.
|
|
76
|
+
- Use consistent time ranges and refresh intervals across dashboards.
|
|
77
|
+
- Top-to-bottom layout: high-level health → request flow → resource utilization → dependencies.
|
|
78
|
+
- Every graph must have: title, unit, and a brief description of what abnormal looks like.
|
|
79
|
+
- Avoid vanity dashboards — every panel must answer a question someone would ask during an incident.
|
|
80
|
+
|
|
81
|
+
### Constraints
|
|
82
|
+
|
|
83
|
+
- Avoid logging at DEBUG level in production — volume overwhelms analysis.
|
|
84
|
+
- Avoid high-cardinality metric labels (user ID, IP address, full URL path).
|
|
85
|
+
- Avoid alert on every error — alert on error rate exceeding SLO budget.
|
|
86
|
+
- Avoid dashboard sprawl — ten dashboards nobody checks are worse than two good ones.
|
|
87
|
+
- Avoid instrumenting everything with traces — sample and focus on critical paths.
|
|
88
|
+
- Avoid using averages instead of percentiles for latency metrics.
|
|
89
|
+
|
|
90
|
+
## Output Format
|
|
91
|
+
|
|
92
|
+
Provide implementation guidance, code examples, and configuration as appropriate to the task.
|
|
93
|
+
|
|
94
|
+
## References
|
|
95
|
+
|
|
96
|
+
| File | Purpose |
|
|
97
|
+
| ------------------------------------------ | ----------------------------------------------------------------------------------------------- |
|
|
98
|
+
| `references/opentelemetry-setup-guide.md` | OTel SDK setup, auto-instrumentation, exporter configuration, and sampling strategy. |
|
|
99
|
+
| `references/alerting-and-slo-checklist.md` | SLO definition template, burn-rate alert formulas, runbook structure, and alert review process. |
|
|
100
|
+
|
|
101
|
+
## Scripts
|
|
102
|
+
|
|
103
|
+
No helper scripts are required for this skill right now. Keep execution in `SKILL.md` and `references/` unless repeated automation becomes necessary.
|
|
104
|
+
|
|
105
|
+
## Examples
|
|
106
|
+
|
|
107
|
+
- "Help me with observability best practices in this project"
|
|
108
|
+
- "Review my observability implementation for issues"
|
|
109
|
+
````
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: observability
|
|
3
|
+
description: "Use when designing or reviewing logging, monitoring, tracing, and alerting for production services. Covers structured logging, distributed tracing, metric collection, dashboard design, alert hygiene, SLO definition, and incident readiness across application and infrastructure layers."
|
|
4
|
+
license: MIT
|
|
5
|
+
metadata:
|
|
6
|
+
author: cubis-foundry
|
|
7
|
+
version: "1.0"
|
|
8
|
+
compatibility: Claude Code, Codex, GitHub Copilot
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Observability
|
|
12
|
+
|
|
13
|
+
## Purpose
|
|
14
|
+
|
|
15
|
+
Use when designing or reviewing logging, monitoring, tracing, and alerting for production services. Covers structured logging, distributed tracing, metric collection, dashboard design, alert hygiene, SLO definition, and incident readiness across application and infrastructure layers.
|
|
16
|
+
|
|
17
|
+
## When to Use
|
|
18
|
+
|
|
19
|
+
- Working on observability related tasks
|
|
20
|
+
|
|
21
|
+
## Instructions
|
|
22
|
+
|
|
23
|
+
1. **Define SLOs first** — decide what "healthy" means before instrumenting. SLOs drive alerting, not the other way around.
|
|
24
|
+
2. **Instrument the golden signals** — latency, traffic, errors, saturation. Every service must expose these four.
|
|
25
|
+
3. **Structured logging** — JSON to stdout. Include request ID, user context, operation name, and outcome. Never log secrets or PII.
|
|
26
|
+
4. **Distributed tracing** — propagate trace context across service boundaries. Instrument entry points, database calls, and external API calls.
|
|
27
|
+
5. **Alert on symptoms, not causes** — alert on SLO burn rate, not on CPU percentage. Alerts must be actionable.
|
|
28
|
+
|
|
29
|
+
### Three pillars
|
|
30
|
+
|
|
31
|
+
### Logs
|
|
32
|
+
|
|
33
|
+
- Write structured JSON logs to stdout/stderr. Let the platform handle collection.
|
|
34
|
+
- Include: timestamp (ISO 8601), level, service name, trace ID, span ID, message, and relevant context fields.
|
|
35
|
+
- Log levels: ERROR for failures requiring attention, WARN for degraded but functional, INFO for key business events, DEBUG for development only (disabled in production).
|
|
36
|
+
- Never log: passwords, tokens, credit card numbers, PII, or full request/response bodies in production.
|
|
37
|
+
- Correlation: every log line must include the request/trace ID for cross-referencing with traces and metrics.
|
|
38
|
+
|
|
39
|
+
### Metrics
|
|
40
|
+
|
|
41
|
+
- Use RED method for request-driven services: Rate, Errors, Duration.
|
|
42
|
+
- Use USE method for resources: Utilization, Saturation, Errors.
|
|
43
|
+
- Histogram for latency (not averages — p50/p95/p99 matter).
|
|
44
|
+
- Counter for request counts, error counts, and throughput.
|
|
45
|
+
- Gauge for current state (queue depth, active connections, cache size).
|
|
46
|
+
- Label cardinality: keep label values bounded. Never use user IDs or request IDs as metric labels.
|
|
47
|
+
|
|
48
|
+
### Traces
|
|
49
|
+
|
|
50
|
+
- Use OpenTelemetry SDK for instrumentation — vendor-neutral, industry standard.
|
|
51
|
+
- Auto-instrument HTTP clients, database drivers, and message consumers.
|
|
52
|
+
- Add custom spans for significant business operations.
|
|
53
|
+
- Propagate W3C Trace Context headers across all service boundaries.
|
|
54
|
+
- Sample appropriately: 100% for errors, tail-sampled for high-volume happy paths.
|
|
55
|
+
|
|
56
|
+
### SLO design
|
|
57
|
+
|
|
58
|
+
- Define SLIs (Service Level Indicators) from the user's perspective — e.g., "percentage of requests completing in under 200ms."
|
|
59
|
+
- Set SLOs at realistic targets — 99.9% is very different from 99.99%.
|
|
60
|
+
- Calculate error budget: `1 - SLO target`. When budget is consumed, prioritize reliability over features.
|
|
61
|
+
- Review SLOs quarterly. Adjust based on actual user impact data.
|
|
62
|
+
|
|
63
|
+
### Alerting hygiene
|
|
64
|
+
|
|
65
|
+
- Every alert must have: a clear title, expected impact, runbook link, and escalation path.
|
|
66
|
+
- Use multi-window burn rate alerts for SLO-based alerting.
|
|
67
|
+
- Suppress alerts during maintenance windows.
|
|
68
|
+
- Page only for user-facing impact. Use tickets for slow-burn degradation.
|
|
69
|
+
- Review alert fatigue monthly. If an alert fires more than weekly without action, fix or remove it.
|
|
70
|
+
|
|
71
|
+
### Dashboard design
|
|
72
|
+
|
|
73
|
+
- Start with a service overview dashboard: golden signals, SLO status, recent deployments.
|
|
74
|
+
- Use consistent time ranges and refresh intervals across dashboards.
|
|
75
|
+
- Top-to-bottom layout: high-level health → request flow → resource utilization → dependencies.
|
|
76
|
+
- Every graph must have: title, unit, and a brief description of what abnormal looks like.
|
|
77
|
+
- Avoid vanity dashboards — every panel must answer a question someone would ask during an incident.
|
|
78
|
+
|
|
79
|
+
### Constraints
|
|
80
|
+
|
|
81
|
+
- Avoid logging at DEBUG level in production — volume overwhelms analysis.
|
|
82
|
+
- Avoid high-cardinality metric labels (user ID, IP address, full URL path).
|
|
83
|
+
- Avoid alert on every error — alert on error rate exceeding SLO budget.
|
|
84
|
+
- Avoid dashboard sprawl — ten dashboards nobody checks are worse than two good ones.
|
|
85
|
+
- Avoid instrumenting everything with traces — sample and focus on critical paths.
|
|
86
|
+
- Avoid using averages instead of percentiles for latency metrics.
|
|
87
|
+
|
|
88
|
+
## Output Format
|
|
89
|
+
|
|
90
|
+
Provide implementation guidance, code examples, and configuration as appropriate to the task.
|
|
91
|
+
|
|
92
|
+
## References
|
|
93
|
+
|
|
94
|
+
| File | Purpose |
|
|
95
|
+
| ------------------------------------------ | ----------------------------------------------------------------------------------------------- |
|
|
96
|
+
| `references/opentelemetry-setup-guide.md` | OTel SDK setup, auto-instrumentation, exporter configuration, and sampling strategy. |
|
|
97
|
+
| `references/alerting-and-slo-checklist.md` | SLO definition template, burn-rate alert formulas, runbook structure, and alert review process. |
|
|
98
|
+
|
|
99
|
+
## Scripts
|
|
100
|
+
|
|
101
|
+
No helper scripts are required for this skill right now. Keep execution in `SKILL.md` and `references/` unless repeated automation becomes necessary.
|
|
102
|
+
|
|
103
|
+
## Examples
|
|
104
|
+
|
|
105
|
+
- "Help me with observability best practices in this project"
|
|
106
|
+
- "Review my observability implementation for issues"
|