@cubis/foundry 0.3.71 → 0.3.72
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 +15 -0
- package/dist/cli/core.js +4 -18
- package/dist/cli/core.js.map +1 -1
- package/package.json +1 -1
- package/src/cli/core.ts +4 -18
- 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
|
@@ -1,87 +1,66 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
3
|
-
description: "Use for
|
|
2
|
+
name: database-optimizer
|
|
3
|
+
description: "Use for database performance triage across engines: query-plan analysis, indexing changes, wait and contention diagnosis, config tuning, and safe before/after validation."
|
|
4
|
+
license: MIT
|
|
5
|
+
metadata:
|
|
6
|
+
author: cubis-foundry
|
|
7
|
+
version: "3.0"
|
|
8
|
+
compatibility: Claude Code, Codex, GitHub Copilot
|
|
4
9
|
---
|
|
5
10
|
|
|
6
|
-
|
|
7
11
|
# Database Optimizer
|
|
8
12
|
|
|
9
|
-
##
|
|
10
|
-
|
|
11
|
-
Senior database optimizer with expertise in performance tuning, query optimization, and scalability across multiple database systems.
|
|
12
|
-
|
|
13
|
-
## Role Definition
|
|
14
|
-
|
|
15
|
-
You are a senior database performance engineer with 10+ years of experience optimizing high-traffic databases. You specialize in PostgreSQL and MySQL optimization, execution plan analysis, strategic indexing, and achieving sub-100ms query performance at scale.
|
|
16
|
-
|
|
17
|
-
## When to Use This Skill
|
|
13
|
+
## Purpose
|
|
18
14
|
|
|
19
|
-
-
|
|
20
|
-
- Designing optimal index strategies
|
|
21
|
-
- Tuning database configuration parameters
|
|
22
|
-
- Optimizing schema design and partitioning
|
|
23
|
-
- Reducing lock contention and deadlocks
|
|
24
|
-
- Improving cache hit rates and memory usage
|
|
15
|
+
Use for database performance triage across engines: query-plan analysis, indexing changes, wait and contention diagnosis, config tuning, and safe before/after validation.
|
|
25
16
|
|
|
26
|
-
##
|
|
17
|
+
## When to Use
|
|
27
18
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
5. **Validate Results** - Measure improvements, ensure stability, document changes
|
|
19
|
+
- Investigating slow queries, bad plans, lock contention, or throughput collapse.
|
|
20
|
+
- Choosing targeted indexing or query-shape fixes.
|
|
21
|
+
- Deciding whether the bottleneck is query logic, schema, config, or concurrency.
|
|
22
|
+
- Validating performance changes with before/after evidence.
|
|
33
23
|
|
|
34
|
-
##
|
|
24
|
+
## Instructions
|
|
35
25
|
|
|
36
|
-
|
|
26
|
+
1. Establish the real symptom with timings, plans, waits, or metrics.
|
|
27
|
+
2. Identify whether the bottleneck is query shape, indexing, contention, config, or workload pattern.
|
|
28
|
+
3. Choose the smallest safe optimization with explicit tradeoffs.
|
|
29
|
+
4. Apply one high-signal change at a time when isolating a root cause.
|
|
30
|
+
5. Re-measure and report whether the change actually improved the bottleneck.
|
|
37
31
|
|
|
38
|
-
|
|
39
|
-
| --------------------- | --------------------------------- | --------------------------------------- |
|
|
40
|
-
| Query Optimization | `references/query-optimization.md` | Analyzing slow queries, execution plans |
|
|
41
|
-
| Index Strategies | `references/index-strategies.md` | Designing indexes, covering indexes |
|
|
42
|
-
| PostgreSQL Tuning | `references/postgresql-tuning.md` | PostgreSQL-specific optimizations |
|
|
43
|
-
| MySQL Tuning | `references/mysql-tuning.md` | MySQL-specific optimizations |
|
|
44
|
-
| Monitoring & Analysis | `references/monitoring-analysis.md` | Performance metrics, diagnostics |
|
|
32
|
+
### Baseline standards
|
|
45
33
|
|
|
46
|
-
|
|
34
|
+
- Explain before optimizing.
|
|
35
|
+
- Measure before and after every proposed change.
|
|
36
|
+
- Account for write amplification and operational cost of indexes.
|
|
37
|
+
- Include rollback and monitoring in the optimization plan.
|
|
38
|
+
- Prefer correctness and predictable operations over benchmark vanity.
|
|
47
39
|
|
|
48
|
-
###
|
|
40
|
+
### Constraints
|
|
49
41
|
|
|
50
|
-
-
|
|
51
|
-
-
|
|
52
|
-
-
|
|
53
|
-
-
|
|
54
|
-
- Document all optimization decisions
|
|
55
|
-
- Monitor impact on write performance
|
|
56
|
-
- Consider replication lag for distributed systems
|
|
42
|
+
- Avoid blind config churn.
|
|
43
|
+
- Avoid index additions without real predicate evidence.
|
|
44
|
+
- Avoid query rewrites that ignore semantics or maintenance cost.
|
|
45
|
+
- Avoid treating every slowdown as a single-query problem.
|
|
57
46
|
|
|
58
|
-
|
|
47
|
+
## Output Format
|
|
59
48
|
|
|
60
|
-
|
|
61
|
-
- Create redundant or unused indexes
|
|
62
|
-
- Skip execution plan analysis
|
|
63
|
-
- Ignore write performance impact
|
|
64
|
-
- Make multiple changes simultaneously
|
|
65
|
-
- Optimize without understanding query patterns
|
|
66
|
-
- Neglect statistics updates (ANALYZE/VACUUM)
|
|
49
|
+
Provide implementation guidance, code examples, and configuration as appropriate to the task.
|
|
67
50
|
|
|
68
|
-
##
|
|
51
|
+
## References
|
|
69
52
|
|
|
70
|
-
|
|
53
|
+
Load on demand. Do not preload all reference files.
|
|
71
54
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
4. Implementation SQL/config changes
|
|
76
|
-
5. Validation queries to measure improvement
|
|
77
|
-
6. Monitoring recommendations
|
|
55
|
+
| File | Load when |
|
|
56
|
+
| --- | --- |
|
|
57
|
+
| `references/query-triage-checklist.md` | You need a deeper performance triage checklist for plans, waits, index tradeoffs, rollback, and before/after evidence. |
|
|
78
58
|
|
|
79
|
-
##
|
|
59
|
+
## Scripts
|
|
80
60
|
|
|
81
|
-
|
|
61
|
+
No helper scripts are required for this skill right now. Keep execution in `SKILL.md` and `references/` unless repeated automation becomes necessary.
|
|
82
62
|
|
|
83
|
-
##
|
|
63
|
+
## Examples
|
|
84
64
|
|
|
85
|
-
-
|
|
86
|
-
-
|
|
87
|
-
- **Data Engineer** - ETL and analytical query optimization
|
|
65
|
+
- "Help me with database optimizer best practices in this project"
|
|
66
|
+
- "Review my database optimizer implementation for issues"
|
|
@@ -2,104 +2,70 @@
|
|
|
2
2
|
---
|
|
3
3
|
inclusion: manual
|
|
4
4
|
name: database-skills
|
|
5
|
-
description:
|
|
6
|
-
|
|
5
|
+
description: "Use as the primary database hub for engine or platform choice, schema-vs-tuning routing, access-layer triage, migration safety framing, and database task triage before deeper engine, platform, or ORM specialists."
|
|
6
|
+
license: MIT
|
|
7
7
|
metadata:
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
author: cubis-foundry
|
|
9
|
+
version: "3.0"
|
|
10
|
+
compatibility: Claude Code, Codex, GitHub Copilot
|
|
11
11
|
---
|
|
12
12
|
|
|
13
|
-
# Database Skills
|
|
13
|
+
# Database Skills
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
## Purpose
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
Use as the primary database hub for engine or platform choice, schema-vs-tuning routing, access-layer triage, migration safety framing, and database task triage before deeper engine, platform, or ORM specialists.
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
## When to Use
|
|
20
|
+
|
|
21
|
+
- Choosing the right database path before implementation dives deep.
|
|
22
|
+
- Routing a task toward schema design, optimization, or engine-specific work.
|
|
23
|
+
- Planning migrations, indexing, query behavior, and operational safety at a high level.
|
|
24
|
+
- Reviewing whether a data problem is really engine choice, schema shape, or query behavior.
|
|
25
|
+
|
|
26
|
+
## Instructions
|
|
27
|
+
|
|
28
|
+
1. Clarify workload shape, consistency needs, scale, and operational model.
|
|
29
|
+
2. Decide whether the task is engine choice, schema design, or performance triage.
|
|
30
|
+
3. Choose the narrowest next specialist: `database-design` or `database-optimizer`.
|
|
31
|
+
4. Keep migration risk, rollback, and blast radius visible from the start.
|
|
32
|
+
5. Escalate to the exact engine or platform specialist only when it is known and materially affects the decision: `postgres`, `mysql`, `sqlite`, `mongodb`, `redis`, `supabase`, `firebase`, `vitess`, or `neki`.
|
|
33
|
+
6. Add `drizzle-expert` only when the TypeScript access layer or drizzle-kit workflow is the real decision surface.
|
|
34
|
+
|
|
35
|
+
### Baseline standards
|
|
36
|
+
|
|
37
|
+
- Pick storage shape from workload and operations, not preference alone.
|
|
38
|
+
- Treat indexes, migrations, and rollback as first-class design inputs.
|
|
39
|
+
- Separate schema questions from tuning questions.
|
|
40
|
+
- Load engine-specific guidance only when platform behavior or managed-product constraints actually matter.
|
|
41
|
+
- Prefer evidence before recommending a new engine or data model.
|
|
42
|
+
- Keep data safety and operational reversibility explicit.
|
|
43
|
+
|
|
44
|
+
### Constraints
|
|
45
|
+
|
|
46
|
+
- Avoid treating every database issue as a query-optimization problem.
|
|
47
|
+
- Avoid recommending engine changes with no workload evidence.
|
|
48
|
+
- Avoid planning destructive schema changes without rollback.
|
|
49
|
+
- Avoid mixing schema design and tuning advice into one vague answer.
|
|
50
|
+
|
|
51
|
+
## Output Format
|
|
52
|
+
|
|
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 |
|
|
20
60
|
| --- | --- |
|
|
21
|
-
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
```
|
|
32
|
-
skills/
|
|
33
|
-
postgres/
|
|
34
|
-
SKILL.md
|
|
35
|
-
references/
|
|
36
|
-
schema-indexing.md ← index types, composite, partial, INCLUDE
|
|
37
|
-
performance-ops.md ← EXPLAIN, pg_stat_statements, VACUUM, autovacuum
|
|
38
|
-
migrations.md ← zero-downtime DDL, expand/contract, tools
|
|
39
|
-
connection-pooling.md ← PgBouncer, pool sizing, serverless patterns
|
|
40
|
-
|
|
41
|
-
mysql/
|
|
42
|
-
SKILL.md
|
|
43
|
-
references/
|
|
44
|
-
query-indexing.md ← EXPLAIN, composite indexes, covering, seek pagination
|
|
45
|
-
locking-ddl.md ← INSTANT/INPLACE/COPY, MDL, gh-ost, deadlocks
|
|
46
|
-
replication.md ← binlog formats, GTID, lag monitoring, read routing
|
|
47
|
-
|
|
48
|
-
vitess/
|
|
49
|
-
SKILL.md
|
|
50
|
-
references/
|
|
51
|
-
sharding-routing.md ← VSchema, vindexes, sequences, scatter queries
|
|
52
|
-
operational-safety.md ← Online DDL strategies, migration lifecycle, VReplication
|
|
53
|
-
|
|
54
|
-
neki/
|
|
55
|
-
SKILL.md
|
|
56
|
-
references/
|
|
57
|
-
architecture.md ← sharded Postgres architecture, pre-sharding checklist
|
|
58
|
-
operations.md ← migration planning, validation, provisional pre-GA guidance
|
|
59
|
-
|
|
60
|
-
mongodb/
|
|
61
|
-
SKILL.md
|
|
62
|
-
references/
|
|
63
|
-
modeling.md ← embed vs reference, compound indexes, explain(), pagination
|
|
64
|
-
mongoose-nestjs.md ← repository pattern, lean reads, transactions, NestJS setup
|
|
65
|
-
aggregation.md ← pipeline stages, $group, $lookup, $facet, performance
|
|
66
|
-
|
|
67
|
-
sqlite/
|
|
68
|
-
SKILL.md
|
|
69
|
-
references/
|
|
70
|
-
local-first.md ← WAL mode, migration patterns, sync/conflict strategies
|
|
71
|
-
performance.md ← EXPLAIN QUERY PLAN, indexes, batch writes, checkpoint tuning
|
|
72
|
-
|
|
73
|
-
supabase/
|
|
74
|
-
SKILL.md
|
|
75
|
-
references/
|
|
76
|
-
rls-auth.md ← RLS policies, auth.uid(), index predicates, service_role
|
|
77
|
-
performance-operations.md ← query optimization, connection modes, pooler selection
|
|
78
|
-
|
|
79
|
-
redis/
|
|
80
|
-
SKILL.md
|
|
81
|
-
references/
|
|
82
|
-
data-modeling.md ← data structure selection, key naming, TTL strategy
|
|
83
|
-
cache-patterns.md ← pipelining, SCAN, rate limiting, leaderboards, invalidation
|
|
84
|
-
operations.md ← memory management, eviction policies, latency diagnostics
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
## Required flow
|
|
88
|
-
|
|
89
|
-
1. Read `LATEST_VERSIONS.md` before proposing version-specific behavior.
|
|
90
|
-
2. Use engine selection table above to pick the target engine.
|
|
91
|
-
3. Load the target engine `SKILL.md` and relevant `references/*` files — read the ones that match the task (indexing, migrations, replication, etc.).
|
|
92
|
-
4. Provide an optimization or implementation plan that includes:
|
|
93
|
-
- specific change with rationale,
|
|
94
|
-
- indexing or schema decisions,
|
|
95
|
-
- migration safety (online vs offline),
|
|
96
|
-
- rollback path.
|
|
97
|
-
5. For production-impacting changes, include blast-radius assessment and rollout stages.
|
|
98
|
-
|
|
99
|
-
## Cross-engine performance checklist
|
|
100
|
-
|
|
101
|
-
- **Indexing**: add indexes only for real predicates and sort patterns. Drop unused indexes — they penalize writes.
|
|
102
|
-
- **Pagination**: prefer keyset/seek for deep or high-throughput pagination. Reserve offset for shallow interactive pages only.
|
|
103
|
-
- **Measurement**: compare before/after plans with engine-native explain tooling (`EXPLAIN ANALYZE`, `VEXPLAIN`, `explain()`). Validate with realistic cardinality.
|
|
104
|
-
- **Safety**: no destructive data/schema operations without explicit user confirmation. Always include rollback/recovery steps.
|
|
61
|
+
| `references/engine-selection-and-routing.md` | You need a sharper routing aid for engine choice, escalation into schema vs tuning, and when to load exact engine specialists. |
|
|
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 database skills best practices in this project"
|
|
70
|
+
- "Review my database skills implementation for issues"
|
|
105
71
|
````
|
|
@@ -1,102 +1,68 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: database-skills
|
|
3
|
-
description:
|
|
4
|
-
|
|
3
|
+
description: "Use as the primary database hub for engine or platform choice, schema-vs-tuning routing, access-layer triage, migration safety framing, and database task triage before deeper engine, platform, or ORM specialists."
|
|
4
|
+
license: MIT
|
|
5
5
|
metadata:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
author: cubis-foundry
|
|
7
|
+
version: "3.0"
|
|
8
|
+
compatibility: Claude Code, Codex, GitHub Copilot
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
# Database Skills
|
|
11
|
+
# Database Skills
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
## Purpose
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
Use as the primary database hub for engine or platform choice, schema-vs-tuning routing, access-layer triage, migration safety framing, and database task triage before deeper engine, platform, or ORM specialists.
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
## When to Use
|
|
18
|
+
|
|
19
|
+
- Choosing the right database path before implementation dives deep.
|
|
20
|
+
- Routing a task toward schema design, optimization, or engine-specific work.
|
|
21
|
+
- Planning migrations, indexing, query behavior, and operational safety at a high level.
|
|
22
|
+
- Reviewing whether a data problem is really engine choice, schema shape, or query behavior.
|
|
23
|
+
|
|
24
|
+
## Instructions
|
|
25
|
+
|
|
26
|
+
1. Clarify workload shape, consistency needs, scale, and operational model.
|
|
27
|
+
2. Decide whether the task is engine choice, schema design, or performance triage.
|
|
28
|
+
3. Choose the narrowest next specialist: `database-design` or `database-optimizer`.
|
|
29
|
+
4. Keep migration risk, rollback, and blast radius visible from the start.
|
|
30
|
+
5. Escalate to the exact engine or platform specialist only when it is known and materially affects the decision: `postgres`, `mysql`, `sqlite`, `mongodb`, `redis`, `supabase`, `firebase`, `vitess`, or `neki`.
|
|
31
|
+
6. Add `drizzle-expert` only when the TypeScript access layer or drizzle-kit workflow is the real decision surface.
|
|
32
|
+
|
|
33
|
+
### Baseline standards
|
|
34
|
+
|
|
35
|
+
- Pick storage shape from workload and operations, not preference alone.
|
|
36
|
+
- Treat indexes, migrations, and rollback as first-class design inputs.
|
|
37
|
+
- Separate schema questions from tuning questions.
|
|
38
|
+
- Load engine-specific guidance only when platform behavior or managed-product constraints actually matter.
|
|
39
|
+
- Prefer evidence before recommending a new engine or data model.
|
|
40
|
+
- Keep data safety and operational reversibility explicit.
|
|
41
|
+
|
|
42
|
+
### Constraints
|
|
43
|
+
|
|
44
|
+
- Avoid treating every database issue as a query-optimization problem.
|
|
45
|
+
- Avoid recommending engine changes with no workload evidence.
|
|
46
|
+
- Avoid planning destructive schema changes without rollback.
|
|
47
|
+
- Avoid mixing schema design and tuning advice into one vague answer.
|
|
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 |
|
|
18
58
|
| --- | --- |
|
|
19
|
-
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
```
|
|
30
|
-
skills/
|
|
31
|
-
postgres/
|
|
32
|
-
SKILL.md
|
|
33
|
-
references/
|
|
34
|
-
schema-indexing.md ← index types, composite, partial, INCLUDE
|
|
35
|
-
performance-ops.md ← EXPLAIN, pg_stat_statements, VACUUM, autovacuum
|
|
36
|
-
migrations.md ← zero-downtime DDL, expand/contract, tools
|
|
37
|
-
connection-pooling.md ← PgBouncer, pool sizing, serverless patterns
|
|
38
|
-
|
|
39
|
-
mysql/
|
|
40
|
-
SKILL.md
|
|
41
|
-
references/
|
|
42
|
-
query-indexing.md ← EXPLAIN, composite indexes, covering, seek pagination
|
|
43
|
-
locking-ddl.md ← INSTANT/INPLACE/COPY, MDL, gh-ost, deadlocks
|
|
44
|
-
replication.md ← binlog formats, GTID, lag monitoring, read routing
|
|
45
|
-
|
|
46
|
-
vitess/
|
|
47
|
-
SKILL.md
|
|
48
|
-
references/
|
|
49
|
-
sharding-routing.md ← VSchema, vindexes, sequences, scatter queries
|
|
50
|
-
operational-safety.md ← Online DDL strategies, migration lifecycle, VReplication
|
|
51
|
-
|
|
52
|
-
neki/
|
|
53
|
-
SKILL.md
|
|
54
|
-
references/
|
|
55
|
-
architecture.md ← sharded Postgres architecture, pre-sharding checklist
|
|
56
|
-
operations.md ← migration planning, validation, provisional pre-GA guidance
|
|
57
|
-
|
|
58
|
-
mongodb/
|
|
59
|
-
SKILL.md
|
|
60
|
-
references/
|
|
61
|
-
modeling.md ← embed vs reference, compound indexes, explain(), pagination
|
|
62
|
-
mongoose-nestjs.md ← repository pattern, lean reads, transactions, NestJS setup
|
|
63
|
-
aggregation.md ← pipeline stages, $group, $lookup, $facet, performance
|
|
64
|
-
|
|
65
|
-
sqlite/
|
|
66
|
-
SKILL.md
|
|
67
|
-
references/
|
|
68
|
-
local-first.md ← WAL mode, migration patterns, sync/conflict strategies
|
|
69
|
-
performance.md ← EXPLAIN QUERY PLAN, indexes, batch writes, checkpoint tuning
|
|
70
|
-
|
|
71
|
-
supabase/
|
|
72
|
-
SKILL.md
|
|
73
|
-
references/
|
|
74
|
-
rls-auth.md ← RLS policies, auth.uid(), index predicates, service_role
|
|
75
|
-
performance-operations.md ← query optimization, connection modes, pooler selection
|
|
76
|
-
|
|
77
|
-
redis/
|
|
78
|
-
SKILL.md
|
|
79
|
-
references/
|
|
80
|
-
data-modeling.md ← data structure selection, key naming, TTL strategy
|
|
81
|
-
cache-patterns.md ← pipelining, SCAN, rate limiting, leaderboards, invalidation
|
|
82
|
-
operations.md ← memory management, eviction policies, latency diagnostics
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
## Required flow
|
|
86
|
-
|
|
87
|
-
1. Read `LATEST_VERSIONS.md` before proposing version-specific behavior.
|
|
88
|
-
2. Use engine selection table above to pick the target engine.
|
|
89
|
-
3. Load the target engine `SKILL.md` and relevant `references/*` files — read the ones that match the task (indexing, migrations, replication, etc.).
|
|
90
|
-
4. Provide an optimization or implementation plan that includes:
|
|
91
|
-
- specific change with rationale,
|
|
92
|
-
- indexing or schema decisions,
|
|
93
|
-
- migration safety (online vs offline),
|
|
94
|
-
- rollback path.
|
|
95
|
-
5. For production-impacting changes, include blast-radius assessment and rollout stages.
|
|
96
|
-
|
|
97
|
-
## Cross-engine performance checklist
|
|
98
|
-
|
|
99
|
-
- **Indexing**: add indexes only for real predicates and sort patterns. Drop unused indexes — they penalize writes.
|
|
100
|
-
- **Pagination**: prefer keyset/seek for deep or high-throughput pagination. Reserve offset for shallow interactive pages only.
|
|
101
|
-
- **Measurement**: compare before/after plans with engine-native explain tooling (`EXPLAIN ANALYZE`, `VEXPLAIN`, `explain()`). Validate with realistic cardinality.
|
|
102
|
-
- **Safety**: no destructive data/schema operations without explicit user confirmation. Always include rollback/recovery steps.
|
|
59
|
+
| `references/engine-selection-and-routing.md` | You need a sharper routing aid for engine choice, escalation into schema vs tuning, and when to load exact engine specialists. |
|
|
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 database skills best practices in this project"
|
|
68
|
+
- "Review my database skills implementation for issues"
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
````markdown
|
|
2
|
+
---
|
|
3
|
+
inclusion: manual
|
|
4
|
+
name: debugging-strategies
|
|
5
|
+
description: "Use when isolating bugs, regressions, flaky tests, or cross-layer failures with an evidence-first reproduce, narrow, verify workflow."
|
|
6
|
+
license: MIT
|
|
7
|
+
metadata:
|
|
8
|
+
author: cubis-foundry
|
|
9
|
+
version: "1.0"
|
|
10
|
+
compatibility: Claude Code, Codex, GitHub Copilot
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Debugging Strategies
|
|
14
|
+
|
|
15
|
+
## Purpose
|
|
16
|
+
|
|
17
|
+
Use when isolating bugs, regressions, flaky tests, or cross-layer failures with an evidence-first reproduce, narrow, verify workflow.
|
|
18
|
+
|
|
19
|
+
## When to Use
|
|
20
|
+
|
|
21
|
+
- Reproducing and isolating a bug, regression, intermittent failure, or flaky test.
|
|
22
|
+
- Narrowing a problem that crosses frontend, backend, database, or deployment boundaries.
|
|
23
|
+
- Designing the smallest safe fix and the right regression proof.
|
|
24
|
+
- Turning vague failure reports into a concrete root-cause investigation plan.
|
|
25
|
+
|
|
26
|
+
## Instructions
|
|
27
|
+
|
|
28
|
+
1. Lock down reproduction steps and expected-versus-actual behavior before changing code.
|
|
29
|
+
2. Narrow the fault domain with logs, traces, feature flags, bisecting, or minimal reproductions.
|
|
30
|
+
3. Instrument only enough to prove the hypothesis.
|
|
31
|
+
4. Fix the smallest confirmed cause, not the loudest symptom.
|
|
32
|
+
5. Leave behind regression proof and a short explanation of why the bug existed.
|
|
33
|
+
|
|
34
|
+
### Baseline standards
|
|
35
|
+
|
|
36
|
+
- Prefer evidence over intuition and one-variable changes over bundle fixes.
|
|
37
|
+
- Separate symptom, trigger, root cause, and prevention.
|
|
38
|
+
- Use the strongest artifact available: trace, stack, query plan, diff, or deterministic reproduction.
|
|
39
|
+
- Check adjacent surfaces for the same class of bug after the first fix lands.
|
|
40
|
+
- Remove temporary debugging code once the regression proof exists.
|
|
41
|
+
|
|
42
|
+
### Constraints
|
|
43
|
+
|
|
44
|
+
- Avoid making multiple speculative changes before you can reproduce the issue.
|
|
45
|
+
- Avoid treating flaky behavior as random when a hidden dependency probably exists.
|
|
46
|
+
- Avoid patching over production bugs with retries or timeouts before understanding the failure.
|
|
47
|
+
- Avoid closing the bug without a clear verification path.
|
|
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/reproduce-isolate-verify-checklist.md` | You need a deeper checklist for reproduction, narrowing the fault domain, instrumenting safely, regression-proofing, or handling flaky and cross-layer failures. |
|
|
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 debugging strategies best practices in this project"
|
|
68
|
+
- "Review my debugging strategies implementation for issues"
|
|
69
|
+
````
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: debugging-strategies
|
|
3
|
+
description: "Use when isolating bugs, regressions, flaky tests, or cross-layer failures with an evidence-first reproduce, narrow, verify workflow."
|
|
4
|
+
license: MIT
|
|
5
|
+
metadata:
|
|
6
|
+
author: cubis-foundry
|
|
7
|
+
version: "1.0"
|
|
8
|
+
compatibility: Claude Code, Codex, GitHub Copilot
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Debugging Strategies
|
|
12
|
+
|
|
13
|
+
## Purpose
|
|
14
|
+
|
|
15
|
+
Use when isolating bugs, regressions, flaky tests, or cross-layer failures with an evidence-first reproduce, narrow, verify workflow.
|
|
16
|
+
|
|
17
|
+
## When to Use
|
|
18
|
+
|
|
19
|
+
- Reproducing and isolating a bug, regression, intermittent failure, or flaky test.
|
|
20
|
+
- Narrowing a problem that crosses frontend, backend, database, or deployment boundaries.
|
|
21
|
+
- Designing the smallest safe fix and the right regression proof.
|
|
22
|
+
- Turning vague failure reports into a concrete root-cause investigation plan.
|
|
23
|
+
|
|
24
|
+
## Instructions
|
|
25
|
+
|
|
26
|
+
1. Lock down reproduction steps and expected-versus-actual behavior before changing code.
|
|
27
|
+
2. Narrow the fault domain with logs, traces, feature flags, bisecting, or minimal reproductions.
|
|
28
|
+
3. Instrument only enough to prove the hypothesis.
|
|
29
|
+
4. Fix the smallest confirmed cause, not the loudest symptom.
|
|
30
|
+
5. Leave behind regression proof and a short explanation of why the bug existed.
|
|
31
|
+
|
|
32
|
+
### Baseline standards
|
|
33
|
+
|
|
34
|
+
- Prefer evidence over intuition and one-variable changes over bundle fixes.
|
|
35
|
+
- Separate symptom, trigger, root cause, and prevention.
|
|
36
|
+
- Use the strongest artifact available: trace, stack, query plan, diff, or deterministic reproduction.
|
|
37
|
+
- Check adjacent surfaces for the same class of bug after the first fix lands.
|
|
38
|
+
- Remove temporary debugging code once the regression proof exists.
|
|
39
|
+
|
|
40
|
+
### Constraints
|
|
41
|
+
|
|
42
|
+
- Avoid making multiple speculative changes before you can reproduce the issue.
|
|
43
|
+
- Avoid treating flaky behavior as random when a hidden dependency probably exists.
|
|
44
|
+
- Avoid patching over production bugs with retries or timeouts before understanding the failure.
|
|
45
|
+
- Avoid closing the bug without a clear verification path.
|
|
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/reproduce-isolate-verify-checklist.md` | You need a deeper checklist for reproduction, narrowing the fault domain, instrumenting safely, regression-proofing, or handling flaky and cross-layer failures. |
|
|
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 debugging strategies best practices in this project"
|
|
66
|
+
- "Review my debugging strategies implementation for issues"
|
package/workflows/powers/debugging-strategies/references/reproduce-isolate-verify-checklist.md
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Reproduce, Isolate, Verify Checklist
|
|
2
|
+
|
|
3
|
+
Use this when the bug is real but the shortest path to root cause is still unclear.
|
|
4
|
+
|
|
5
|
+
## Reproduce
|
|
6
|
+
|
|
7
|
+
- Capture exact steps, inputs, environment, and expected-versus-actual behavior.
|
|
8
|
+
- Determine whether the bug is:
|
|
9
|
+
- consistent
|
|
10
|
+
- data-dependent
|
|
11
|
+
- environment-specific
|
|
12
|
+
- time or concurrency sensitive
|
|
13
|
+
- Reduce the problem to the smallest reliable reproduction you can keep.
|
|
14
|
+
|
|
15
|
+
## Isolate
|
|
16
|
+
|
|
17
|
+
Move from broad to narrow:
|
|
18
|
+
|
|
19
|
+
1. which boundary fails first
|
|
20
|
+
2. which recent change could have shifted behavior
|
|
21
|
+
3. which artifact proves the branch is wrong
|
|
22
|
+
|
|
23
|
+
Useful tools by situation:
|
|
24
|
+
|
|
25
|
+
- browser trace or devtools for UI failures
|
|
26
|
+
- focused logs or request IDs for service failures
|
|
27
|
+
- query plans for data slowdowns
|
|
28
|
+
- `git bisect` for regressions with unknown starting points
|
|
29
|
+
- targeted tests for turning a manual reproduction into an automated one
|
|
30
|
+
|
|
31
|
+
## Hypothesis discipline
|
|
32
|
+
|
|
33
|
+
- Write down one likely cause at a time.
|
|
34
|
+
- Add the smallest instrumentation that can disprove it.
|
|
35
|
+
- Revert or remove exploratory logging once the cause is known.
|
|
36
|
+
|
|
37
|
+
## Fix and verify
|
|
38
|
+
|
|
39
|
+
- Fix the confirmed cause, not just the outer symptom.
|
|
40
|
+
- Add or update the smallest regression proof that would have caught it earlier.
|
|
41
|
+
- Recheck adjacent cases with similar state, timing, or data-shape assumptions.
|
|
42
|
+
- Record any residual risk if the full environment could not be reproduced locally.
|