@kensaurus/skills 0.0.0-stage → 2.1.0
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/.claude-plugin/marketplace.json +53 -0
- package/.claude-plugin/plugin.json +40 -0
- package/.cursor-plugin/plugin.json +38 -0
- package/.mcp.json +28 -0
- package/CHANGELOG.md +1790 -0
- package/LICENSE +21 -0
- package/LICENSE-APACHE +62 -0
- package/NOTICE +13 -0
- package/README.md +821 -2
- package/SECURITY.md +55 -0
- package/agents/code-reviewer.md +60 -0
- package/agents/completion-judge.md +89 -0
- package/agents/db-migrator.md +125 -0
- package/agents/debugger.md +47 -0
- package/agents/deploy-checker.md +100 -0
- package/agents/perf-monitor.md +74 -0
- package/assets/favicon.png +0 -0
- package/assets/logo-light.png +0 -0
- package/assets/logo.png +0 -0
- package/assets/logo.svg +6 -0
- package/assets/og.png +0 -0
- package/bin/install.mjs +1127 -0
- package/bin/kenji.js +2 -0
- package/commands/adr.md +17 -0
- package/commands/aeo-plan.md +18 -0
- package/commands/arch-boundaries.md +17 -0
- package/commands/aso-plan.md +18 -0
- package/commands/auth-flows.md +19 -0
- package/commands/backup-plan.md +17 -0
- package/commands/burndown-full.md +25 -0
- package/commands/capacitor-plan.md +18 -0
- package/commands/codemod-safety.md +22 -0
- package/commands/commit.md +18 -0
- package/commands/complete-everything.md +40 -0
- package/commands/cost-plan.md +19 -0
- package/commands/deadcode-plan.md +26 -0
- package/commands/deadcode.md +32 -0
- package/commands/debug-issue.md +17 -0
- package/commands/deps-plan.md +18 -0
- package/commands/docs-plan.md +17 -0
- package/commands/doctrine.md +19 -0
- package/commands/error-plan.md +19 -0
- package/commands/feedback-to-closure.md +36 -0
- package/commands/fix-issue.md +76 -0
- package/commands/gate-logic.md +26 -0
- package/commands/green-repo.md +36 -0
- package/commands/grill-me.md +19 -0
- package/commands/gtm-plan.md +21 -0
- package/commands/gtm-weekly.md +17 -0
- package/commands/gtm.md +22 -0
- package/commands/handoff.md +15 -0
- package/commands/housekeep-backlog.md +18 -0
- package/commands/housekeep-files.md +22 -0
- package/commands/housekeep-gates.md +18 -0
- package/commands/instant-nav.md +11 -0
- package/commands/integrity-plan.md +19 -0
- package/commands/launch-kit.md +16 -0
- package/commands/mcp-guide.md +40 -0
- package/commands/mobile-plan.md +19 -0
- package/commands/native-rn-monorepo/README.md +78 -0
- package/commands/native-rn-monorepo/android-build.md +26 -0
- package/commands/native-rn-monorepo/android-install.md +32 -0
- package/commands/native-rn-monorepo/android-logcat.md +37 -0
- package/commands/native-rn-monorepo/ios-ci-logs.md +56 -0
- package/commands/native-rn-monorepo/ios-ci-status.md +52 -0
- package/commands/native-rn-monorepo/ios-ci-trigger.md +59 -0
- package/commands/native-rn-monorepo/rn-reset.md +50 -0
- package/commands/native-rn-monorepo/rn-ship-ios.md +67 -0
- package/commands/native-rn-monorepo/rn-verify.md +53 -0
- package/commands/perf-plan.md +18 -0
- package/commands/plan-mode.md +74 -0
- package/commands/pr.md +16 -0
- package/commands/pricing-plan.md +20 -0
- package/commands/privacy-plan.md +18 -0
- package/commands/readability.md +12 -0
- package/commands/readme.md +15 -0
- package/commands/refactor.md +15 -0
- package/commands/release-prep.md +17 -0
- package/commands/research.md +25 -0
- package/commands/responsive-audit.md +21 -0
- package/commands/review-code.md +18 -0
- package/commands/rls-plan.md +18 -0
- package/commands/secrets-plan.md +18 -0
- package/commands/security-plan.md +19 -0
- package/commands/ship-and-observe.md +36 -0
- package/commands/skill-conflicts.md +19 -0
- package/commands/slop-plan.md +18 -0
- package/commands/stub-plan.md +18 -0
- package/commands/test-mutation.md +16 -0
- package/commands/test-plan.md +17 -0
- package/commands/test.md +29 -0
- package/commands/thirdparty-web-interface-guidelines.md +185 -0
- package/commands/uiux-plan.md +18 -0
- package/commands/uiux.md +45 -0
- package/commands/update-deps.md +21 -0
- package/commands/validation-plan.md +19 -0
- package/commands-portable/fix-issue.md +72 -0
- package/commands-portable/plan-mode.md +92 -0
- package/commands-portable/research.md +91 -0
- package/docs/screenshots/README.md +5 -0
- package/docs/screenshots/audit-dark.png +0 -0
- package/docs/screenshots/build-dark.png +0 -0
- package/docs/screenshots/grill-dark.png +0 -0
- package/docs/screenshots/hero-dark.png +0 -0
- package/docs/screenshots/hero-light.png +0 -0
- package/docs/screenshots/ship-dark.png +0 -0
- package/docs/screenshots/src/showcase.html +320 -0
- package/hooks/completion-gate.mjs +258 -0
- package/hooks/cursor-hooks.json +13 -0
- package/hooks/hooks.json +15 -0
- package/install.sh +21 -0
- package/llms.txt +40 -0
- package/mcp/README.md +266 -0
- package/mcp/VERSIONS.md +41 -0
- package/mcp/mcp-full.json.template +124 -0
- package/mcp/mcp.json.template +29 -0
- package/mcp/pinned-versions.json +27 -0
- package/package.json +94 -4
- package/rules/approved-plan-execution.mdc +65 -0
- package/rules/full-stack-ship-discipline.mdc +37 -0
- package/rules/native-rn-monorepo/README.md +63 -0
- package/rules/native-rn-monorepo/_project.mdc +69 -0
- package/rules/native-rn-monorepo/native-android.mdc +72 -0
- package/rules/native-rn-monorepo/native-ios.mdc +61 -0
- package/rules/native-rn-monorepo/react-native-js.mdc +78 -0
- package/rules/native-rn-monorepo/web.mdc +60 -0
- package/rules/project-starter/components.mdc +54 -0
- package/rules/project-starter/data-fetching.mdc +77 -0
- package/rules/project-starter/git.mdc +41 -0
- package/rules/project-starter/supabase.mdc +37 -0
- package/rules/project-starter/tailwind.mdc +48 -0
- package/rules/project-starter/typescript.mdc +36 -0
- package/rules/project-starter/web-performance.mdc +42 -0
- package/rules/senior-engineer.mdc +30 -0
- package/rules/shell-first-search.mdc +19 -0
- package/rules/skill-workflows.mdc +35 -0
- package/rules/verification-before-completion.mdc +57 -0
- package/skills/audit-accessibility/SKILL.md +441 -0
- package/skills/audit-agent-speed/SKILL.md +181 -0
- package/skills/audit-agent-speed/scripts/stop-typecheck.mjs +151 -0
- package/skills/audit-analytics/SKILL.md +138 -0
- package/skills/audit-auth-flows/SKILL.md +267 -0
- package/skills/audit-backend-architecture/SKILL.md +266 -0
- package/skills/audit-backend-architecture/references/patterns.md +386 -0
- package/skills/audit-bundle-size/SKILL.md +295 -0
- package/skills/audit-cicd/SKILL.md +218 -0
- package/skills/audit-code-quality/SKILL.md +314 -0
- package/skills/audit-code-review/SKILL.md +289 -0
- package/skills/audit-codemod-safety/SKILL.md +159 -0
- package/skills/audit-db-schema/SKILL.md +465 -0
- package/skills/audit-db-schema/references/details.md +110 -0
- package/skills/audit-doctrine/SKILL.md +189 -0
- package/skills/audit-env-parity/SKILL.md +133 -0
- package/skills/audit-fe-api/SKILL.md +458 -0
- package/skills/audit-gate-logic/SKILL.md +219 -0
- package/skills/audit-i18n/SKILL.md +339 -0
- package/skills/audit-infra-cost/SKILL.md +142 -0
- package/skills/audit-langfuse-llm/SKILL.md +468 -0
- package/skills/audit-langfuse-llm/references/details.md +226 -0
- package/skills/audit-llm-security/SKILL.md +147 -0
- package/skills/audit-monetization-iap/SKILL.md +137 -0
- package/skills/audit-payment-system/SKILL.md +268 -0
- package/skills/audit-payment-system/references/checklist.md +283 -0
- package/skills/audit-performance/SKILL.md +383 -0
- package/skills/audit-performance/references/loading-priority-2026.md +81 -0
- package/skills/audit-realworld/SKILL.md +287 -0
- package/skills/audit-registry-listing/SKILL.md +122 -0
- package/skills/audit-resilience/SKILL.md +153 -0
- package/skills/audit-responsive/SKILL.md +221 -0
- package/skills/audit-responsive/references/checklist.md +166 -0
- package/skills/audit-security/SKILL.md +289 -0
- package/skills/audit-skill-conflicts/SKILL.md +178 -0
- package/skills/audit-ui-states/SKILL.md +146 -0
- package/skills/audit-uiux-design-system/SKILL.md +475 -0
- package/skills/audit-uiux-design-system/references/details.md +71 -0
- package/skills/audit-ux/SKILL.md +381 -0
- package/skills/audit-ux/references/details.md +245 -0
- package/skills/audit-ux-journeys/SKILL.md +215 -0
- package/skills/audit-ux-journeys/references/checklist.md +179 -0
- package/skills/backend-db-performance/SKILL.md +441 -0
- package/skills/backend-error-handling/SKILL.md +489 -0
- package/skills/backend-error-handling/references/details.md +58 -0
- package/skills/backend-observability/SKILL.md +88 -0
- package/skills/backend-patterns/SKILL.md +499 -0
- package/skills/backend-patterns/references/architecture-patterns.md +298 -0
- package/skills/backend-realtime/SKILL.md +403 -0
- package/skills/backend-realtime/references/patterns.md +74 -0
- package/skills/burndown-full/SKILL.md +174 -0
- package/skills/complete-everything/SKILL.md +295 -0
- package/skills/data-pipeline/SKILL.md +109 -0
- package/skills/data-visualization/SKILL.md +488 -0
- package/skills/debug-error/SKILL.md +322 -0
- package/skills/debug-fe-be-integration/SKILL.md +459 -0
- package/skills/debug-sentry-monitor/SKILL.md +497 -0
- package/skills/debug-sentry-monitor/references/details.md +165 -0
- package/skills/deploy-npm/SKILL.md +394 -0
- package/skills/deploy-npm/references/example-mushi-mushi.md +52 -0
- package/skills/deploy-verify/SKILL.md +489 -0
- package/skills/design-api/SKILL.md +379 -0
- package/skills/design-canvas/SKILL.md +155 -0
- package/skills/design-email/SKILL.md +370 -0
- package/skills/design-frontend/SKILL.md +143 -0
- package/skills/design-generative-art/SKILL.md +474 -0
- package/skills/design-mobile-first/SKILL.md +506 -0
- package/skills/design-motion/SKILL.md +333 -0
- package/skills/design-motion/references/delight-interactions.md +191 -0
- package/skills/design-prd/SKILL.md +443 -0
- package/skills/design-system/SKILL.md +457 -0
- package/skills/design-theme/SKILL.md +226 -0
- package/skills/design-theme/themes/tsumagoi-ranch.md +150 -0
- package/skills/docs-adr/SKILL.md +168 -0
- package/skills/docs-coauthor/SKILL.md +368 -0
- package/skills/docs-comparison-pages/SKILL.md +117 -0
- package/skills/docs-domain-modeling/SKILL.md +97 -0
- package/skills/docs-launch-kit/SKILL.md +139 -0
- package/skills/docs-writer/SKILL.md +469 -0
- package/skills/enhance-agent-guardrails/SKILL.md +164 -0
- package/skills/enhance-arch-boundaries/SKILL.md +154 -0
- package/skills/enhance-capacitor-ui/SKILL.md +463 -0
- package/skills/enhance-capacitor-ui/references/details.md +750 -0
- package/skills/enhance-email-deliverability/SKILL.md +143 -0
- package/skills/enhance-growth-loops/SKILL.md +122 -0
- package/skills/enhance-lifecycle-email/SKILL.md +130 -0
- package/skills/enhance-motion/SKILL.md +193 -0
- package/skills/enhance-onboarding/SKILL.md +148 -0
- package/skills/enhance-pwa/SKILL.md +303 -0
- package/skills/enhance-readability/SKILL.md +146 -0
- package/skills/enhance-readme/SKILL.md +496 -0
- package/skills/enhance-readme/package-lock.json +187 -0
- package/skills/enhance-readme/package.json +17 -0
- package/skills/enhance-readme/scripts/generate-readme-blocks.mjs +199 -0
- package/skills/enhance-readme/scripts/record-readme-tour.mjs +442 -0
- package/skills/enhance-skill-prompts/SKILL.md +167 -0
- package/skills/enhance-skill-prompts/references/exemplar-audit-auth-flows.md +311 -0
- package/skills/enhance-ux-laws/SKILL.md +409 -0
- package/skills/enhance-web-conversion/SKILL.md +155 -0
- package/skills/enhance-web-forms/SKILL.md +154 -0
- package/skills/enhance-web-instant-nav/SKILL.md +138 -0
- package/skills/enhance-web-instant-nav/references/bfcache-blockers.md +23 -0
- package/skills/enhance-web-instant-nav/references/early-hints.md +33 -0
- package/skills/enhance-web-instant-nav/references/speculation-rules.md +44 -0
- package/skills/enhance-web-landing/SKILL.md +459 -0
- package/skills/enhance-web-landing/references/details.md +773 -0
- package/skills/enhance-web-redesign/SKILL.md +228 -0
- package/skills/enhance-web-seo/SKILL.md +276 -0
- package/skills/enhance-web-ui/SKILL.md +473 -0
- package/skills/enhance-web-ui/references/details.md +674 -0
- package/skills/enhance-web-ux/HEURISTICS.md +248 -0
- package/skills/enhance-web-ux/PATTERNS.md +375 -0
- package/skills/enhance-web-ux/SKILL.md +464 -0
- package/skills/enhance-web-ux/examples.md +222 -0
- package/skills/enhance-web-ux/references/details.md +406 -0
- package/skills/enhance-web-web3d/SKILL.md +397 -0
- package/skills/enhance-web-web3d/references/css-canvas-effects.md +180 -0
- package/skills/handoff/SKILL.md +66 -0
- package/skills/housekeep-backlog/SKILL.md +149 -0
- package/skills/housekeep-dead-code/SKILL.md +387 -0
- package/skills/housekeep-dead-code/references/ratchet-ci.md +205 -0
- package/skills/housekeep-dead-code/references/supabase-hygiene.md +152 -0
- package/skills/housekeep-design/SKILL.md +207 -0
- package/skills/housekeep-files/SKILL.md +220 -0
- package/skills/housekeep-files/references/naming-and-catalog.md +86 -0
- package/skills/housekeep-files/scripts/housekeep-files.ps1 +360 -0
- package/skills/housekeep-files/scripts/housekeep-files.sh +238 -0
- package/skills/housekeep-gates/SKILL.md +174 -0
- package/skills/iterate-agent-harness/SKILL.md +137 -0
- package/skills/iterate-gtm-weekly/SKILL.md +103 -0
- package/skills/iterate-post-launch/SKILL.md +292 -0
- package/skills/meta-mcp-builder/SKILL.md +313 -0
- package/skills/meta-skill-creator/SKILL.md +304 -0
- package/skills/mobile-capacitor-platform/SKILL.md +103 -0
- package/skills/mobile-emulator-start/SKILL.md +296 -0
- package/skills/mobile-emulator-test/SKILL.md +491 -0
- package/skills/mobile-emulator-test/references/details.md +478 -0
- package/skills/mobile-rn-performance/SKILL.md +107 -0
- package/skills/mobile-rn-screen/SKILL.md +476 -0
- package/skills/mobile-rn-screen/references/details.md +785 -0
- package/skills/mushi-health/SKILL.md +206 -0
- package/skills/mushi-integration/SKILL.md +257 -0
- package/skills/plan-aeo-readiness/SKILL.md +166 -0
- package/skills/plan-antislop/SKILL.md +281 -0
- package/skills/plan-aso/SKILL.md +149 -0
- package/skills/plan-backup-dr/SKILL.md +131 -0
- package/skills/plan-capacitor-hardening/SKILL.md +217 -0
- package/skills/plan-data-integrity/SKILL.md +187 -0
- package/skills/plan-dead-code/SKILL.md +386 -0
- package/skills/plan-dead-code/references/knip-config.md +214 -0
- package/skills/plan-dead-code/references/output-templates.md +133 -0
- package/skills/plan-dead-code/references/preservation-contract.md +50 -0
- package/skills/plan-dead-code/references/residue-greps.md +84 -0
- package/skills/plan-dependency-provenance/SKILL.md +200 -0
- package/skills/plan-docs-sync/SKILL.md +143 -0
- package/skills/plan-docs-sync/references/drift-taxonomy.md +43 -0
- package/skills/plan-docs-sync/references/output-templates.md +33 -0
- package/skills/plan-docs-sync/references/preservation-contract.md +17 -0
- package/skills/plan-error-handling/SKILL.md +205 -0
- package/skills/plan-gtm/SKILL.md +276 -0
- package/skills/plan-gtm/references/benchmarks-2026.md +183 -0
- package/skills/plan-input-validation/SKILL.md +179 -0
- package/skills/plan-llm-cost-guardrails/SKILL.md +176 -0
- package/skills/plan-mobile-readiness/SKILL.md +171 -0
- package/skills/plan-perf-audit/SKILL.md +145 -0
- package/skills/plan-perf-audit/references/audit-scope.md +51 -0
- package/skills/plan-perf-audit/references/output-templates.md +33 -0
- package/skills/plan-perf-audit/references/preservation-contract.md +13 -0
- package/skills/plan-pricing/SKILL.md +173 -0
- package/skills/plan-privacy-compliance/SKILL.md +148 -0
- package/skills/plan-rls-audit/SKILL.md +231 -0
- package/skills/plan-secrets-audit/SKILL.md +181 -0
- package/skills/plan-security-audit/SKILL.md +168 -0
- package/skills/plan-security-audit/references/output-templates.md +36 -0
- package/skills/plan-security-audit/references/owasp-supabase-scope.md +55 -0
- package/skills/plan-security-audit/references/preservation-contract.md +18 -0
- package/skills/plan-stub-checker/SKILL.md +216 -0
- package/skills/plan-stub-checker/references/detection-methodology.md +75 -0
- package/skills/plan-stub-checker/references/detection-taxonomy.md +34 -0
- package/skills/plan-stub-checker/references/output-templates.md +63 -0
- package/skills/plan-stub-checker/references/preservation-contract.md +24 -0
- package/skills/plan-test-coverage/SKILL.md +170 -0
- package/skills/plan-test-coverage/references/methodology.md +54 -0
- package/skills/plan-test-coverage/references/output-templates.md +34 -0
- package/skills/plan-test-coverage/references/preservation-contract.md +15 -0
- package/skills/plan-uiux-unification/SKILL.md +230 -0
- package/skills/plan-uiux-unification/references/output-templates.md +67 -0
- package/skills/plan-uiux-unification/references/phase-workbook.md +85 -0
- package/skills/plan-uiux-unification/references/preservation-contract.md +24 -0
- package/skills/protocol-browser-anti-stall/SKILL.md +211 -0
- package/skills/protocol-browser-anti-stall/references/mcp-to-cli-map.md +113 -0
- package/skills/protocol-browser-anti-stall/references/playwright-session-coordination.md +170 -0
- package/skills/research/SKILL.md +422 -0
- package/skills/test-exploratory/SKILL.md +165 -0
- package/skills/test-exploratory/references/charter-template.md +29 -0
- package/skills/test-load/SKILL.md +126 -0
- package/skills/test-mutation/SKILL.md +160 -0
- package/skills/test-playwright/SKILL.md +354 -0
- package/skills/test-qa/SKILL.md +364 -0
- package/skills/test-qa/references/details.md +268 -0
- package/skills/test-red-team/SKILL.md +386 -0
- package/skills/test-red-team/references/owasp-attack-checklist.md +193 -0
- package/skills/test-unit/SKILL.md +259 -0
- package/skills/test-unit/references/details.md +267 -0
- package/skills/test-visual-regression/SKILL.md +132 -0
- package/skills/thirdparty-emil-design-eng/ATTRIBUTION.md +20 -0
- package/skills/thirdparty-emil-design-eng/SKILL.md +21 -0
- package/skills/thirdparty-emil-design-eng/references/emil-design-eng.md +676 -0
- package/skills/thirdparty-ui-ux-pro-max/ATTRIBUTION.md +22 -0
- package/skills/thirdparty-ui-ux-pro-max/SKILL.md +304 -0
- package/skills/thirdparty-ui-ux-pro-max/data/charts.csv +26 -0
- package/skills/thirdparty-ui-ux-pro-max/data/colors.csv +97 -0
- package/skills/thirdparty-ui-ux-pro-max/data/icons.csv +101 -0
- package/skills/thirdparty-ui-ux-pro-max/data/landing.csv +31 -0
- package/skills/thirdparty-ui-ux-pro-max/data/products.csv +97 -0
- package/skills/thirdparty-ui-ux-pro-max/data/react-performance.csv +45 -0
- package/skills/thirdparty-ui-ux-pro-max/data/stacks/astro.csv +54 -0
- package/skills/thirdparty-ui-ux-pro-max/data/stacks/flutter.csv +53 -0
- package/skills/thirdparty-ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
- package/skills/thirdparty-ui-ux-pro-max/data/stacks/jetpack-compose.csv +53 -0
- package/skills/thirdparty-ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
- package/skills/thirdparty-ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
- package/skills/thirdparty-ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
- package/skills/thirdparty-ui-ux-pro-max/data/stacks/react-native.csv +52 -0
- package/skills/thirdparty-ui-ux-pro-max/data/stacks/react.csv +54 -0
- package/skills/thirdparty-ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
- package/skills/thirdparty-ui-ux-pro-max/data/stacks/svelte.csv +54 -0
- package/skills/thirdparty-ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
- package/skills/thirdparty-ui-ux-pro-max/data/stacks/vue.csv +50 -0
- package/skills/thirdparty-ui-ux-pro-max/data/styles.csv +68 -0
- package/skills/thirdparty-ui-ux-pro-max/data/typography.csv +58 -0
- package/skills/thirdparty-ui-ux-pro-max/data/ui-reasoning.csv +101 -0
- package/skills/thirdparty-ui-ux-pro-max/data/ux-guidelines.csv +100 -0
- package/skills/thirdparty-ui-ux-pro-max/data/web-interface.csv +31 -0
- package/skills/thirdparty-ui-ux-pro-max/scripts/core.py +253 -0
- package/skills/thirdparty-ui-ux-pro-max/scripts/design_system.py +1067 -0
- package/skills/thirdparty-ui-ux-pro-max/scripts/search.py +114 -0
- package/skills/thirdparty-web-interface-guidelines/ATTRIBUTION.md +23 -0
- package/skills/thirdparty-web-interface-guidelines/SKILL.md +190 -0
- package/skills/workflow-build-feature/SKILL.md +118 -0
- package/skills/workflow-coding-discipline/SKILL.md +140 -0
- package/skills/workflow-environment-ready/SKILL.md +128 -0
- package/skills/workflow-feature-flag/SKILL.md +262 -0
- package/skills/workflow-feedback-to-closure/SKILL.md +165 -0
- package/skills/workflow-fix-and-ship/SKILL.md +136 -0
- package/skills/workflow-git-commit/SKILL.md +200 -0
- package/skills/workflow-green-repo/SKILL.md +166 -0
- package/skills/workflow-grilling/SKILL.md +73 -0
- package/skills/workflow-gtm/SKILL.md +153 -0
- package/skills/workflow-housekeep/SKILL.md +453 -0
- package/skills/workflow-housekeep/references/templates.md +109 -0
- package/skills/workflow-launch-ready/SKILL.md +145 -0
- package/skills/workflow-merge-conflicts/SKILL.md +62 -0
- package/skills/workflow-onboard/SKILL.md +99 -0
- package/skills/workflow-parallel-agents/SKILL.md +164 -0
- package/skills/workflow-pr/SKILL.md +197 -0
- package/skills/workflow-quality-gate/SKILL.md +147 -0
- package/skills/workflow-refactor/SKILL.md +274 -0
- package/skills/workflow-release-prep/SKILL.md +207 -0
- package/skills/workflow-ship-and-observe/SKILL.md +164 -0
- package/skills/workflow-spec-tdd/SKILL.md +141 -0
- package/skills/workflow-spec-tdd/references/spec-template.md +126 -0
- package/skills/workflow-spec-tdd/references/tdd-patterns.md +167 -0
- package/skills-cursor/babysit/SKILL.md +17 -0
- package/skills-cursor/canvas/SKILL.md +142 -0
- package/skills-cursor/canvas/sdk/canvas-tokens.d.ts +235 -0
- package/skills-cursor/canvas/sdk/chart-primitives.d.ts +200 -0
- package/skills-cursor/canvas/sdk/dag-layout.d.ts +102 -0
- package/skills-cursor/canvas/sdk/diff-view.d.ts +130 -0
- package/skills-cursor/canvas/sdk/form-primitives.d.ts +194 -0
- package/skills-cursor/canvas/sdk/hooks.d.ts +117 -0
- package/skills-cursor/canvas/sdk/index.d.ts +47 -0
- package/skills-cursor/canvas/sdk/theme.d.ts +61 -0
- package/skills-cursor/canvas/sdk/todo-list.d.ts +49 -0
- package/skills-cursor/canvas/sdk/ui-primitives.d.ts +549 -0
- package/skills-cursor/canvas/sdk/ui-primitives.test.d.ts +2 -0
- package/skills-cursor/create-hook/SKILL.md +238 -0
- package/skills-cursor/create-rule/SKILL.md +185 -0
- package/skills-cursor/create-skill/SKILL.md +269 -0
- package/skills-cursor/create-skill/references/authoring-guide.md +182 -0
- package/skills-cursor/create-subagent/SKILL.md +228 -0
- package/skills-cursor/migrate-to-skills/SKILL.md +121 -0
- package/skills-cursor/shell/SKILL.md +22 -0
- package/skills-cursor/split-to-prs/SKILL.md +47 -0
- package/skills-cursor/statusline/SKILL.md +193 -0
- package/skills-cursor/update-cli-config/SKILL.md +85 -0
- package/skills-cursor/update-cursor-settings/SKILL.md +137 -0
- package/skills.sh.json +297 -0
|
@@ -0,0 +1,441 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: backend-db-performance
|
|
3
|
+
description: >
|
|
4
|
+
Optimize slow queries, indexes, and N+1s. Use when "slow query",
|
|
5
|
+
"database performance", "add an index", or "N+1". Schema consistency
|
|
6
|
+
→ audit-db-schema. RLS access control → plan-rls-audit.
|
|
7
|
+
license: MIT
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Database Optimization Skill
|
|
11
|
+
|
|
12
|
+
**Degree of freedom: MIXED.** Which query/index/N+1 to fix `[HIGH freedom]`;
|
|
13
|
+
existing-index probes and EXPLAIN ANALYZE `[LOW freedom — run exactly]`.
|
|
14
|
+
|
|
15
|
+
## How to reason
|
|
16
|
+
|
|
17
|
+
1. **Observe** — EXPLAIN ANALYZE / `pg_stat_statements` / existing `pg_indexes`
|
|
18
|
+
2. **Interpret** — seq scan vs N+1 vs over-fetch vs missing pagination
|
|
19
|
+
3. **Classify** — add-index / eager-load / narrow-select / paginate / leave-alone
|
|
20
|
+
4. **Severity** — write-path timeout outranks a 200ms list page
|
|
21
|
+
|
|
22
|
+
## Worked example
|
|
23
|
+
|
|
24
|
+
> **Observe:** `/feed` p95 2.4s; Prisma logs 81 queries; `pg_indexes` has no `idx_posts_user_created`.
|
|
25
|
+
> **Interpret:** `findMany` posts then per-row `user.findUnique` — N+1; `ORDER BY created_at` is a seq scan.
|
|
26
|
+
> **Classify:** eager-load `include: { author }` + composite index `(user_id, created_at DESC)`.
|
|
27
|
+
> **Verify:** EXPLAIN ANALYZE → Index Scan; query count 2; p95 < 200ms. Did not add a duplicate index.
|
|
28
|
+
|
|
29
|
+
## Self-critique before reporting
|
|
30
|
+
|
|
31
|
+
- **Existing first** — listed `pg_indexes` / migrations before `CREATE INDEX`
|
|
32
|
+
- **EXPLAIN** — the claimed winner has ANALYZE output, not intuition
|
|
33
|
+
- **No duplicate index** — the proposed name was queried and absent
|
|
34
|
+
- **Right owner** — schema consistency → `audit-db-schema`; RLS access → `plan-rls-audit`
|
|
35
|
+
|
|
36
|
+
Systematic approach to identifying and fixing database performance issues.
|
|
37
|
+
|
|
38
|
+
## When to Use
|
|
39
|
+
|
|
40
|
+
- Slow page loads (database bottleneck)
|
|
41
|
+
- Query timeout errors
|
|
42
|
+
- N+1 queries
|
|
43
|
+
- Schema design review
|
|
44
|
+
- Index optimization
|
|
45
|
+
- Migration planning
|
|
46
|
+
|
|
47
|
+
## Check existing first [LOW freedom — run exactly]
|
|
48
|
+
|
|
49
|
+
**Before ANY optimization, verify current state:**
|
|
50
|
+
|
|
51
|
+
1. **Check existing indexes:**
|
|
52
|
+
```sql
|
|
53
|
+
SELECT indexname, indexdef FROM pg_indexes
|
|
54
|
+
WHERE schemaname = 'public' AND tablename = 'your_table';
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
2. **Check existing migrations:**
|
|
58
|
+
```bash
|
|
59
|
+
ls -la supabase/migrations/ | grep -i "index\|optim\|perf"
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
3. **Check if index already exists:**
|
|
63
|
+
```sql
|
|
64
|
+
SELECT 1 FROM pg_indexes WHERE indexname = 'your_proposed_index';
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
4. **Check Supabase advisors for current issues:**
|
|
68
|
+
- Use `get_advisors` MCP tool for performance/security
|
|
69
|
+
- Don't re-fix already addressed issues
|
|
70
|
+
|
|
71
|
+
**Why:** Duplicate indexes waste storage and slow writes. Always verify before adding.
|
|
72
|
+
|
|
73
|
+
## Performance Investigation [HIGH freedom]
|
|
74
|
+
|
|
75
|
+
### 1. Identify Slow Queries
|
|
76
|
+
|
|
77
|
+
**Prisma - Enable query logging:**
|
|
78
|
+
```typescript
|
|
79
|
+
// lib/db.ts
|
|
80
|
+
import { PrismaClient } from '@prisma/client'
|
|
81
|
+
|
|
82
|
+
export const db = new PrismaClient({
|
|
83
|
+
log: [
|
|
84
|
+
{ emit: 'event', level: 'query' },
|
|
85
|
+
],
|
|
86
|
+
})
|
|
87
|
+
|
|
88
|
+
db.$on('query', (e) => {
|
|
89
|
+
if (e.duration > 100) { // Log queries > 100ms
|
|
90
|
+
console.log(`Slow query (${e.duration}ms):`, e.query)
|
|
91
|
+
}
|
|
92
|
+
})
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
**Supabase - Query analysis:**
|
|
96
|
+
```sql
|
|
97
|
+
-- Enable query stats
|
|
98
|
+
CREATE EXTENSION IF NOT EXISTS pg_stat_statements;
|
|
99
|
+
|
|
100
|
+
-- Find slow queries
|
|
101
|
+
SELECT
|
|
102
|
+
query,
|
|
103
|
+
calls,
|
|
104
|
+
total_time / calls as avg_time_ms,
|
|
105
|
+
rows / calls as avg_rows
|
|
106
|
+
FROM pg_stat_statements
|
|
107
|
+
ORDER BY total_time DESC
|
|
108
|
+
LIMIT 20;
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### 2. Common Performance Issues
|
|
112
|
+
|
|
113
|
+
| Issue | Symptom | Solution |
|
|
114
|
+
|-------|---------|----------|
|
|
115
|
+
| N+1 Queries | Many small queries | Use `include` / eager load |
|
|
116
|
+
| Missing Index | Slow WHERE/JOIN | Add index on filtered columns |
|
|
117
|
+
| Full Table Scan | Slow on large tables | Add index, limit results |
|
|
118
|
+
| Over-fetching | Slow response | Select only needed fields |
|
|
119
|
+
| No Pagination | Memory issues | Add cursor/offset pagination |
|
|
120
|
+
|
|
121
|
+
## N+1 Query Fix [HIGH freedom]
|
|
122
|
+
|
|
123
|
+
**Problem: Fetching related data in loop**
|
|
124
|
+
```typescript
|
|
125
|
+
// Bad - N+1 queries
|
|
126
|
+
const posts = await db.post.findMany()
|
|
127
|
+
for (const post of posts) {
|
|
128
|
+
const author = await db.user.findUnique({ where: { id: post.authorId } })
|
|
129
|
+
// 1 query for posts + N queries for authors
|
|
130
|
+
}
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
**Solution: Eager loading**
|
|
134
|
+
```typescript
|
|
135
|
+
// Good - 2 queries total
|
|
136
|
+
const posts = await db.post.findMany({
|
|
137
|
+
include: {
|
|
138
|
+
author: true,
|
|
139
|
+
},
|
|
140
|
+
})
|
|
141
|
+
|
|
142
|
+
// Or with select for specific fields
|
|
143
|
+
const posts = await db.post.findMany({
|
|
144
|
+
include: {
|
|
145
|
+
author: {
|
|
146
|
+
select: { id: true, name: true, avatar: true }
|
|
147
|
+
},
|
|
148
|
+
},
|
|
149
|
+
})
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
**Supabase equivalent:**
|
|
153
|
+
```typescript
|
|
154
|
+
// Single query with join
|
|
155
|
+
const { data: posts } = await supabase
|
|
156
|
+
.from('posts')
|
|
157
|
+
.select(`
|
|
158
|
+
*,
|
|
159
|
+
author:users(id, name, avatar)
|
|
160
|
+
`)
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
## Index Optimization [HIGH freedom]
|
|
164
|
+
|
|
165
|
+
### When to Add Indexes
|
|
166
|
+
|
|
167
|
+
**Add index when column is used in:**
|
|
168
|
+
- `WHERE` clauses (filtering)
|
|
169
|
+
- `JOIN` conditions
|
|
170
|
+
- `ORDER BY` clauses
|
|
171
|
+
- Unique constraints
|
|
172
|
+
|
|
173
|
+
**Don't add index when:**
|
|
174
|
+
- Table is small (< 1000 rows)
|
|
175
|
+
- Column has low cardinality (few unique values)
|
|
176
|
+
- Column is rarely queried
|
|
177
|
+
- Table has heavy writes
|
|
178
|
+
|
|
179
|
+
### Index Types
|
|
180
|
+
|
|
181
|
+
```sql
|
|
182
|
+
-- Single column index
|
|
183
|
+
CREATE INDEX idx_posts_user_id ON posts(user_id);
|
|
184
|
+
|
|
185
|
+
-- Composite index (order matters!)
|
|
186
|
+
CREATE INDEX idx_posts_user_created ON posts(user_id, created_at DESC);
|
|
187
|
+
|
|
188
|
+
-- Unique index
|
|
189
|
+
CREATE UNIQUE INDEX idx_users_email ON users(email);
|
|
190
|
+
|
|
191
|
+
-- Partial index (index subset of rows)
|
|
192
|
+
CREATE INDEX idx_posts_published ON posts(created_at)
|
|
193
|
+
WHERE published = true;
|
|
194
|
+
|
|
195
|
+
-- GIN index for JSONB/array
|
|
196
|
+
CREATE INDEX idx_posts_tags ON posts USING GIN(tags);
|
|
197
|
+
|
|
198
|
+
-- Full-text search
|
|
199
|
+
CREATE INDEX idx_posts_search ON posts
|
|
200
|
+
USING GIN(to_tsvector('english', title || ' ' || content));
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
### Prisma Index Syntax
|
|
204
|
+
|
|
205
|
+
```prisma
|
|
206
|
+
model Post {
|
|
207
|
+
id String @id @default(cuid())
|
|
208
|
+
userId String
|
|
209
|
+
title String
|
|
210
|
+
status Status
|
|
211
|
+
createdAt DateTime @default(now())
|
|
212
|
+
|
|
213
|
+
user User @relation(fields: [userId], references: [id])
|
|
214
|
+
|
|
215
|
+
// Single column index
|
|
216
|
+
@@index([userId])
|
|
217
|
+
|
|
218
|
+
// Composite index
|
|
219
|
+
@@index([userId, createdAt(sort: Desc)])
|
|
220
|
+
|
|
221
|
+
// Unique constraint (creates unique index)
|
|
222
|
+
@@unique([userId, title])
|
|
223
|
+
}
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
## Query Optimization Patterns [HIGH freedom]
|
|
227
|
+
|
|
228
|
+
### Select Only Needed Fields
|
|
229
|
+
|
|
230
|
+
```typescript
|
|
231
|
+
// Bad - fetches all columns
|
|
232
|
+
const users = await db.user.findMany()
|
|
233
|
+
|
|
234
|
+
// Good - fetches only needed
|
|
235
|
+
const users = await db.user.findMany({
|
|
236
|
+
select: {
|
|
237
|
+
id: true,
|
|
238
|
+
name: true,
|
|
239
|
+
email: true,
|
|
240
|
+
},
|
|
241
|
+
})
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
### Pagination
|
|
245
|
+
|
|
246
|
+
**Offset pagination (simple, but slow at high offsets):**
|
|
247
|
+
```typescript
|
|
248
|
+
const posts = await db.post.findMany({
|
|
249
|
+
skip: (page - 1) * limit,
|
|
250
|
+
take: limit,
|
|
251
|
+
orderBy: { createdAt: 'desc' },
|
|
252
|
+
})
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
**Cursor pagination (better for large datasets):**
|
|
256
|
+
```typescript
|
|
257
|
+
const posts = await db.post.findMany({
|
|
258
|
+
take: limit,
|
|
259
|
+
skip: cursor ? 1 : 0, // Skip cursor itself
|
|
260
|
+
cursor: cursor ? { id: cursor } : undefined,
|
|
261
|
+
orderBy: { createdAt: 'desc' },
|
|
262
|
+
})
|
|
263
|
+
|
|
264
|
+
// Return next cursor
|
|
265
|
+
const nextCursor = posts.length === limit ? posts[posts.length - 1].id : null
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
### Batch Operations
|
|
269
|
+
|
|
270
|
+
```typescript
|
|
271
|
+
// Bad - individual inserts
|
|
272
|
+
for (const item of items) {
|
|
273
|
+
await db.item.create({ data: item })
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
// Good - batch insert
|
|
277
|
+
await db.item.createMany({
|
|
278
|
+
data: items,
|
|
279
|
+
skipDuplicates: true,
|
|
280
|
+
})
|
|
281
|
+
|
|
282
|
+
// Good - transaction for related data
|
|
283
|
+
await db.$transaction([
|
|
284
|
+
db.order.create({ data: order }),
|
|
285
|
+
db.orderItem.createMany({ data: orderItems }),
|
|
286
|
+
db.inventory.updateMany({ where: {...}, data: {...} }),
|
|
287
|
+
])
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
### Count Optimization
|
|
291
|
+
|
|
292
|
+
```typescript
|
|
293
|
+
// Get count without fetching data
|
|
294
|
+
const count = await db.post.count({
|
|
295
|
+
where: { published: true },
|
|
296
|
+
})
|
|
297
|
+
|
|
298
|
+
// Combined with pagination
|
|
299
|
+
const [posts, count] = await db.$transaction([
|
|
300
|
+
db.post.findMany({ where, take: limit, skip: offset }),
|
|
301
|
+
db.post.count({ where }),
|
|
302
|
+
])
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
## Schema Design Best Practices [HIGH freedom]
|
|
306
|
+
|
|
307
|
+
### Normalization vs Denormalization
|
|
308
|
+
|
|
309
|
+
**Normalize when:**
|
|
310
|
+
- Data changes frequently
|
|
311
|
+
- Data integrity is critical
|
|
312
|
+
- Storage is a concern
|
|
313
|
+
|
|
314
|
+
**Denormalize when:**
|
|
315
|
+
- Read performance is critical
|
|
316
|
+
- Data rarely changes
|
|
317
|
+
- Complex joins are slow
|
|
318
|
+
|
|
319
|
+
```sql
|
|
320
|
+
-- Normalized (separate table)
|
|
321
|
+
CREATE TABLE post_stats (
|
|
322
|
+
post_id UUID PRIMARY KEY REFERENCES posts(id),
|
|
323
|
+
view_count INT DEFAULT 0,
|
|
324
|
+
like_count INT DEFAULT 0
|
|
325
|
+
);
|
|
326
|
+
|
|
327
|
+
-- Denormalized (same table)
|
|
328
|
+
ALTER TABLE posts
|
|
329
|
+
ADD COLUMN view_count INT DEFAULT 0,
|
|
330
|
+
ADD COLUMN like_count INT DEFAULT 0;
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
### Efficient Data Types
|
|
334
|
+
|
|
335
|
+
```sql
|
|
336
|
+
-- Use appropriate types
|
|
337
|
+
id UUID DEFAULT gen_random_uuid() -- vs TEXT for IDs
|
|
338
|
+
status VARCHAR(20) -- vs unlimited TEXT
|
|
339
|
+
price DECIMAL(10,2) -- vs FLOAT for money
|
|
340
|
+
created_at TIMESTAMPTZ -- vs TIMESTAMP (include timezone)
|
|
341
|
+
|
|
342
|
+
-- Use enums for fixed values
|
|
343
|
+
CREATE TYPE status AS ENUM ('draft', 'published', 'archived');
|
|
344
|
+
```
|
|
345
|
+
|
|
346
|
+
### Soft Deletes
|
|
347
|
+
|
|
348
|
+
```prisma
|
|
349
|
+
model Post {
|
|
350
|
+
id String @id
|
|
351
|
+
deletedAt DateTime?
|
|
352
|
+
|
|
353
|
+
@@index([deletedAt]) // Index for filtering
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
// Query pattern
|
|
357
|
+
const posts = await db.post.findMany({
|
|
358
|
+
where: { deletedAt: null },
|
|
359
|
+
})
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
## Supabase-Specific Optimizations [HIGH freedom]
|
|
363
|
+
|
|
364
|
+
### RLS Performance
|
|
365
|
+
|
|
366
|
+
```sql
|
|
367
|
+
-- Bad: Function call in RLS (slow)
|
|
368
|
+
CREATE POLICY "slow_policy" ON posts
|
|
369
|
+
FOR SELECT USING (
|
|
370
|
+
user_id IN (SELECT user_id FROM team_members WHERE team_id = get_user_team())
|
|
371
|
+
);
|
|
372
|
+
|
|
373
|
+
-- Good: Direct comparison (fast)
|
|
374
|
+
CREATE POLICY "fast_policy" ON posts
|
|
375
|
+
FOR SELECT USING (user_id = auth.uid());
|
|
376
|
+
|
|
377
|
+
-- Good: Join-based (when needed)
|
|
378
|
+
CREATE POLICY "team_policy" ON posts
|
|
379
|
+
FOR SELECT USING (
|
|
380
|
+
EXISTS (
|
|
381
|
+
SELECT 1 FROM team_members
|
|
382
|
+
WHERE team_members.team_id = posts.team_id
|
|
383
|
+
AND team_members.user_id = auth.uid()
|
|
384
|
+
)
|
|
385
|
+
);
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
### Edge Functions for Complex Logic
|
|
389
|
+
|
|
390
|
+
```typescript
|
|
391
|
+
// Move complex aggregations to Edge Functions
|
|
392
|
+
// instead of multiple round trips
|
|
393
|
+
|
|
394
|
+
// supabase/functions/dashboard-stats/index.ts
|
|
395
|
+
Deno.serve(async (req) => {
|
|
396
|
+
const stats = await supabase.rpc('get_dashboard_stats', {
|
|
397
|
+
user_id: userId
|
|
398
|
+
})
|
|
399
|
+
return new Response(JSON.stringify(stats))
|
|
400
|
+
})
|
|
401
|
+
```
|
|
402
|
+
|
|
403
|
+
## Query Analysis [LOW freedom — run exactly]
|
|
404
|
+
|
|
405
|
+
### EXPLAIN ANALYZE
|
|
406
|
+
|
|
407
|
+
```sql
|
|
408
|
+
EXPLAIN ANALYZE
|
|
409
|
+
SELECT * FROM posts
|
|
410
|
+
WHERE user_id = 'abc123'
|
|
411
|
+
ORDER BY created_at DESC
|
|
412
|
+
LIMIT 20;
|
|
413
|
+
|
|
414
|
+
-- Look for:
|
|
415
|
+
-- - Seq Scan (bad on large tables)
|
|
416
|
+
-- - Index Scan (good)
|
|
417
|
+
-- - Nested Loop (check if N+1)
|
|
418
|
+
-- - High actual time
|
|
419
|
+
```
|
|
420
|
+
|
|
421
|
+
### Key Metrics
|
|
422
|
+
|
|
423
|
+
| Metric | Target | Action if Exceeded |
|
|
424
|
+
|--------|--------|-------------------|
|
|
425
|
+
| Query time | < 100ms | Add index, optimize |
|
|
426
|
+
| Rows scanned | < 10x returned | Add index |
|
|
427
|
+
| Memory usage | < 256MB | Add LIMIT, pagination |
|
|
428
|
+
| Connection count | < pool size | Use connection pooling |
|
|
429
|
+
|
|
430
|
+
## Optimization Checklist [LOW freedom — do not skip]
|
|
431
|
+
|
|
432
|
+
- [ ] Queries logged and monitored
|
|
433
|
+
- [ ] Indexes on filtered/joined columns
|
|
434
|
+
- [ ] No N+1 queries (eager loading)
|
|
435
|
+
- [ ] Pagination on all list endpoints
|
|
436
|
+
- [ ] Select only needed fields
|
|
437
|
+
- [ ] Batch operations where possible
|
|
438
|
+
- [ ] Connection pooling configured
|
|
439
|
+
- [ ] RLS policies optimized
|
|
440
|
+
- [ ] EXPLAIN ANALYZE on slow queries
|
|
441
|
+
- [ ] Appropriate data types used
|