@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,148 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: plan-privacy-compliance
|
|
3
|
+
description: >
|
|
4
|
+
Plan-only audit mapping real personal-data flows to the privacy policy,
|
|
5
|
+
GDPR, Japan APPI, and store labels. Use when "privacy compliance", "what
|
|
6
|
+
data do we collect?", "App Store privacy labels", or before a consumer
|
|
7
|
+
launch.
|
|
8
|
+
license: MIT
|
|
9
|
+
effort: high
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# plan-privacy-compliance — Data-flow & legal-surface plan
|
|
13
|
+
|
|
14
|
+
**Degree of freedom: HIGH** — interpretive inventory and plan. Stay
|
|
15
|
+
**plan-only**. T4 before presenting the burndown.
|
|
16
|
+
|
|
17
|
+
**Role:** Privacy engineer (operational compliance, not legal advice).
|
|
18
|
+
|
|
19
|
+
**Task:** Map what the *code* collects, diff it against the written policy and
|
|
20
|
+
store labels, emit `plan-privacy-compliance.md`. **Audit & plan only — no policy
|
|
21
|
+
rewrites, SDK gates, or deletion jobs until each phase is approved.**
|
|
22
|
+
|
|
23
|
+
**The gap that sinks apps is collection-vs-claimed:** the code gathers more than
|
|
24
|
+
the privacy policy admits, and the store label is wrong.
|
|
25
|
+
|
|
26
|
+
Not legal advice. This operationalizes common GDPR and Japan APPI
|
|
27
|
+
(個人情報保護法) requirements into engineering findings. Flag genuine ambiguity
|
|
28
|
+
for a lawyer.
|
|
29
|
+
|
|
30
|
+
## This skill vs neighbors
|
|
31
|
+
|
|
32
|
+
| Skill | Owns |
|
|
33
|
+
|---|---|
|
|
34
|
+
| **plan-privacy-compliance** (this) | Data inventory, consent timing, deletion/export, store labels |
|
|
35
|
+
| `audit-analytics` | Event taxonomy + whether analytics *fires before consent* |
|
|
36
|
+
| `plan-mobile-readiness` | Submission mechanics (demo account, 2.5.2) — not the data-flow diff |
|
|
37
|
+
| `plan-rls-audit` | Who can *read* rows — not what you promised to collect |
|
|
38
|
+
| `plan-error-handling` | PII in Sentry/logs |
|
|
39
|
+
| `enhance-email-deliverability` | Lawful send / unsubscribe (consent to mail) |
|
|
40
|
+
|
|
41
|
+
Do **not** fire for "privacy manifest / Data Safety form paperwork only" if the
|
|
42
|
+
user is mid-store-submit → still run this for the *data-flow* half, then
|
|
43
|
+
`plan-mobile-readiness` for the rest.
|
|
44
|
+
|
|
45
|
+
## How to reason (every plan item)
|
|
46
|
+
|
|
47
|
+
1. **Propose** — what must change (policy, SDK gate, deletion path, label)
|
|
48
|
+
2. **Risk** — what stays non-compliant or leaking if we skip it
|
|
49
|
+
3. **Keep-working** — collection that is already disclosed and gated
|
|
50
|
+
4. **Phase** — P0 / P1 / P2 (do not execute)
|
|
51
|
+
|
|
52
|
+
## Worked example
|
|
53
|
+
|
|
54
|
+
> **Propose:** delay PostHog init until consent; add account-deletion that
|
|
55
|
+
> reaches Sentry + the analytics project.
|
|
56
|
+
> **Risk:** GDPR consent-after-fire + incomplete erasure (PII in traces).
|
|
57
|
+
> **Keep-working:** essential auth cookies already disclosed.
|
|
58
|
+
> **Phase:** P0 — consent timing + deletion completeness.
|
|
59
|
+
> **Execute-via:** `audit-analytics` (event gate) + `plan-error-handling` (logs).
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## Phase 0 — Inventory personal data actually collected [HIGH freedom]
|
|
64
|
+
|
|
65
|
+
Do not trust the privacy policy. Derive collection from the code:
|
|
66
|
+
|
|
67
|
+
- **Direct:** forms, signup, profile, uploads, voice/photo, location
|
|
68
|
+
- **Automatic:** IP, device IDs, analytics, crash reports, cookies, session
|
|
69
|
+
- **Special-category / 要配慮個人情報:** health, biometrics, precise location
|
|
70
|
+
- **Third-party SDKs:** every analytics/ads/attribution/crash SDK and what it
|
|
71
|
+
exfiltrates by default
|
|
72
|
+
|
|
73
|
+
Build: item → collected where → stored where → shared with → retention → basis.
|
|
74
|
+
|
|
75
|
+
**Consent-gating handoff:** if analytics/ads SDKs initialize on app start, log
|
|
76
|
+
the finding here *and* point at `audit-analytics` for the event-level matrix.
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## Phase 1 — Audit against requirements [HIGH freedom]
|
|
81
|
+
|
|
82
|
+
**Collection vs claimed** — Diff inventory vs privacy policy vs App Store
|
|
83
|
+
Nutrition Label / Play Data Safety. Collected-but-undisclosed is P0.
|
|
84
|
+
|
|
85
|
+
**Consent** — Obtained *before* non-essential collection? Granular where GDPR
|
|
86
|
+
requires? Withdraw path? APPI: 利用目的 specified and notified?
|
|
87
|
+
|
|
88
|
+
**Data-subject rights** — Working **deletion** (account + data, not deactivate)
|
|
89
|
+
and **export**. Must reach DB, buckets, logs, analytics, backups, third-party
|
|
90
|
+
SDKs. A delete that leaves PII in Sentry is non-compliant.
|
|
91
|
+
|
|
92
|
+
**Retention** — Defined windows + an enforcer (cron/TTL), or prose only?
|
|
93
|
+
|
|
94
|
+
**Cross-border** — Processor region. EU→US needs a transfer basis. APPI
|
|
95
|
+
restricts transfers outside Japan without consent/adequacy.
|
|
96
|
+
|
|
97
|
+
**Minors** — Age-gating and stricter defaults if the app can be used by children.
|
|
98
|
+
|
|
99
|
+
**Logs & LLM traces** — Raw PII in app logs / Langfuse → `plan-error-handling`,
|
|
100
|
+
`audit-langfuse-llm`.
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## Phase 2 — Phased plan (approve before executing) [HIGH freedom — plan only]
|
|
105
|
+
|
|
106
|
+
- **P0** — undisclosed collection, absent deletion, consent after fire, PII in logs
|
|
107
|
+
- **P1** — incomplete deletion, missing export, no retention job, wrong store form
|
|
108
|
+
- **P2** — consent granularity, policy wording, processor docs
|
|
109
|
+
|
|
110
|
+
Each item: what's wrong, requirement (GDPR art. / APPI / store), fix shape,
|
|
111
|
+
execute-via (`audit-analytics`, `plan-rls-audit`, `plan-error-handling`, or a
|
|
112
|
+
policy/text change).
|
|
113
|
+
|
|
114
|
+
## Self-critique before the burndown [LOW freedom — do not skip]
|
|
115
|
+
|
|
116
|
+
1. **From code, not the policy** — inventory derived from collection sites
|
|
117
|
+
2. **Not legal advice** — ambiguity flagged for a lawyer
|
|
118
|
+
3. **Collected-but-undisclosed is P0** — do not bury it in P2 wording
|
|
119
|
+
4. **Right owner** — analytics fire-before-consent also → `audit-analytics`
|
|
120
|
+
5. **Nothing rewritten** — no policy/SDK/deletion job until approved
|
|
121
|
+
|
|
122
|
+
## Definition of Done
|
|
123
|
+
|
|
124
|
+
- [ ] Inventory complete (collection → storage → sharing → retention)
|
|
125
|
+
- [ ] Every third-party SDK's exfiltration documented
|
|
126
|
+
- [ ] Real collection diffed against policy *and* store label
|
|
127
|
+
- [ ] Consent timing + withdraw path checked; analytics handoff to `audit-analytics`
|
|
128
|
+
- [ ] Deletion + export traced to all stores
|
|
129
|
+
- [ ] Retention enforcement identified or flagged absent
|
|
130
|
+
- [ ] Cross-border map per processor
|
|
131
|
+
- [ ] Plan approved before any change
|
|
132
|
+
|
|
133
|
+
## Output format
|
|
134
|
+
|
|
135
|
+
1. **Data inventory** — item | where | stored | shared | retention | basis
|
|
136
|
+
2. **Findings** — issue | GDPR/APPI/store | severity | evidence
|
|
137
|
+
3. **Store-label diff** — claimed vs actual
|
|
138
|
+
4. **Phased plan** — P0/P1/P2 → executing skill
|
|
139
|
+
5. **Recap and await approval** — end the turn with a standalone recap in chat: the two or three highest-impact findings (collected-but-undisclosed first) and the first phase to approve. `plan-privacy-compliance.md` is the deliverable; write it before the recap.
|
|
140
|
+
|
|
141
|
+
## Related
|
|
142
|
+
|
|
143
|
+
- `audit-analytics` — event coverage + consent-gated firing (run both)
|
|
144
|
+
- `plan-mobile-readiness` — store submission mechanics
|
|
145
|
+
- `plan-rls-audit` — access control
|
|
146
|
+
- `plan-error-handling` / `audit-langfuse-llm` — PII in logs/traces
|
|
147
|
+
- `enhance-email-deliverability` — marketing-mail consent
|
|
148
|
+
- `plan-aso` — listing copy after labels are honest
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: plan-rls-audit
|
|
3
|
+
description: >
|
|
4
|
+
Plan-only audit of Supabase/Postgres Row-Level Security and access-control
|
|
5
|
+
gaps. Use when "RLS", "is my Supabase secure", "anyone can read my data", or
|
|
6
|
+
"lock down my tables". App-layer route gates → audit-auth-flows.
|
|
7
|
+
license: MIT
|
|
8
|
+
effort: high
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# RLS & Access-Control Audit + Remediation Plan
|
|
12
|
+
|
|
13
|
+
**Degree of freedom: MIXED** — access matrix and severity are judgment; table
|
|
14
|
+
inventory and policy reads run exactly. Stay **plan-only**. No SQL until approved.
|
|
15
|
+
|
|
16
|
+
## This skill vs neighbors
|
|
17
|
+
|
|
18
|
+
| Skill | Owns |
|
|
19
|
+
|---|---|
|
|
20
|
+
| **plan-rls-audit** (this) | Who can read/write which rows |
|
|
21
|
+
| `plan-security-audit` | OWASP umbrella (not the first RLS match) |
|
|
22
|
+
| `audit-db-schema` | Schema design quality |
|
|
23
|
+
| `plan-secrets-audit` | Where `service_role` lives |
|
|
24
|
+
| `audit-auth-flows` | App-layer session / route×gate / getSession vs getUser |
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
**Role:** Senior backend engineer + Supabase security specialist.
|
|
28
|
+
|
|
29
|
+
**Task:** Enumerate every table/view, run the RLS checklist (A–E), build a who-can-do-what
|
|
30
|
+
access matrix, score findings by exposure, emit `plan-rls-audit.md`. **Audit & plan only —
|
|
31
|
+
no SQL runs until each phase is approved.**
|
|
32
|
+
|
|
33
|
+
## How to reason (every plan item)
|
|
34
|
+
|
|
35
|
+
1. **Propose** — enable RLS, scope a policy, rotate a client `service_role`, or fix inverted logic
|
|
36
|
+
2. **Risk** — anon/authed can read or write rows they should not
|
|
37
|
+
3. **Keep-working** — tables whose policies already enforce ownership
|
|
38
|
+
4. **Phase** — Stop exposure → Ownership → Correctness-perf → Adjacent gates (do not execute)
|
|
39
|
+
|
|
40
|
+
## Worked example
|
|
41
|
+
|
|
42
|
+
> **Propose:** enable RLS on `profiles`; replace `USING (true)` on `orders` SELECT with `user_id = (select auth.uid())`.
|
|
43
|
+
> **Risk:** anon key (public) reads every profile; every authed user reads every order.
|
|
44
|
+
> **Keep-working:** `orders` INSERT already checks owner.
|
|
45
|
+
> **Phase:** Phase 1 — Stop active exposure (Critical).
|
|
46
|
+
> **Direction:** policy shape only — no SQL in this pass. Client `service_role` → `plan-secrets-audit`.
|
|
47
|
+
|
|
48
|
+
Missing or misconfigured Row-Level Security is the most documented vibe-coding
|
|
49
|
+
catastrophe of the 2025–2026 era. An audit of 50 vibe-coded apps across Lovable,
|
|
50
|
+
Bolt, v0, Cursor, and Claude Code found **88% had RLS entirely disabled** — not
|
|
51
|
+
misconfigured, *disabled* — meaning the database returned any row to any query.
|
|
52
|
+
Public breach reports describe apps leaking millions of API keys and user emails from
|
|
53
|
+
exactly this, and a disclosed vulnerability class spanning many production apps where
|
|
54
|
+
access control was present but **logically inverted** — authenticated users blocked,
|
|
55
|
+
anonymous users granted everything.
|
|
56
|
+
|
|
57
|
+
This skill is the **audit-and-plan** half of fixing that. Execution is handed to
|
|
58
|
+
`backend-patterns` / `db-migrator` / `audit-security` after you approve each phase.
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## When this fires
|
|
63
|
+
|
|
64
|
+
Trigger phrases: *"check my RLS"*, *"is my Supabase locked down"*, *"can anyone
|
|
65
|
+
read my tables"*, *"audit my database policies"*, *"service_role key"*,
|
|
66
|
+
*"Supabase security advisor flagged something"*, *"pre-launch DB hardening"*.
|
|
67
|
+
|
|
68
|
+
Do **not** fire for: pure query speed (`backend-db-performance`), schema/naming
|
|
69
|
+
design (`audit-db-schema`), or broad app-layer OWASP (`plan-security-audit`).
|
|
70
|
+
RLS is specifically *who can read/write which rows*, enforced at the database.
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## Why a dedicated skill (not generic security audit)
|
|
75
|
+
|
|
76
|
+
RLS failure is *mechanical and table-by-table*. A generic OWASP sweep glances at
|
|
77
|
+
it; this enumerates every table and applies a deterministic checklist. Fixing RLS
|
|
78
|
+
is the first step when the anon key can read rows it should not.
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## The audit checklist [HIGH freedom]
|
|
83
|
+
|
|
84
|
+
Walk the schema (via Supabase MCP, `pg_tables`, migration files, or the dashboard
|
|
85
|
+
security advisor). For **every** table and view:
|
|
86
|
+
|
|
87
|
+
### A · Is RLS even on?
|
|
88
|
+
- Check `relrowsecurity = true` for every table in exposed schemas (`public`
|
|
89
|
+
especially). Any table with RLS **off** is fully readable/writable through the
|
|
90
|
+
anon key. This is finding #1, severity Critical, every time it appears.
|
|
91
|
+
- Views: confirm they don't silently bypass RLS (`security_invoker` vs definer).
|
|
92
|
+
- Don't forget junction/lookup tables — they leak relationships even when the
|
|
93
|
+
"main" tables are protected.
|
|
94
|
+
|
|
95
|
+
### B · Are the policies real, or theater?
|
|
96
|
+
- **`USING (true)`** (or `WITH CHECK (true)`) on anything user-owned = the table
|
|
97
|
+
is public. The agent writes this to make a "permission denied" error go away;
|
|
98
|
+
it's the single most common dangerous pattern.
|
|
99
|
+
- **Inverted logic** (the disclosed inverted-policy class): a policy that *looks* like it
|
|
100
|
+
checks auth but blocks the wrong party. Read each policy's truth table, don't
|
|
101
|
+
trust its name.
|
|
102
|
+
- **Missing operation coverage**: a SELECT policy with no INSERT/UPDATE/DELETE
|
|
103
|
+
policy (or vice-versa) — RLS denies by default *only* if RLS is on, so confirm
|
|
104
|
+
each operation the app performs is actually governed.
|
|
105
|
+
- **Ownership not enforced**: policy references `auth.uid()` but doesn't tie it to
|
|
106
|
+
a row-owner column (`user_id = auth.uid()`), so any logged-in user reads every
|
|
107
|
+
other user's rows.
|
|
108
|
+
|
|
109
|
+
### C · Key scoping (the client-side trap)
|
|
110
|
+
- Search frontend/client bundles for the **`service_role`** key. It bypasses RLS
|
|
111
|
+
entirely and must never be shipped client-side or in `NEXT_PUBLIC_*`. If found:
|
|
112
|
+
Critical, rotate immediately (hand to `plan-secrets-audit`).
|
|
113
|
+
- Confirm the **anon** key is the only Supabase key in client code, and that
|
|
114
|
+
anon access is safe *because RLS holds* — not by accident.
|
|
115
|
+
- Edge Functions / server routes using `service_role`: verify they re-check
|
|
116
|
+
authorization in code, since they've opted out of RLS.
|
|
117
|
+
|
|
118
|
+
### D · Correctness & performance of auth calls
|
|
119
|
+
- Supabase's own linter flags `auth.uid()` called per-row. Recommend
|
|
120
|
+
`(select auth.uid())` so Postgres caches it — correctness is unchanged but
|
|
121
|
+
large tables stop timing out (a real fix, not cosmetic).
|
|
122
|
+
- Check `auth.jwt()` / custom claims usage for the same per-row trap.
|
|
123
|
+
|
|
124
|
+
### E · Defaults & adjacent gates
|
|
125
|
+
- Storage buckets: public vs RLS-governed; signed-URL usage.
|
|
126
|
+
- Realtime: row-level authorization on subscribed channels.
|
|
127
|
+
- `pg_policies` cross-checked against the app's actual access matrix — flag any
|
|
128
|
+
table the app reads/writes that has *no* corresponding policy.
|
|
129
|
+
|
|
130
|
+
For each finding: table/policy, the exact gap, who can currently access what,
|
|
131
|
+
severity, and a remediation *direction* (not the SQL — that's execution).
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
## Procedure [HIGH freedom — plan only]
|
|
136
|
+
|
|
137
|
+
1. **Inventory.** [LOW freedom — run exactly] List every table/view in exposed schemas with its
|
|
138
|
+
`relrowsecurity` state and policy set. State how you accessed it (MCP /
|
|
139
|
+
migrations / advisor) and any tables you couldn't see.
|
|
140
|
+
2. **Classify.** Run each through checklist A–E. Tag severity:
|
|
141
|
+
**Critical** (RLS off, `USING(true)`, service_role client-side, inverted
|
|
142
|
+
policy), **High** (ownership not enforced, missing operation coverage),
|
|
143
|
+
**Med** (perf-trap auth calls, view bypass), **Low** (hardening nits).
|
|
144
|
+
3. **Build the access matrix.** A who-can-do-what table the user can eyeball —
|
|
145
|
+
the deliverable's most useful artifact.
|
|
146
|
+
4. **Phase the burndown.** Critical first (data is exposed *right now*), then
|
|
147
|
+
High, then Med/Low. Each phase maps to an execution skill.
|
|
148
|
+
5. **Emit `plan-rls-audit.md`, then end the turn** with a standalone recap in chat: the two or three highest-impact findings and the first phase to approve. The file is the deliverable — write it before the recap. **Do not write or run any SQL.**
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
## Guardrails
|
|
153
|
+
|
|
154
|
+
- **Plan only.** No `ALTER TABLE`, no `CREATE POLICY`, no migrations. The
|
|
155
|
+
deliverable is the report and the access matrix.
|
|
156
|
+
- **Never widen access to "verify".** Don't suggest temporarily disabling RLS or
|
|
157
|
+
loosening a policy to test something. Read state; don't mutate it.
|
|
158
|
+
- **Assume the anon key is public.** It is — it ships in the browser. The plan's
|
|
159
|
+
job is to confirm RLS makes that safe, not to treat the key as a secret.
|
|
160
|
+
- **Severity is about exposure, not effort.** An RLS-off table is Critical even
|
|
161
|
+
if the fix is one line. Rank by what's reachable today.
|
|
162
|
+
- **Don't confuse "works in the demo" with "secure".** App-layer filtering
|
|
163
|
+
(`.eq('user_id', currentUser)` in the client query) is *not* RLS; flag it as
|
|
164
|
+
unprotected — anyone can drop the filter in dev tools.
|
|
165
|
+
- **Minimal quoting** of policy bodies; identify by table + operation.
|
|
166
|
+
|
|
167
|
+
## Self-critique before the burndown [LOW freedom — do not skip]
|
|
168
|
+
|
|
169
|
+
1. **evidenced-not-assumed** — every table has `relrowsecurity` + policy set from MCP/migrations/advisor; unseen tables listed
|
|
170
|
+
2. **plan-only** — no `ALTER TABLE`, no `CREATE POLICY`, no widening access to "verify"
|
|
171
|
+
3. **severity/phase justified** — RLS-off / `USING (true)` / inverted / client `service_role` = Critical even if the fix is one line
|
|
172
|
+
4. **right-owner** — rotate exposed `service_role` → `plan-secrets-audit`; app-layer session/route gates → `audit-auth-flows`; schema design → `audit-db-schema`
|
|
173
|
+
5. **no-false-safety** — client `.eq('user_id', …)` is not RLS; anon key is public; "works in the demo" is not secure
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
## Report template — `plan-rls-audit.md`
|
|
178
|
+
|
|
179
|
+
```markdown
|
|
180
|
+
# RLS & Access-Control Audit — <project>
|
|
181
|
+
|
|
182
|
+
_Audit-only. No SQL runs until each phase is approved._
|
|
183
|
+
|
|
184
|
+
## Scope
|
|
185
|
+
- Tables/views audited: n | Source: [Supabase MCP / migrations / advisor]
|
|
186
|
+
- Couldn't inspect: … | Assumptions: …
|
|
187
|
+
|
|
188
|
+
## Verdict
|
|
189
|
+
| Severity | Count | Worst case if shipped |
|
|
190
|
+
|----------|-------|-----------------------|
|
|
191
|
+
| Critical | n | full DB readable via anon key |
|
|
192
|
+
| High | n | cross-user data access |
|
|
193
|
+
| Medium | n | timeouts / view bypass |
|
|
194
|
+
| Low | n | hardening |
|
|
195
|
+
|
|
196
|
+
## Access matrix (current reality)
|
|
197
|
+
| Table | RLS on? | anon can | authed (own) | authed (others') | service_role exposed? |
|
|
198
|
+
|-------|---------|----------|--------------|------------------|-----------------------|
|
|
199
|
+
| profiles | ❌ | read+write all | — | YES ⚠ | — |
|
|
200
|
+
|
|
201
|
+
## Findings
|
|
202
|
+
| # | Table / policy | Gap | Who's exposed | Sev | Direction |
|
|
203
|
+
|---|----------------|-----|---------------|-----|-----------|
|
|
204
|
+
| R1 | profiles | RLS disabled | everyone, anon | Crit | enable RLS; add owner policy |
|
|
205
|
+
| R2 | orders | USING (true) on SELECT | every authed user reads all orders | Crit | scope to user_id = (select auth.uid()) |
|
|
206
|
+
|
|
207
|
+
## Phased burndown
|
|
208
|
+
- **Phase 1 — Stop active exposure** → `db-migrator` / `backend-patterns` — R1, R2…
|
|
209
|
+
- **Phase 2 — Enforce ownership** → `db-migrator` — H-tier items
|
|
210
|
+
- **Phase 3 — Correctness & perf** → `backend-db-performance` — auth.uid() traps
|
|
211
|
+
- **Phase 4 — Adjacent gates** → `audit-security` — storage, realtime
|
|
212
|
+
|
|
213
|
+
## Execution handoff
|
|
214
|
+
Approve a phase to run it. Re-run `plan-rls-audit` after to confirm closure, and
|
|
215
|
+
cross-check with Supabase's security advisor.
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
---
|
|
219
|
+
|
|
220
|
+
## Chains with
|
|
221
|
+
|
|
222
|
+
- **Security spine** — entry: `plan-input-validation`; credentials:
|
|
223
|
+
`plan-secrets-audit`; data access: **this skill**; blast radius:
|
|
224
|
+
`plan-data-integrity`; observability: `plan-error-handling`.
|
|
225
|
+
- **`plan-secrets-audit`** — any exposed `service_role` key found here hands
|
|
226
|
+
straight over (rotation, not relocation).
|
|
227
|
+
- **Execution:** `db-migrator`, `backend-patterns`, `backend-db-performance`,
|
|
228
|
+
`audit-security`.
|
|
229
|
+
- **Verify:** Supabase security advisor + a second `plan-rls-audit` pass.
|
|
230
|
+
|
|
231
|
+
> Planned at high effort; executed at the default effort under the approved-plan execution rule (`approved-plan-execution.mdc`), which forbids reward hacking and feature deletion on any model. The plan says *which* tables are exposed; the rule constrains *how* the migration is allowed to touch them.
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: plan-secrets-audit
|
|
3
|
+
description: >
|
|
4
|
+
Plan-only scan of the working tree and git history for exposed or mis-scoped
|
|
5
|
+
keys, then a rotate-vs-relocate plan. Use when "hardcoded secrets", "did I
|
|
6
|
+
commit a key", "secret scan", "is my .env safe", or "rotate keys".
|
|
7
|
+
license: MIT
|
|
8
|
+
effort: high
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Secrets & Key-Scope Audit + Rotation Plan
|
|
12
|
+
|
|
13
|
+
**Degree of freedom: MIXED** — prefix scan is exact; rotate-vs-relocate
|
|
14
|
+
is judgment. Stay **plan-only**. Never print secret values.
|
|
15
|
+
|
|
16
|
+
## This skill vs neighbors
|
|
17
|
+
|
|
18
|
+
| Skill | Owns |
|
|
19
|
+
|---|---|
|
|
20
|
+
| **plan-secrets-audit** (this) | Rotate vs relocate leaked keys |
|
|
21
|
+
| `plan-security-audit` | OWASP umbrella (not the first secrets match) |
|
|
22
|
+
| `plan-rls-audit` | Table access control |
|
|
23
|
+
| `audit-env-parity` | Env/config drift |
|
|
24
|
+
|
|
25
|
+
## How to reason (every plan item)
|
|
26
|
+
|
|
27
|
+
1. **Propose** — rotate, relocate, or hygiene — say which, never print the value
|
|
28
|
+
2. **Risk** — who can use the key if it stays live (history counts)
|
|
29
|
+
3. **Keep-working** — keys that are scoped correctly and not in history
|
|
30
|
+
4. **Phase** — rotate → relocate → hygiene → optional scrub (do not execute)
|
|
31
|
+
|
|
32
|
+
## Worked example
|
|
33
|
+
|
|
34
|
+
> **Propose:** rotate the Stripe secret at `api/pay.ts` (last-4 only in the report); history presence means rotate, not `.env` move.
|
|
35
|
+
> **Risk:** `sk_` in committed history stays valid forever after a relocate.
|
|
36
|
+
> **Keep-working:** Stripe `pk_` in the client is publishable by design (still note the protector).
|
|
37
|
+
> **Phase:** Phase 1 — rotate exposed never-client secrets.
|
|
38
|
+
> **Redaction:** type + path + last 4 — never the secret.
|
|
39
|
+
|
|
40
|
+
**Role:** Senior security engineer (credential exposure + key scoping).
|
|
41
|
+
|
|
42
|
+
**Task:** Scan working tree and git history, classify each credential (rotate vs
|
|
43
|
+
relocate), score by scope and permanence, emit `plan-secrets-audit.md`. **Audit & plan
|
|
44
|
+
only — no rotation, scrubbing, or env edits until each phase is approved.**
|
|
45
|
+
|
|
46
|
+
**Find every leaked key. Decide rotate vs relocate. Change nothing until approved.**
|
|
47
|
+
|
|
48
|
+
A widely reported breach started with a hardcoded Supabase key in client JavaScript — combined
|
|
49
|
+
with RLS off, the public key became an admin backdoor. **A secret committed even once
|
|
50
|
+
lives in git history forever.** Moving it to `.env` later does nothing; the only real
|
|
51
|
+
fix is **rotation**.
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## When this fires
|
|
56
|
+
|
|
57
|
+
Trigger phrases: *"scan for secrets"*, *"are my keys exposed"*, *"did I commit an
|
|
58
|
+
API key"*, *"is my .env safe"*, *"rotate keys"*, *"about to open-source this"*,
|
|
59
|
+
*"pre-launch secret check"*.
|
|
60
|
+
|
|
61
|
+
Do **not** fire for: RLS policy correctness (`plan-rls-audit`), input/webhook
|
|
62
|
+
validation (`plan-input-validation`). This skill owns *credential exposure and
|
|
63
|
+
key scoping* specifically.
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## Why a dedicated skill
|
|
68
|
+
|
|
69
|
+
A grep finds strings. This skill adds the two judgments a grep can't: **scope**
|
|
70
|
+
(is this key *supposed* to be client-side?) and **permanence** (is it in history,
|
|
71
|
+
making relocation insufficient?).
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## The audit
|
|
76
|
+
|
|
77
|
+
### A · Pattern scan (working tree) [LOW freedom — run exactly]
|
|
78
|
+
Search outside `.env*` and server-only contexts for:
|
|
79
|
+
- Prefixes: `sk_`, `pk_`, `whsec_`, `service_role`, `eyJ...`, `AKIA`, `API_KEY`,
|
|
80
|
+
`SECRET`, `TOKEN`, long random blobs.
|
|
81
|
+
- Supabase: anon vs `service_role`.
|
|
82
|
+
- Any key in files that ship to the browser.
|
|
83
|
+
|
|
84
|
+
### B · Scope classification [HIGH freedom]
|
|
85
|
+
- **Safe client-side:** Supabase **anon**, Stripe **publishable** (`pk_`), public
|
|
86
|
+
analytics keys — note the protector dependency (RLS, Stripe design).
|
|
87
|
+
- **Never client-side (Critical if exposed):** **service_role**, Stripe **secret**
|
|
88
|
+
(`sk_`), **webhook secret** (`whsec_`), AWS secrets, DB URLs.
|
|
89
|
+
- **`NEXT_PUBLIC_` / `VITE_` / `EXPO_PUBLIC_` trap** — bundled into client.
|
|
90
|
+
|
|
91
|
+
### C · Git history (rotate vs relocate) [HIGH freedom]
|
|
92
|
+
- Ever in committed history → **rotate** (relocation is theater).
|
|
93
|
+
- Scrubbing (filter-repo/BFG) is secondary — rotation first.
|
|
94
|
+
|
|
95
|
+
### D · Deployment env config (Vercel / AWS) [HIGH freedom]
|
|
96
|
+
- Secrets in platform env store, not baked into build.
|
|
97
|
+
- `.env.example` not committed with real values.
|
|
98
|
+
- No secrets as build args (persist in image layers).
|
|
99
|
+
|
|
100
|
+
### E · `.gitignore` & hygiene [HIGH freedom]
|
|
101
|
+
- `.env*` ignored; no secrets in README, comments, test fixtures.
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## Procedure [HIGH freedom]
|
|
106
|
+
|
|
107
|
+
1. **Scan** working tree (A), classify scope (B).
|
|
108
|
+
2. **Check history** for every credential (C).
|
|
109
|
+
3. **Review deploy + hygiene** (D, E).
|
|
110
|
+
4. **Score.** Never-client in client bundle or history = Critical.
|
|
111
|
+
5. **Phase.** **Emit `plan-secrets-audit.md`, then end the turn** with a standalone recap in chat: the two or three highest-impact findings (type + location + last 4, never the value) and the first phase to approve. The file is the deliverable — write it before the recap.
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
## Guardrails [LOW freedom — run exactly]
|
|
116
|
+
|
|
117
|
+
- **Plan only.** No rotation, history rewriting, or env edits.
|
|
118
|
+
- **Never print the secret.** Type + location + last 4 chars at most.
|
|
119
|
+
- **Rotate beats relocate — always say which.**
|
|
120
|
+
- **Don't assume safe-client keys are fine.** Hand anon-key + no-RLS to
|
|
121
|
+
`plan-rls-audit`.
|
|
122
|
+
- **Order:** rotate → update env store → redeploy → (optional) scrub history.
|
|
123
|
+
|
|
124
|
+
## Self-critique before the burndown [LOW freedom — do not skip]
|
|
125
|
+
|
|
126
|
+
1. **evidenced-not-assumed** — type + location + last 4; never the secret value
|
|
127
|
+
2. **plan-only** — no rotation, scrub, or env edit this pass
|
|
128
|
+
3. **phase justified** — history → rotate is Phase 1, not "move to `.env`"
|
|
129
|
+
4. **right-owner** — anon-key + no-RLS → `plan-rls-audit`; generic OWASP → `plan-security-audit`
|
|
130
|
+
5. **no-false-safety** — relocate-without-rotate is theater; safe-client still needs its protector
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
## Report template — `plan-secrets-audit.md`
|
|
135
|
+
|
|
136
|
+
```markdown
|
|
137
|
+
# Secrets & Key-Scope Audit — <repo>
|
|
138
|
+
|
|
139
|
+
_Audit-only. No key is rotated, moved, or scrubbed until each phase is approved._
|
|
140
|
+
|
|
141
|
+
## Scope
|
|
142
|
+
- Scanned: working tree ☐ git history ☐ deploy env (Vercel/AWS) ☐
|
|
143
|
+
- Assumptions / not inspected: …
|
|
144
|
+
|
|
145
|
+
## Verdict
|
|
146
|
+
| Severity | Count | Worst case |
|
|
147
|
+
|----------|-------|-----------|
|
|
148
|
+
| Critical | n | never-client secret exposed / in history |
|
|
149
|
+
| High | n | committed .env values, public-prefix leak |
|
|
150
|
+
| Medium | n | shared-env keys, hygiene |
|
|
151
|
+
|
|
152
|
+
## Findings
|
|
153
|
+
| # | Key type | Location | Scope bucket | In history? | Action | Sev |
|
|
154
|
+
|---|----------|----------|--------------|-------------|--------|-----|
|
|
155
|
+
| S1 | Supabase service_role | lib/admin.ts:4 | never-client | YES | ROTATE now | Crit |
|
|
156
|
+
| S2 | Stripe secret sk_ | api/pay.ts:2 | never-client | YES | ROTATE now | Crit |
|
|
157
|
+
| S3 | Supabase anon | client.ts:6 | safe-client | n/a | OK if RLS holds → plan-rls-audit | — |
|
|
158
|
+
| S4 | DB URL | .env.example | never-client | YES | ROTATE + remove from example | High |
|
|
159
|
+
|
|
160
|
+
## Phased burndown
|
|
161
|
+
- **Phase 1 — Rotate exposed never-client secrets** → dashboard rotation + Vercel/AWS env update (grace window)
|
|
162
|
+
- **Phase 2 — Relocate clean secrets** → move to env store, fix NEXT_PUBLIC_ leaks
|
|
163
|
+
- **Phase 3 — Hygiene** → .gitignore, remove committed examples, CI secret scanner
|
|
164
|
+
- **Phase 4 — (optional) Scrub history** → filter-repo/BFG, after rotation
|
|
165
|
+
|
|
166
|
+
## Execution handoff
|
|
167
|
+
Approve a phase to run it. Cross-hand safe-client keys to `plan-rls-audit`.
|
|
168
|
+
Add a pre-commit secret scanner (`create-hook`) so this can't regress.
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
## Chains with
|
|
174
|
+
|
|
175
|
+
- **Security spine** — credentials layer (**this skill**); cross-hand to
|
|
176
|
+
`plan-rls-audit` for anon-key safety.
|
|
177
|
+
- **`create-hook`** — pre-commit secret-scanning hook as regression guard.
|
|
178
|
+
- **Execution:** provider dashboards, Vercel/AWS env, `audit-security`.
|
|
179
|
+
- **Verify:** re-scan working tree + history; confirm rotated keys are dead.
|
|
180
|
+
|
|
181
|
+
> Planned at high effort; executed at the default effort under the approved-plan execution rule (`approved-plan-execution.mdc`), which forbids reward hacking and feature deletion on any model. Rotation is irreversible-ish — the plan says *which* keys; the rule constrains *how* and *in what order*.
|