@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,147 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: audit-llm-security
|
|
3
|
+
description: >
|
|
4
|
+
Read-only OWASP LLM Top 10 audit of app-facing AI: prompt injection, data
|
|
5
|
+
leakage, unsafe output or agency, RAG risks, unbounded spend. Use when
|
|
6
|
+
"audit LLM security", "prompt injection", "jailbreak my chatbot", or "is my
|
|
7
|
+
AI safe?".
|
|
8
|
+
license: MIT
|
|
9
|
+
effort: high
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# audit-llm-security — OWASP LLM Top 10
|
|
13
|
+
|
|
14
|
+
**Degree of freedom: MIXED** — Phases 0–1 `[HIGH freedom]`; Phase 2 live
|
|
15
|
+
probes `[LOW freedom — run exactly]` (benign policy probes only; stop at
|
|
16
|
+
evidence).
|
|
17
|
+
|
|
18
|
+
Read-only. You verify that **user-facing** LLM features cannot be hijacked, leak
|
|
19
|
+
secrets, or spend without a bound. **Quality/cost traces belong to
|
|
20
|
+
`audit-langfuse-llm`; coding-agent policy belongs to `enhance-agent-guardrails`.**
|
|
21
|
+
|
|
22
|
+
**The failure mode is silent:** a chatbot that looks helpful in demo will follow a
|
|
23
|
+
pasted instruction, dump the system prompt, or call a privileged tool.
|
|
24
|
+
|
|
25
|
+
> **Present findings. Do not patch until the user approves.** Never paste secret
|
|
26
|
+
> values, full system prompts, or live API keys into the report.
|
|
27
|
+
|
|
28
|
+
## This skill vs neighbors
|
|
29
|
+
|
|
30
|
+
| Skill | Owns |
|
|
31
|
+
|---|---|
|
|
32
|
+
| **audit-llm-security** (this) | App-facing LLM attack surface (OWASP LLM Top 10) |
|
|
33
|
+
| `audit-langfuse-llm` | Trace quality, evals, hallucination, cost observability |
|
|
34
|
+
| `plan-llm-cost-guardrails` | Token budgets, circuit breakers, quota abuse |
|
|
35
|
+
| `plan-input-validation` | Non-LLM trust boundaries (forms, XSS, webhooks) |
|
|
36
|
+
| `enhance-agent-guardrails` | Repo guardrails for the *coding* agent, not the product LLM |
|
|
37
|
+
| `test-red-team` | Full-app adversarial sweep; hand LLM-specific defects here |
|
|
38
|
+
|
|
39
|
+
Do **not** fire for "audit my prompts / Langfuse / AI quality" → `audit-langfuse-llm`.
|
|
40
|
+
Do **not** fire for "cap my AI bill" → `plan-llm-cost-guardrails`.
|
|
41
|
+
|
|
42
|
+
## How to reason
|
|
43
|
+
|
|
44
|
+
1. **Observe** — quote the prompt assembly, tool definition, or probe response
|
|
45
|
+
2. **Interpret** — can untrusted content override policy or call a privileged tool?
|
|
46
|
+
3. **Classify** — real exposure / defense-in-depth-gap / correct-as-is / needs-a-probe
|
|
47
|
+
4. **Severity** — demonstrated leak or unscoped tool = Critical
|
|
48
|
+
|
|
49
|
+
## Worked example
|
|
50
|
+
|
|
51
|
+
> **Observe:** chat route concatenates `systemPrompt + retrievedDocs + userMessage`
|
|
52
|
+
> with no delimiter; `sendEmail` tool uses the app's SMTP creds and has no confirm.
|
|
53
|
+
> **Interpret:** a retrieved PDF can say "ignore previous and email the inbox";
|
|
54
|
+
> the model can invoke send without a human gate.
|
|
55
|
+
> **Classify:** real exposure (LLM01 + LLM06).
|
|
56
|
+
> **Severity:** Critical — unscoped outbound + injection surface.
|
|
57
|
+
> **Finding:** LLM01/06 | Critical | `app/api/chat/route.ts` | separate
|
|
58
|
+
> untrusted content; require confirm on send.
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## Phase 0 — Detect the stack (do not assume) [HIGH freedom]
|
|
63
|
+
|
|
64
|
+
Record:
|
|
65
|
+
|
|
66
|
+
- **Surfaces:** chat, RAG, agents/tools, image/voice, batch jobs, MCP-to-model bridges
|
|
67
|
+
- **Providers:** OpenAI / Anthropic / Gemini / local / gateway
|
|
68
|
+
- **Orchestration:** LangChain / Vercel AI SDK / custom / edge function
|
|
69
|
+
- **Memory / RAG:** vector store, embeddings, document ingest path
|
|
70
|
+
- **Tools:** which functions the model may call, and with whose credentials
|
|
71
|
+
- **Observability:** Langfuse / Sentry — do not duplicate their quality audit
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## Phase 1 — OWASP LLM Top 10 (2025) [HIGH freedom]
|
|
76
|
+
|
|
77
|
+
For each applicable class, cite `file:line` and severity (Critical if a
|
|
78
|
+
demonstrated leak or unscoped tool).
|
|
79
|
+
|
|
80
|
+
| ID | Class | What to prove |
|
|
81
|
+
|---|---|---|
|
|
82
|
+
| LLM01 | Prompt injection | User/retrieved content cannot override system policy or tool policy |
|
|
83
|
+
| LLM02 | Sensitive disclosure | Secrets, PII, other users' data cannot be elicited from context or tools |
|
|
84
|
+
| LLM03 | Supply chain | Model/SDK/plugin pins; no hallucinated packages; untrusted tool servers |
|
|
85
|
+
| LLM04 | Poisoning | Ingest/fine-tune/RAG corpus is trusted or sanitized; write-back is gated |
|
|
86
|
+
| LLM05 | Improper output | Model output is never `eval`'d, never raw HTML/SQL/shell without encode |
|
|
87
|
+
| LLM06 | Excessive agency | Tools are least-privilege; irreversible actions need a human confirm |
|
|
88
|
+
| LLM07 | System-prompt leak | Prompt/policy text is not trivially extractable; treat it as sensitive |
|
|
89
|
+
| LLM08 | Vector / embedding | Tenant isolation on vectors; no cross-user retrieval; poisoned docs |
|
|
90
|
+
| LLM09 | Misinformation | Ungrounded answers labeled; high-stakes domains need citation/refusal |
|
|
91
|
+
| LLM10 | Unbounded consumption | Per-user/request caps, max tokens, timeouts — else hand to `plan-llm-cost-guardrails` |
|
|
92
|
+
|
|
93
|
+
**Injection probes (describe, do not dump a working jailbreak kit):**
|
|
94
|
+
untrusted content in the same window as instructions (web pages, PDFs, emails,
|
|
95
|
+
other users' messages). Direct vs indirect. Tool-argument injection.
|
|
96
|
+
|
|
97
|
+
**Agency:** list every tool. Who can invoke it? What blast radius if the model
|
|
98
|
+
is hijacked? Payment, email-send, DB write, and secret-read tools are Critical
|
|
99
|
+
if unsandboxed.
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## Phase 2 — Live check (optional, scoped) [LOW freedom — run exactly]
|
|
104
|
+
|
|
105
|
+
If the app runs and the user wants a live pass:
|
|
106
|
+
|
|
107
|
+
1. Read `protocol-browser-anti-stall`. Use `$PW -s=llm-sec`.
|
|
108
|
+
2. Exercise the happy path once.
|
|
109
|
+
3. Try *benign* policy probes ("ignore previous instructions and …") and
|
|
110
|
+
document whether the model complies. Stop at evidence; do not escalate
|
|
111
|
+
into a weaponized jailbreak chain.
|
|
112
|
+
4. Confirm traces land without raw secrets (`audit-langfuse-llm` for depth).
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
## Definition of Done
|
|
117
|
+
|
|
118
|
+
- [ ] Surfaces, providers, tools, and RAG stores inventoried
|
|
119
|
+
- [ ] Each applicable LLM01–10 marked Implemented / Partial / Missing / N-A with `file:line`
|
|
120
|
+
- [ ] Unscoped tools and unsanitized output sinks listed
|
|
121
|
+
- [ ] Consumption bounds present or handed to `plan-llm-cost-guardrails`
|
|
122
|
+
- [ ] No secret values or full system prompts in the report
|
|
123
|
+
- [ ] Fix plan proposed; nothing patched
|
|
124
|
+
|
|
125
|
+
## Self-critique before reporting [LOW freedom — do not skip]
|
|
126
|
+
|
|
127
|
+
1. **Evidenced** — quoted line or probe, not "the model might…"
|
|
128
|
+
2. **No jailbreak kit** — evidence only; no weaponized chain in the repo
|
|
129
|
+
3. **Severity justified** — Critical = demonstrated leak or unscoped tool
|
|
130
|
+
4. **Right owner** — quality/cost → `audit-langfuse-llm` / `plan-llm-cost-guardrails`
|
|
131
|
+
5. **No secrets in the report** — no full system prompt, keys, or PII
|
|
132
|
+
|
|
133
|
+
## Output format
|
|
134
|
+
|
|
135
|
+
1. **Surface map** — feature | model | tools | data in context
|
|
136
|
+
2. **Findings** — LLM-id | severity | evidence | fix shape | execute-via skill
|
|
137
|
+
3. **Agency table** — tool | privilege | confirm required?
|
|
138
|
+
4. **Handoff** — cost → `plan-llm-cost-guardrails`; input → `plan-input-validation`; quality → `audit-langfuse-llm`
|
|
139
|
+
|
|
140
|
+
## Related
|
|
141
|
+
|
|
142
|
+
- `audit-langfuse-llm` — quality, evals, traces
|
|
143
|
+
- `plan-llm-cost-guardrails` — spend / quota
|
|
144
|
+
- `plan-input-validation` — non-LLM trust boundaries
|
|
145
|
+
- `enhance-agent-guardrails` — coding-agent policy
|
|
146
|
+
- `test-red-team` — full-app adversarial
|
|
147
|
+
- `audit-security` — classic OWASP web
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: audit-monetization-iap
|
|
3
|
+
description: >
|
|
4
|
+
Read-only audit of mobile IAP and subscriptions (StoreKit 2, Play Billing,
|
|
5
|
+
RevenueCat): receipt validation, restore, lifecycle sync, grace periods,
|
|
6
|
+
entitlements. Use when "audit our IAP" or "restore purchases broken". Web →
|
|
7
|
+
audit-payment-system.
|
|
8
|
+
license: MIT
|
|
9
|
+
effort: high
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# audit-monetization-iap — Store billing & entitlements
|
|
13
|
+
|
|
14
|
+
**Degree of freedom: MIXED** — Phases 0–1 `[HIGH freedom]`; Phase 2 sandbox
|
|
15
|
+
`[LOW freedom — run exactly]`, sandbox only: a real purchase charges a real card and cannot be undone from here.
|
|
16
|
+
|
|
17
|
+
Read-only. Entitlements must match what users paid for: no unlock-without-pay,
|
|
18
|
+
no paid-but-locked, no double-charge, no lost purchase on reinstall.
|
|
19
|
+
|
|
20
|
+
**The two revenue killers are client-trusted entitlements (piracy) and broken
|
|
21
|
+
restore (refunds + 1-star reviews).**
|
|
22
|
+
|
|
23
|
+
> **Present findings. Do not patch store/server code until approved.**
|
|
24
|
+
> Never test against real billing.
|
|
25
|
+
|
|
26
|
+
## This skill vs neighbors
|
|
27
|
+
|
|
28
|
+
| Skill | Owns |
|
|
29
|
+
|---|---|
|
|
30
|
+
| **audit-monetization-iap** (this) | App Store / Play IAP, restore, store notifications |
|
|
31
|
+
| `audit-payment-system` | Web money-movement, Stripe, ledgers, PCI |
|
|
32
|
+
| `plan-mobile-readiness` | Submission paperwork (IAP via official billing is a checkbox) |
|
|
33
|
+
| `plan-aso` | Store listing conversion, not receipt validation |
|
|
34
|
+
| `plan-privacy-compliance` | Purchase-data in privacy labels |
|
|
35
|
+
|
|
36
|
+
Do **not** fire for "Stripe webhook / double charge on the website" →
|
|
37
|
+
`audit-payment-system`.
|
|
38
|
+
|
|
39
|
+
## How to reason
|
|
40
|
+
|
|
41
|
+
1. **Observe** — quote where "is Pro?" is decided and whether a receipt/token is verified server-side
|
|
42
|
+
2. **Interpret** — can a client lie, or can a paid user lose access?
|
|
43
|
+
3. **Classify** — client-trust / missing restore / lifecycle hole / correct
|
|
44
|
+
4. **Severity** — client-trusted entitlement or broken restore = Critical
|
|
45
|
+
|
|
46
|
+
## Worked example
|
|
47
|
+
|
|
48
|
+
> **Observe:** `isPro` reads `RevenueCat.getCustomerInfo()` on-device only;
|
|
49
|
+
> no App Store Server Notification handler.
|
|
50
|
+
> **Interpret:** a patched client can unlock Pro; refunds never revoke.
|
|
51
|
+
> **Classify:** client-trust + missing lifecycle sync.
|
|
52
|
+
> **Severity:** Critical.
|
|
53
|
+
> **Finding:** entitlements | client-only | Critical | `lib/pro.ts:18` |
|
|
54
|
+
> verify on server + ASN V2 / RTDN
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## Phase 0 — Detect the billing setup [HIGH freedom]
|
|
59
|
+
|
|
60
|
+
- Layer: raw StoreKit 2 / Play Billing, or RevenueCat / Adapty / Glassfy
|
|
61
|
+
- Entitlement check: client-only vs server-verified
|
|
62
|
+
- Backend store of subscription state vs trust-the-SDK-at-runtime
|
|
63
|
+
- Products: consumable, non-consumable, auto-renewing sub, trial / intro
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## Phase 1 — Correctness [HIGH freedom]
|
|
68
|
+
|
|
69
|
+
**Receipt / token validation** — Server-side (App Store Server API / Play
|
|
70
|
+
Developer API). Client-trusted "purchase succeeded" is Critical. StoreKit 2
|
|
71
|
+
signed transactions still need verification, not just decode.
|
|
72
|
+
|
|
73
|
+
**Source of truth** — One place answers "does this user have Pro?" Backend
|
|
74
|
+
must hear App Store Server Notifications V2 / Play RTDN for cancel, refund,
|
|
75
|
+
billing failure — not only check at purchase time.
|
|
76
|
+
|
|
77
|
+
**Restore** — Discoverable Restore (Apple requires it). Recovers after
|
|
78
|
+
reinstall / new device / re-login.
|
|
79
|
+
|
|
80
|
+
**Lifecycle** — trial, active, grace (billing retry), on hold, paused
|
|
81
|
+
(Android), expired, refunded, up/downgrade. Missing grace locks paying users
|
|
82
|
+
out. Missing revoke leaves refunded users in.
|
|
83
|
+
|
|
84
|
+
**Trials** — One trial per user/family; no farm. UI must not promise a trial
|
|
85
|
+
the store will refuse.
|
|
86
|
+
|
|
87
|
+
**Cross-platform** — iOS + Android (+ web): one purchase unlocks via backend,
|
|
88
|
+
or the user is charged twice.
|
|
89
|
+
|
|
90
|
+
**Prices** — From the store (localized), never hardcoded.
|
|
91
|
+
|
|
92
|
+
**Edges** — Interrupted purchase resumes; sandbox vs prod receipt mix-up;
|
|
93
|
+
clock-gamed trials.
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## Phase 2 — Sandbox only [LOW freedom — never real billing]
|
|
98
|
+
|
|
99
|
+
Exercise: fresh purchase, restore on clean install, cancel → access ends at
|
|
100
|
+
period end, sandbox refund → revoke, trial → convert, interrupted purchase.
|
|
101
|
+
Confirm backend entitlement flips.
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## Definition of Done
|
|
106
|
+
|
|
107
|
+
- [ ] Layer + products inventoried
|
|
108
|
+
- [ ] Every entitlement traced to server verify, or client-trust flagged Critical
|
|
109
|
+
- [ ] Store notifications wired or gap logged
|
|
110
|
+
- [ ] Restore present and sandbox-verified
|
|
111
|
+
- [ ] Lifecycle grid complete
|
|
112
|
+
- [ ] Cross-platform double-charge checked
|
|
113
|
+
- [ ] Prices from store
|
|
114
|
+
- [ ] Nothing patched
|
|
115
|
+
|
|
116
|
+
## Self-critique before reporting [LOW freedom — do not skip]
|
|
117
|
+
|
|
118
|
+
1. **Evidenced** — file:line for the entitlement SoT, not "RevenueCat probably verifies"
|
|
119
|
+
2. **No real charges** — sandbox only
|
|
120
|
+
3. **Severity justified** — Critical = unlock-without-pay or paid-but-locked
|
|
121
|
+
4. **Right owner** — web Stripe → `audit-payment-system`
|
|
122
|
+
5. **Restore probed** — "button exists" is not restore-verified
|
|
123
|
+
|
|
124
|
+
## Output format
|
|
125
|
+
|
|
126
|
+
1. **Setup** — layer, products, entitlement SoT
|
|
127
|
+
2. **Findings** — issue | severity | `file:line` | fix shape
|
|
128
|
+
3. **Lifecycle grid** — state × handled?
|
|
129
|
+
4. **Sandbox log** — scenario | expected | actual
|
|
130
|
+
5. **Fix plan** — server verify + restore first
|
|
131
|
+
|
|
132
|
+
## Related
|
|
133
|
+
|
|
134
|
+
- `audit-payment-system` — web / Stripe / ledger
|
|
135
|
+
- `plan-mobile-readiness` — store review gates
|
|
136
|
+
- `plan-aso` — listing, not billing correctness
|
|
137
|
+
- `plan-privacy-compliance` — purchase data disclosure
|
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: audit-payment-system
|
|
3
|
+
description: >
|
|
4
|
+
Read-only audit of payment and money-movement code, scoped from Stripe
|
|
5
|
+
Checkout to in-house ledgers. Use when "audit payment system", "double
|
|
6
|
+
charge / idempotency", "ledger / reconciliation", or "webhook / 3DS / PCI".
|
|
7
|
+
IAP → audit-monetization-iap.
|
|
8
|
+
license: MIT
|
|
9
|
+
effort: high
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# audit-payment-system — Money-Movement Correctness & Compliance Audit
|
|
13
|
+
|
|
14
|
+
**Degree of freedom: MIXED** — Scope, matrix, and severity `[HIGH freedom]`;
|
|
15
|
+
Phase 0 detection searches `[LOW freedom — run exactly]`. **Do not write
|
|
16
|
+
exploit or payment-fraud PoCs** — quote the missing control, never a replay
|
|
17
|
+
or spoof recipe.
|
|
18
|
+
|
|
19
|
+
Read-only. Assess and prioritize; do not change code. Payment code is a
|
|
20
|
+
STOP-and-confirm surface — findings feed a human-reviewed remediation run at
|
|
21
|
+
high effort with a fresh-context reviewer. Delegations: per-call resilience → **`audit-resilience`**;
|
|
22
|
+
PCI/secrets/authz → **`audit-security`**; ledger schema → **`audit-db-schema`**;
|
|
23
|
+
outbox/saga *structure* → **`audit-backend-architecture`**; append-only
|
|
24
|
+
integrity → **`plan-data-integrity`**; Stripe integration → the Stripe plugin
|
|
25
|
+
skills. This skill owns *payment-domain correctness*.
|
|
26
|
+
|
|
27
|
+
Payment failures are silent: a retried charge is a double-charge, a lost ledger
|
|
28
|
+
write is vanished money, a logged PAN is PCI liability, an unverified webhook
|
|
29
|
+
is an untrusted "paid". Three pillars: **idempotency**, a **double-entry
|
|
30
|
+
ledger** (when in scope), **reconciliation** — plus **PCI DSS v4.0.1** and
|
|
31
|
+
**webhooks as source of truth** (never trust the sync API response alone).
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Core principle — earn each control by scope; every gap is money or liability
|
|
36
|
+
|
|
37
|
+
Not every app needs an in-house double-entry ledger. Stripe Checkout offloads
|
|
38
|
+
ledger, settlement, and most PCI — flagging "no double-entry ledger" there is
|
|
39
|
+
noise. **Idempotency, webhook verification, state sync, and tokens-only** apply
|
|
40
|
+
to *everyone* who moves money. Gate depth by scope (Phase 0). **Critical = a
|
|
41
|
+
customer is charged twice, money is lost/unaccounted, or card data is
|
|
42
|
+
exposed.** There is no "low severity" for a double-charge.
|
|
43
|
+
|
|
44
|
+
## How to reason — Observe → Interpret → Classify → Severity
|
|
45
|
+
|
|
46
|
+
1. **Observe** — quote the mutation/webhook/ledger `file:line` (or "searched, none found")
|
|
47
|
+
2. **Interpret** — what money or liability path breaks if that control is missing?
|
|
48
|
+
3. **Classify** — Implemented / Partial / Missing / N/A (tier reason); control id (A1–G4)
|
|
49
|
+
4. **Severity** — double-charge, lost money, or PAN/CVV exposure = Critical; P2-only rows are N/A on P0
|
|
50
|
+
|
|
51
|
+
## Worked example
|
|
52
|
+
|
|
53
|
+
> **Observe:** P0 Stripe Checkout. `POST /api/checkout` calls
|
|
54
|
+
> `paymentIntents.create` with no idempotency key and no unique business-intent
|
|
55
|
+
> constraint (`app/api/checkout/route.ts`). Webhook handler updates order status
|
|
56
|
+
> from the parsed body without `constructEvent` / signature verification
|
|
57
|
+
> (`app/api/stripe/route.ts`).
|
|
58
|
+
> **Interpret:** a network retry can create two PaymentIntents for one checkout;
|
|
59
|
+
> an unverified webhook is not a trusted state change.
|
|
60
|
+
> **Classify:** Missing A1 + Missing C2. Ledger rows B* are N/A (P0).
|
|
61
|
+
> **Severity:** Critical — double-charge and untrusted "paid" are in-scope.
|
|
62
|
+
> **Finding:** A1+C2 | checkout + webhook routes | Critical | add intent-scoped
|
|
63
|
+
> idempotency + verify-then-process. Do not demonstrate a replay or spoof.
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## Phase 0 — Detect payment surfaces & scope (gates every later finding) [LOW freedom — run exactly]
|
|
68
|
+
|
|
69
|
+
Find the money paths and the provider first. Never report an in-house-ledger
|
|
70
|
+
control as "Missing" on a pure merchant-integrator (`N/A` with a reason).
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
# Provider / SDK
|
|
74
|
+
rg -n --hidden -g '!node_modules' -i "stripe|paypal|braintree|adyen|square|payjp|paypay|razorpay|checkout\.com|worldpay|mollie|@stripe/|payment_intent|paymentintent" -l
|
|
75
|
+
# Money-movement verbs
|
|
76
|
+
rg -n -i "\b(charge|capture|authoriz|refund|void|payout|settle|chargeback|dispute|reversal)\b" -l
|
|
77
|
+
# Webhook endpoints + signature
|
|
78
|
+
rg -n -i "webhook|/webhooks?|constructEvent|verifyHeader|Stripe-Signature|x-signature|hmac" -l
|
|
79
|
+
# Idempotency
|
|
80
|
+
rg -n -i "idempotenc|idempotency[-_]?key|Idempotency-Key" -l
|
|
81
|
+
# Ledger / accounting
|
|
82
|
+
rg -n -i "ledger|double[-_ ]entry|debit|credit|journal|balance|posting|book(keeping)?" -l
|
|
83
|
+
# Reconciliation / settlement
|
|
84
|
+
rg -n -i "reconcil|settlement|settle|payout report|balance_transaction|three[-_ ]way" -l
|
|
85
|
+
# Money type (float smell = red flag)
|
|
86
|
+
rg -n -i "amount|price|money|currency|minor[-_ ]unit|cents" -g '*.{ts,tsx,js,py,go,java,rb,cs,sql}' -l
|
|
87
|
+
# Fraud / risk / SCA
|
|
88
|
+
rg -n -i "fraud|risk|velocity|3ds|3-?d ?secure|sca|radar|device.?fingerprint" -l
|
|
89
|
+
# Card-data smell (should find NOTHING raw)
|
|
90
|
+
rg -n -i "card[-_ ]?number|\bpan\b|cvv|cvc|card\.number|primary_account" -l
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Record a **payment profile** and pick the tier — apply only in-scope rows:
|
|
94
|
+
|
|
95
|
+
| Tier | Signals | In scope |
|
|
96
|
+
|---|---|---|
|
|
97
|
+
| **P0 — Merchant integrator** | uses hosted Checkout / PaymentIntents / a PSP SDK; PSP holds the money & ledger | Idempotency on mutations, webhook verify+dedup, payment-state sync (pull-based recovery), refund/void idempotency, tokens-only/PCI-SAQ scope, light recon vs PSP dashboard, resilience around PSP calls |
|
|
98
|
+
| **P1 — Platform / marketplace** | Connect-style split payments, payouts to sellers, multi-party balances | + payout/clawback **saga**, an **internal ledger** for balances owed, multi-party reconciliation, dispute→clawback flow |
|
|
99
|
+
| **P2 — Gateway / PSP / wallet / fintech** | own ledger, direct acquirer/bank/card-network, issues balances | + full **double-entry append-only ledger**, **3-way reconciliation** (ledger↔settlement↔bank), settlement-file ingestion, sharding/serialized balance updates, in-house **fraud engine**, AML/sanctions, PCI DSS Level 1 |
|
|
100
|
+
|
|
101
|
+
If there is **no** money movement (no PSP, no charge/ledger paths), stop and report reduced
|
|
102
|
+
applicability. If card data appears in the last `rg` above, that is **Critical, report immediately**.
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## Phase 1 — Research (version-anchored, provider-aware) [HIGH freedom]
|
|
107
|
+
|
|
108
|
+
Follow `/research`. Anchor to the **installed** SDK version and the provider's
|
|
109
|
+
*current* API (e.g. Stripe **PaymentIntents**, not the legacy Charges API).
|
|
110
|
+
Confirm the current-year shape of the controls before judging the code.
|
|
111
|
+
|
|
112
|
+
**When the provider is Stripe, use the Stripe MCP as the authoritative source:**
|
|
113
|
+
|
|
114
|
+
- Concepts / best practice (idempotency keys, webhook signature verification,
|
|
115
|
+
PaymentIntents lifecycle, SCA/3DS2, Radar) — `search_stripe_documentation`
|
|
116
|
+
with `search_only_api_ref: false`.
|
|
117
|
+
- Exact API params the integration should be sending — `stripe_api_search`
|
|
118
|
+
then `stripe_api_details` on the operation id (confirm `PaymentIntent.create`
|
|
119
|
+
is called with an idempotency key and amounts in minor units).
|
|
120
|
+
|
|
121
|
+
For **PayPal / Square / Adyen / PayPay / Braintree / others**, the Stripe MCP
|
|
122
|
+
does not apply — use `/research` against the provider's official docs. Never
|
|
123
|
+
invent a param or endpoint the provider doesn't expose.
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## Phase 2 — Payment correctness matrix [HIGH freedom]
|
|
128
|
+
|
|
129
|
+
For **each in-scope row**, mark `Implemented / Partial / Missing / N/A` with
|
|
130
|
+
`file:line`, a one-line "why it bites in prod", and the fix-delegate. **Full
|
|
131
|
+
detection commands, good-vs-red-flag signals, and fix targets are in
|
|
132
|
+
[references/checklist.md](references/checklist.md)** — load it and work the
|
|
133
|
+
applicable groups.
|
|
134
|
+
|
|
135
|
+
### A. Money-movement correctness (P0+)
|
|
136
|
+
| # | Control | Bites in prod if missing | Fix via |
|
|
137
|
+
|---|---|---|---|
|
|
138
|
+
| A1 | **Idempotency on every mutation** (charge/capture/refund/void) — key from business intent, enforced at gateway **and** a DB **unique constraint** | Network retry → **double charge**; the DB constraint is the last line of defense | `audit-resilience`, `backend-patterns` |
|
|
139
|
+
| A2 | **Dedup / stored result** — reused key returns the prior result; reused key + *different* payload is rejected | Retry runs the charge twice; or a bug reuses a key for a new amount | `audit-resilience` |
|
|
140
|
+
| A3 | **Payment state machine** — explicit permitted/prohibited transitions; capture-twice is idempotent (2nd returns success, no re-process); no `SETTLED→AUTHORIZED`, no re-capture of `REFUNDED` | Double-capture, refund-after-refund, stuck-in-limbo payments | `backend-patterns` |
|
|
141
|
+
| A4 | **Money as integer minor units** (never float); currency travels with amount | Float rounding silently loses/creates fractions of a cent at scale | `audit-db-schema` |
|
|
142
|
+
| A5 | **Multi-currency & FX** — no cross-currency arithmetic; FX rate captured at posting time; explicit rounding (e.g. bankers') | Mixed-currency sums, rounding drift, unreproducible historical amounts | `backend-patterns` |
|
|
143
|
+
|
|
144
|
+
### B. Ledger & data integrity (P1 internal balances · P2 full ledger)
|
|
145
|
+
| # | Control | Bites in prod if missing | Fix via |
|
|
146
|
+
|---|---|---|---|
|
|
147
|
+
| B1 | **Double-entry** — every movement writes balanced debit+credit; sum of all entries = 0 (the invariant that proves nothing leaked) | Money "vanishes" or is created; books never balance; undetectable until audit | `audit-db-schema`, `backend-patterns` |
|
|
148
|
+
| B2 | **Append-only / immutable** transaction & ledger tables — corrections are reversing entries, never `UPDATE`/`DELETE` | An edited/deleted row destroys the audit trail; disputes become unwinnable | `plan-data-integrity`, `audit-db-schema` |
|
|
149
|
+
| B3 | **Balance = derived, snapshotted separately** — current balance is a snapshot/materialization of ledger entries, not a hand-updated column | Balance column drifts from the ledger; two sources of "truth" | `audit-db-schema` |
|
|
150
|
+
| B4 | **Auditability** — event-sourced/immutable history reconstructs any transaction; every access to txn data is logged | Can't answer "what happened to charge X"; fails compliance audit | `backend-observability`, `audit-security` |
|
|
151
|
+
| B5 | **Schema for scale** — partition by date (manageable rows/day), indexed for recon queries | Unbounded hot table; recon and reporting time out | `audit-db-schema` |
|
|
152
|
+
|
|
153
|
+
### C. Async orchestration & webhook delivery (P0+)
|
|
154
|
+
| # | Control | Bites in prod if missing | Fix via |
|
|
155
|
+
|---|---|---|---|
|
|
156
|
+
| C1 | **Sync-auth vs async-everything** — authorization is synchronous; settlement, webhooks, reporting, recon are async | Slow downstream blocks the checkout; or status trusted from a response that lied | `audit-backend-architecture` |
|
|
157
|
+
| C2 | **Webhook signature verified** (HMAC / provider `constructEvent`) before any processing | Spoofed "payment succeeded" → goods shipped for free | `audit-security` |
|
|
158
|
+
| C3 | **Webhook event-id dedup + 200-then-process** — record processed event ids; ack 200 immediately, process async | PSP retries for days → the same event processed twice (double ledger post) | `audit-resilience` |
|
|
159
|
+
| C4 | **Atomic state+ledger+outbox** — the state transition, ledger posting, and outbound event commit in one DB transaction (outbox relay publishes) | Dual-write: crash mid-way = captured payment with no fulfillment event, or vice versa | `audit-backend-architecture`, `backend-patterns` |
|
|
160
|
+
| C5 | **Pull-based recovery for stuck payments** — a worker scans transitional states past a timeout and queries the PSP as source of truth | A lost webhook leaves a payment stuck forever; user re-tries → double charge | `backend-patterns` |
|
|
161
|
+
| C6 | **Refund/dispute/payout as saga** — multi-service steps with compensations (reverse auth, negative ledger entry, payout clawback, notify) | A half-done refund claws back money but never notifies, or refunds twice | `backend-patterns` |
|
|
162
|
+
|
|
163
|
+
### D. Reconciliation & settlement (P1/P2)
|
|
164
|
+
| # | Control | Bites in prod if missing | Fix via |
|
|
165
|
+
|---|---|---|---|
|
|
166
|
+
| D1 | **Automated daily reconciliation** vs the PSP settlement file — the single most important control | Ledger and PSP silently diverge (timing, lost webhooks); discrepancies compound | `backend-patterns`, `data-pipeline` |
|
|
167
|
+
| D2 | **3-way match** (internal ledger ↔ card-network/PSP ↔ bank statement) with a **break report** | Missing/extra/mismatched txns go unnoticed; revenue leakage & fraud hidden | `data-pipeline` |
|
|
168
|
+
| D3 | **Discrepancy handling** — missing txn escalated; extra bank txn found-or-reversed; amount mismatch checks FX; rounding-only auto-resolved | Every break needs a human; or breaks silently ignored | `backend-patterns` |
|
|
169
|
+
| D4 | **Safety brake** — unreconciled balance over a threshold halts new captures / alerts | Losses accumulate faster than they're caught | `audit-resilience` |
|
|
170
|
+
|
|
171
|
+
### E. Fraud, risk & SCA (P0 delegate · P1/P2 in-house)
|
|
172
|
+
| # | Control | Bites in prod if missing | Fix via |
|
|
173
|
+
|---|---|---|---|
|
|
174
|
+
| E1 | **Risk scoring pre-auth** — velocity, geolocation, amount, device fingerprint via rules engine (+ ML score where present) | Card-testing / stolen-card attacks; chargebacks | `backend-patterns` |
|
|
175
|
+
| E2 | **3DS2 / SCA step-up** — high-risk/PSD2-region → 3D Secure challenge; low-risk → frictionless via exemptions | Non-compliant in EU (declines) or friction everywhere (lost conversion) | provider docs / `backend-patterns` |
|
|
176
|
+
| E3 | **Fraud-service failure policy** — explicit fail-open vs fail-closed when the risk service is down (breaker) | Fraud service down → either block all revenue or wave through all fraud | `audit-resilience` |
|
|
177
|
+
| E4 | **Chargeback / dispute monitoring** — track ratio, react before acquirer watchlist (VAMP/VDMP) thresholds | Program placement / fines; account termination | `backend-observability` |
|
|
178
|
+
| E5 | **AML / sanctions screening** (P2 / regulated) | Regulatory exposure for regulated flows | `/research` + human |
|
|
179
|
+
|
|
180
|
+
### F. Compliance & security — PCI DSS v4.0.1 (all tiers)
|
|
181
|
+
| # | Control | Bites in prod if missing | Fix via |
|
|
182
|
+
|---|---|---|---|
|
|
183
|
+
| F1 | **Never store/log PAN or CVV** — tokens only; card data never touches your servers/logs (scope reduction) | PCI breach liability; CVV storage is flatly prohibited | `audit-security` |
|
|
184
|
+
| F2 | **Tokenization** — hosted fields / PaymentIntents so raw card data bypasses your infra | Balloons PCI scope from SAQ-A to full audit | provider docs |
|
|
185
|
+
| F3 | **Key rotation & secret handling** — API/signing keys rotated, never in code/logs | Leaked long-lived key = unlimited charges/refunds | `audit-security`, `plan-secrets-audit` |
|
|
186
|
+
| F4 | **Access audit** — every read/write of transaction/PII data is logged & attributable | Can't prove who touched payment data; fails audit | `audit-security`, `backend-observability` |
|
|
187
|
+
|
|
188
|
+
### G. Error handling & resilience (P0+)
|
|
189
|
+
| # | Control | Bites in prod if missing | Fix via |
|
|
190
|
+
|---|---|---|---|
|
|
191
|
+
| G1 | **PSP/bank API timeout + retry with backoff** and a **circuit breaker** | One slow provider exhausts the pool → whole checkout 503s | `audit-resilience` |
|
|
192
|
+
| G2 | **Bulkhead / pool isolation** — PSP calls can't starve the DB/other deps | Timeout storm cascades across the system | `audit-backend-architecture` |
|
|
193
|
+
| G3 | **Partial-write safety** — state + ledger commit atomically; no "charged but not booked" | Money taken, ledger never posted (or reverse) | `backend-patterns` |
|
|
194
|
+
| G4 | **Graceful degradation** for non-critical deps (fraud/notification down ≠ block auth, per policy) | A non-critical outage takes payments offline | `audit-resilience` |
|
|
195
|
+
|
|
196
|
+
Rules:
|
|
197
|
+
- **Evidence or it didn't happen** — every verdict cites `file:line` or "searched, none found".
|
|
198
|
+
- **N/A is first-class** — record *why* (scope tier), don't drop the row.
|
|
199
|
+
- **No double-counting** — link per-call resilience to `audit-resilience`, PCI to `audit-security`.
|
|
200
|
+
- **No PoCs** — do not write replay, spoof, or card-testing procedures.
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
## Phase 3 — Prioritized report (read-only) [HIGH freedom]
|
|
205
|
+
|
|
206
|
+
```markdown
|
|
207
|
+
## Payment System Audit — [repo] — [date]
|
|
208
|
+
**Provider(s):** [Stripe/PayPal/…] · **Scope tier:** [P0/P1/P2 + evidence]
|
|
209
|
+
**In scope:** [groups] · **N/A (out of tier):** [rows + why]
|
|
210
|
+
|
|
211
|
+
### Critical — money loss / double-charge / card-data exposure (fix before ship)
|
|
212
|
+
| Finding | Control | file:line | Why it bites | Fix via |
|
|
213
|
+
|---|---|---|---|---|
|
|
214
|
+
| Charge has no idempotency key; no unique constraint | A1 | pay/charge.ts:52 | Retry double-charges the customer | audit-resilience |
|
|
215
|
+
| Webhook processed without signature check | C2 | api/webhook.ts:9 | Untrusted "paid" → free goods | audit-security |
|
|
216
|
+
| Card number written to app log | F1 | pay/log.ts:20 | PCI breach liability | audit-security |
|
|
217
|
+
| DB write then broker publish (not atomic) | C4 | ledger.ts:88 | Captured, never booked → money unaccounted | backend-patterns |
|
|
218
|
+
|
|
219
|
+
### High / Medium (correctness & compliance matrix)
|
|
220
|
+
| Group | Implemented | Partial | Missing | N/A | Fix via |
|
|
221
|
+
|---|---|---|---|---|---|
|
|
222
|
+
| A Money-movement | … | … | … | | audit-resilience |
|
|
223
|
+
| B Ledger | … | … | … | (P0) | audit-db-schema |
|
|
224
|
+
| C Webhooks/async | … | … | … | | backend-patterns |
|
|
225
|
+
| D Reconciliation | … | … | … | (P0) | data-pipeline |
|
|
226
|
+
| E Fraud/SCA | … | … | … | | backend-patterns |
|
|
227
|
+
| F PCI/compliance | … | … | … | | audit-security |
|
|
228
|
+
| G Resilience | … | … | … | | audit-resilience |
|
|
229
|
+
|
|
230
|
+
### Lift-to-production roadmap (ordered by blast radius)
|
|
231
|
+
1. Idempotency (gateway + DB unique constraint) on every mutation → audit-resilience
|
|
232
|
+
2. Verify + dedup webhooks, 200-then-process async → audit-security / audit-resilience
|
|
233
|
+
3. Atomic state+ledger+outbox; pull-based recovery for stuck payments → backend-patterns
|
|
234
|
+
4. [P1/P2] Double-entry append-only ledger + daily reconciliation w/ break report → audit-db-schema / data-pipeline
|
|
235
|
+
5. Tokens-only + key rotation + access audit (PCI v4.0.1) → audit-security
|
|
236
|
+
6. Breaker/bulkhead + fraud fail-policy around every external call → audit-resilience
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
**Forbidden:** declaring "production-grade" from passing tests alone; flagging P2-only controls
|
|
240
|
+
(in-house ledger, 3-way bank match, sharding) against a P0 merchant integrator; re-auditing per-call
|
|
241
|
+
timeouts/retries `audit-resilience` owns; assigning any severity below Critical to a double-charge,
|
|
242
|
+
lost-money, or PAN-exposure finding; recommending a refund/payout saga without compensation logic;
|
|
243
|
+
**writing exploit or payment-fraud PoCs**; **editing payment code** — this skill reports;
|
|
244
|
+
remediation is human-reviewed, runs at high effort, and keeps the execution rule's STOP-and-ask on payment code.
|
|
245
|
+
|
|
246
|
+
---
|
|
247
|
+
|
|
248
|
+
## Self-critique before reporting [LOW freedom — do not skip]
|
|
249
|
+
|
|
250
|
+
1. **Evidenced** — `file:line` or "searched, none found", not "webhooks are probably signed"
|
|
251
|
+
2. **No PoC** — finding names the missing control; no replay, spoof, or card-testing steps
|
|
252
|
+
3. **Tier respected** — P2 ledger / 3-way match are N/A on P0, with why
|
|
253
|
+
4. **Severity justified** — double-charge, lost money, or PAN/CVV = Critical
|
|
254
|
+
5. **Right owner** — IAP / StoreKit → `audit-monetization-iap`; per-call retry → `audit-resilience`
|
|
255
|
+
6. **Nothing edited** — STOP-and-confirm; human-reviewed remediation only
|
|
256
|
+
|
|
257
|
+
## Related
|
|
258
|
+
- `audit-resilience` — per-call idempotency keys, timeouts, retry+backoff+jitter, circuit breaker, cancellation
|
|
259
|
+
- `audit-security` — PCI/PAN handling, webhook auth, secrets, key rotation, injection, access logging
|
|
260
|
+
- `audit-db-schema` — double-entry ledger schema, append-only constraints, money types, partitioning
|
|
261
|
+
- `audit-backend-architecture` — outbox/saga/breaker *structure* and topology fit (this skill checks payment *correctness* on top)
|
|
262
|
+
- `plan-data-integrity` — append-only/immutability guarantees and destructive-op safety
|
|
263
|
+
- `plan-secrets-audit` — rotate vs relocate provider API/signing keys
|
|
264
|
+
- `backend-patterns` / `backend-patterns/references/architecture-patterns.md` — implement idempotency, outbox, saga, state machine
|
|
265
|
+
- `data-pipeline` — reconciliation/settlement ingestion jobs
|
|
266
|
+
- the Stripe plugin skills (`stripe-best-practices`, `connect-recommend`, `upgrade-stripe`) — Stripe-specific integration
|
|
267
|
+
- `audit-monetization-iap` — StoreKit / Play Billing / RevenueCat (not Stripe/web)
|
|
268
|
+
- `complete-everything` — close audited gaps to done with verification (human-reviewed for payment code)
|