@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,469 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: docs-writer
|
|
3
|
+
description: >
|
|
4
|
+
Write developer docs: README content, API references, code comments,
|
|
5
|
+
changelog entries. Use when "write docs", "document this API", or "explain
|
|
6
|
+
for contributors". README visuals → enhance-readme. Co-authored specs →
|
|
7
|
+
docs-coauthor.
|
|
8
|
+
license: MIT
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Documentation Writer Skill
|
|
12
|
+
|
|
13
|
+
**Degree of freedom: MIXED.** Voice and structure `[HIGH freedom]`;
|
|
14
|
+
pre-documentation checks and the verification statement
|
|
15
|
+
`[LOW freedom — run exactly]`.
|
|
16
|
+
|
|
17
|
+
Create clear, useful documentation for developers.
|
|
18
|
+
|
|
19
|
+
## Core principle — write for the reader's mental model first
|
|
20
|
+
|
|
21
|
+
Documentation rarely fails because it's *incomplete*. It fails because the reader can't build a mental model fast enough to care. So before any reference detail, answer the questions the reader is silently asking — in their words, in this order:
|
|
22
|
+
|
|
23
|
+
| The reader is silently asking… | Answer it with… |
|
|
24
|
+
|:--|:--|
|
|
25
|
+
| **What** is this? | One plain-English sentence — what it *does*, not how it's built |
|
|
26
|
+
| **Why** should I care? | The problem it solves / the pain it removes |
|
|
27
|
+
| **Who** is it for? | The audience + stack, so a wrong-fit reader can leave early |
|
|
28
|
+
| **How** do I start? | The shortest path to a first win: install → one command → result |
|
|
29
|
+
| **When / where** do I use it? | The situations it fits — and its boundaries (what it's *not*) |
|
|
30
|
+
|
|
31
|
+
Rules that follow from this:
|
|
32
|
+
|
|
33
|
+
- **Lead with the goal, not the implementation.** *"Turn a CSV into a chart"* beats *"A streaming transform pipeline built on X."*
|
|
34
|
+
- **Progressive disclosure.** Newcomer on-ramp first (plain language + one example), reference depth below. A pro scrolls past the primer in two seconds; a newcomer can't skip *to* it if it was never written.
|
|
35
|
+
- **Beat the curse of knowledge.** You know the jargon; the reader may not. Define a term on first use, or add a plain-language glossary when the project leans on 3+ domain terms (pattern below).
|
|
36
|
+
- **Show, don't just tell.** Every abstract capability gets a concrete, copy-pasteable example.
|
|
37
|
+
- **Write the sentence you'd say out loud** to a smart colleague who's never seen the project. Mannered prose is the anti-pattern — sentences that perform writing instead of saying something: throat-clearing openers, stacked hedges, "it's worth noting", triplets for rhythm, a closing line that restates the paragraph. One plain sentence per idea.
|
|
38
|
+
|
|
39
|
+
Everything else in this skill (templates, API docs, comments) serves this principle — structure and polish never substitute for orienting the reader first.
|
|
40
|
+
|
|
41
|
+
## How to reason
|
|
42
|
+
|
|
43
|
+
1. **Observe** — existing README/docs, the code being documented, the audience
|
|
44
|
+
2. **Interpret** — which silent reader questions (what / why / who / how / when) are unanswered
|
|
45
|
+
3. **Classify** — README / API reference / comments / architecture — match the repo's pattern
|
|
46
|
+
4. **Verify** — signatures and examples match the code you read
|
|
47
|
+
|
|
48
|
+
## Worked example
|
|
49
|
+
|
|
50
|
+
> **Observe:** "document createUser"; `src/users.ts` is `createUser({ email, role }) → Promise<User>`; README links `docs/api.md` with signature tables.
|
|
51
|
+
> **Interpret:** the reader needs the signature, errors, and a copy-paste call — not another project README.
|
|
52
|
+
> **Classify:** API reference in the existing table pattern.
|
|
53
|
+
> **Write only after:** "Pre-documentation check: existing docs read: README.md, docs/api.md; pattern: signature tables; code verified: src/users.ts"
|
|
54
|
+
|
|
55
|
+
## Self-critique before reporting
|
|
56
|
+
|
|
57
|
+
- **Pre-doc check stated** — existing docs and code listed, not assumed
|
|
58
|
+
- **First screen** — what / why / who in plain language
|
|
59
|
+
- **Examples run** — copy-pasteable; signatures match the file you read
|
|
60
|
+
- **Right owner** — visual README makeover → `enhance-readme`; docs/code drift plan → `plan-docs-sync`; long-form collab → `docs-coauthor`
|
|
61
|
+
|
|
62
|
+
## Pre-documentation checks [LOW freedom — run exactly]
|
|
63
|
+
|
|
64
|
+
**Before writing any documentation:**
|
|
65
|
+
|
|
66
|
+
### 1. Read Existing Documentation
|
|
67
|
+
```
|
|
68
|
+
README.md (project root)
|
|
69
|
+
docs/ (existing docs)
|
|
70
|
+
src/[domain]/@_[domain]-README.md (feature-specific READMEs)
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### 2. Check Documentation Patterns
|
|
74
|
+
Use `Glob` to find existing README files:
|
|
75
|
+
```
|
|
76
|
+
Glob: "**/*README.md" to find all READMEs
|
|
77
|
+
Glob: "**/*.md" in docs/ to find documentation patterns
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### 3. Verify Code Matches Documentation
|
|
81
|
+
Read the actual code being documented to ensure accuracy:
|
|
82
|
+
- Check function signatures match documentation
|
|
83
|
+
- Verify example code actually works
|
|
84
|
+
- Confirm database schema matches any data documentation
|
|
85
|
+
|
|
86
|
+
### 4. Verification statement — so the docs rest on files you read, not assumptions
|
|
87
|
+
Before writing docs, state:
|
|
88
|
+
```
|
|
89
|
+
"Pre-documentation check:
|
|
90
|
+
- Existing docs read: [list]
|
|
91
|
+
- Documentation pattern identified: [pattern from existing READMEs]
|
|
92
|
+
- Code verified: [files read to ensure accuracy]"
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## README Template [HIGH freedom]
|
|
98
|
+
|
|
99
|
+
```markdown
|
|
100
|
+
# Project Name
|
|
101
|
+
|
|
102
|
+
> One plain-English sentence: what it does and who it's for — no jargon.
|
|
103
|
+
|
|
104
|
+
**Why it exists** — the problem it solves, in one line.
|
|
105
|
+
**Who it's for** — the audience + stack, so a wrong-fit reader leaves early.
|
|
106
|
+
|
|
107
|
+
<!--
|
|
108
|
+
Newcomer on-ramp: if the project is novel or uses 3+ domain-specific terms,
|
|
109
|
+
add a plain-language glossary here (see "Newcomer on-ramp" pattern below) so the
|
|
110
|
+
features and options that follow aren't cryptic. Omit it when the domain is common.
|
|
111
|
+
-->
|
|
112
|
+
|
|
113
|
+
## Features
|
|
114
|
+
|
|
115
|
+
- Feature 1
|
|
116
|
+
- Feature 2
|
|
117
|
+
- Feature 3
|
|
118
|
+
|
|
119
|
+
## Quick Start
|
|
120
|
+
|
|
121
|
+
\`\`\`bash
|
|
122
|
+
# Install
|
|
123
|
+
npm install
|
|
124
|
+
|
|
125
|
+
# Run
|
|
126
|
+
npm start
|
|
127
|
+
\`\`\`
|
|
128
|
+
|
|
129
|
+
## Installation
|
|
130
|
+
|
|
131
|
+
### Prerequisites
|
|
132
|
+
|
|
133
|
+
- Node.js >= 18
|
|
134
|
+
- npm or pnpm
|
|
135
|
+
|
|
136
|
+
### Setup
|
|
137
|
+
|
|
138
|
+
\`\`\`bash
|
|
139
|
+
# Clone repository
|
|
140
|
+
git clone https://github.com/user/project.git
|
|
141
|
+
cd project
|
|
142
|
+
|
|
143
|
+
# Install dependencies
|
|
144
|
+
npm install
|
|
145
|
+
|
|
146
|
+
# Set up environment
|
|
147
|
+
cp .env.example .env
|
|
148
|
+
# Edit .env with your values
|
|
149
|
+
|
|
150
|
+
# Run development server
|
|
151
|
+
npm run dev
|
|
152
|
+
\`\`\`
|
|
153
|
+
|
|
154
|
+
## Usage
|
|
155
|
+
|
|
156
|
+
### Basic Example
|
|
157
|
+
|
|
158
|
+
\`\`\`typescript
|
|
159
|
+
import { Widget } from 'project';
|
|
160
|
+
|
|
161
|
+
const widget = new Widget({ option: 'value' });
|
|
162
|
+
widget.render();
|
|
163
|
+
\`\`\`
|
|
164
|
+
|
|
165
|
+
### Advanced Configuration
|
|
166
|
+
|
|
167
|
+
See [Configuration Guide](./docs/configuration.md)
|
|
168
|
+
|
|
169
|
+
## API Reference
|
|
170
|
+
|
|
171
|
+
See [API Documentation](./docs/api.md)
|
|
172
|
+
|
|
173
|
+
## Contributing
|
|
174
|
+
|
|
175
|
+
See [Contributing Guide](./CONTRIBUTING.md)
|
|
176
|
+
|
|
177
|
+
## License
|
|
178
|
+
|
|
179
|
+
MIT
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
---
|
|
183
|
+
|
|
184
|
+
## Newcomer on-ramp (novel or jargon-heavy projects) [HIGH freedom]
|
|
185
|
+
|
|
186
|
+
When a project introduces its own concepts, the reader can't parse the feature list until they know the vocabulary. Add a compact **building-blocks glossary** high in the README — plain meaning + how the reader actually uses each thing. This is the single highest-leverage block for making docs land with non-experts:
|
|
187
|
+
|
|
188
|
+
```markdown
|
|
189
|
+
**The building blocks** — what the terms below actually mean:
|
|
190
|
+
|
|
191
|
+
| Building block | In plain English | You use it by… |
|
|
192
|
+
|:--|:--|:--|
|
|
193
|
+
| **Widget** | A self-contained unit that does one job | dropping it into a page |
|
|
194
|
+
| **Pipeline** | The path your data takes from input to output | pointing it at a source |
|
|
195
|
+
| **Adapter** | A connector to an outside service | adding its key to config |
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
Guidelines:
|
|
199
|
+
|
|
200
|
+
- **Three columns beat prose.** Term → plain meaning → how you trigger/use it. Use concrete verbs ("drop in", "point at", "add a key"), not dictionary definitions.
|
|
201
|
+
- Put it *above* the counts, options, or API — it's the decoder ring for everything below it.
|
|
202
|
+
- **Drop it when the domain is already familiar.** Don't gloss `useState` for a React audience; do gloss a term you invented.
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
## Documentation Types [HIGH freedom]
|
|
207
|
+
|
|
208
|
+
### 1. API Documentation
|
|
209
|
+
|
|
210
|
+
```markdown
|
|
211
|
+
## createUser
|
|
212
|
+
|
|
213
|
+
Create a new user account.
|
|
214
|
+
|
|
215
|
+
### Signature
|
|
216
|
+
|
|
217
|
+
\`\`\`typescript
|
|
218
|
+
function createUser(params: CreateUserParams): Promise<User>
|
|
219
|
+
\`\`\`
|
|
220
|
+
|
|
221
|
+
### Parameters
|
|
222
|
+
|
|
223
|
+
| Name | Type | Required | Description |
|
|
224
|
+
|------|------|----------|-------------|
|
|
225
|
+
| name | string | Yes | User's display name |
|
|
226
|
+
| email | string | Yes | Valid email address |
|
|
227
|
+
| role | 'admin' \| 'user' | No | User role (default: 'user') |
|
|
228
|
+
|
|
229
|
+
### Returns
|
|
230
|
+
|
|
231
|
+
`Promise<User>` - The created user object
|
|
232
|
+
|
|
233
|
+
### Example
|
|
234
|
+
|
|
235
|
+
\`\`\`typescript
|
|
236
|
+
const user = await createUser({
|
|
237
|
+
name: 'John Doe',
|
|
238
|
+
email: 'john@example.com',
|
|
239
|
+
role: 'admin'
|
|
240
|
+
});
|
|
241
|
+
\`\`\`
|
|
242
|
+
|
|
243
|
+
### Errors
|
|
244
|
+
|
|
245
|
+
| Error | Cause |
|
|
246
|
+
|-------|-------|
|
|
247
|
+
| `ValidationError` | Invalid email format |
|
|
248
|
+
| `ConflictError` | Email already exists |
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
### 2. Code Comments
|
|
252
|
+
|
|
253
|
+
```typescript
|
|
254
|
+
/**
|
|
255
|
+
* Calculate the total price including tax and discounts.
|
|
256
|
+
*
|
|
257
|
+
* @param items - Array of cart items
|
|
258
|
+
* @param taxRate - Tax rate as decimal (e.g., 0.1 for 10%)
|
|
259
|
+
* @param discount - Optional discount code
|
|
260
|
+
* @returns Total price in cents
|
|
261
|
+
*
|
|
262
|
+
* @example
|
|
263
|
+
* const total = calculateTotal(items, 0.1, 'SAVE10');
|
|
264
|
+
*/
|
|
265
|
+
function calculateTotal(
|
|
266
|
+
items: CartItem[],
|
|
267
|
+
taxRate: number,
|
|
268
|
+
discount?: string
|
|
269
|
+
): number {
|
|
270
|
+
// Sum up item prices
|
|
271
|
+
const subtotal = items.reduce((sum, item) => sum + item.price, 0);
|
|
272
|
+
|
|
273
|
+
// Apply discount if valid
|
|
274
|
+
const discountAmount = discount ? getDiscountAmount(discount, subtotal) : 0;
|
|
275
|
+
|
|
276
|
+
// Calculate tax on discounted amount
|
|
277
|
+
const taxableAmount = subtotal - discountAmount;
|
|
278
|
+
const tax = Math.round(taxableAmount * taxRate);
|
|
279
|
+
|
|
280
|
+
return taxableAmount + tax;
|
|
281
|
+
}
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
### 3. Architecture Documentation
|
|
285
|
+
|
|
286
|
+
```markdown
|
|
287
|
+
# Architecture Overview
|
|
288
|
+
|
|
289
|
+
## System Components
|
|
290
|
+
|
|
291
|
+
\`\`\`
|
|
292
|
+
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
|
|
293
|
+
│ Client │────▶│ API │────▶│ Database │
|
|
294
|
+
│ (React) │ │ (Node) │ │ (Postgres) │
|
|
295
|
+
└─────────────┘ └─────────────┘ └─────────────┘
|
|
296
|
+
│
|
|
297
|
+
▼
|
|
298
|
+
┌─────────────┐
|
|
299
|
+
│ Cache │
|
|
300
|
+
│ (Redis) │
|
|
301
|
+
└─────────────┘
|
|
302
|
+
\`\`\`
|
|
303
|
+
|
|
304
|
+
## Data Flow
|
|
305
|
+
|
|
306
|
+
1. Client sends request to API
|
|
307
|
+
2. API checks cache for data
|
|
308
|
+
3. If cache miss, query database
|
|
309
|
+
4. Store result in cache
|
|
310
|
+
5. Return response to client
|
|
311
|
+
|
|
312
|
+
## Key Decisions
|
|
313
|
+
|
|
314
|
+
### Why PostgreSQL?
|
|
315
|
+
- ACID compliance for financial data
|
|
316
|
+
- JSON support for flexible schemas
|
|
317
|
+
- Strong ecosystem
|
|
318
|
+
|
|
319
|
+
### Why Redis?
|
|
320
|
+
- Fast read performance
|
|
321
|
+
- Session storage
|
|
322
|
+
- Pub/sub for real-time features
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
---
|
|
326
|
+
|
|
327
|
+
## Writing Guidelines [HIGH freedom]
|
|
328
|
+
|
|
329
|
+
### Be Concise
|
|
330
|
+
|
|
331
|
+
```markdown
|
|
332
|
+
# ❌ Too verbose
|
|
333
|
+
This function is responsible for taking an array of user objects
|
|
334
|
+
and filtering them based on the active status property, returning
|
|
335
|
+
only those users who have an active status of true.
|
|
336
|
+
|
|
337
|
+
# ✅ Concise
|
|
338
|
+
Filter users by active status.
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
### Use Examples
|
|
342
|
+
|
|
343
|
+
```markdown
|
|
344
|
+
# ❌ Abstract description
|
|
345
|
+
The function accepts configuration options.
|
|
346
|
+
|
|
347
|
+
# ✅ With example
|
|
348
|
+
Configure the logger:
|
|
349
|
+
\`\`\`typescript
|
|
350
|
+
const logger = createLogger({
|
|
351
|
+
level: 'info',
|
|
352
|
+
format: 'json',
|
|
353
|
+
output: 'stdout'
|
|
354
|
+
});
|
|
355
|
+
\`\`\`
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
### Structure Information
|
|
359
|
+
|
|
360
|
+
Format by content shape: a list, table, or numbered steps when the content is multifaceted (options, parameters, an ordered setup); prose when it is one idea. Headings only where a reader would scan for them.
|
|
361
|
+
|
|
362
|
+
```markdown
|
|
363
|
+
# ❌ Wall of text
|
|
364
|
+
To install the package you need to run npm install, then create
|
|
365
|
+
a .env file with your configuration, then run the migrations...
|
|
366
|
+
|
|
367
|
+
# ✅ Structured steps
|
|
368
|
+
## Setup
|
|
369
|
+
|
|
370
|
+
1. Install dependencies
|
|
371
|
+
\`\`\`bash
|
|
372
|
+
npm install
|
|
373
|
+
\`\`\`
|
|
374
|
+
|
|
375
|
+
2. Configure environment
|
|
376
|
+
\`\`\`bash
|
|
377
|
+
cp .env.example .env
|
|
378
|
+
\`\`\`
|
|
379
|
+
|
|
380
|
+
3. Run migrations
|
|
381
|
+
\`\`\`bash
|
|
382
|
+
npm run migrate
|
|
383
|
+
\`\`\`
|
|
384
|
+
```
|
|
385
|
+
|
|
386
|
+
### Kill the Jargon (beat the curse of knowledge)
|
|
387
|
+
|
|
388
|
+
```markdown
|
|
389
|
+
# ❌ Assumes the reader shares your context
|
|
390
|
+
Configure the RLS policy on the tenant-scoped RPC before hydrating the store.
|
|
391
|
+
|
|
392
|
+
# ✅ Plain first, precise second
|
|
393
|
+
Set who's allowed to read each row (a "policy") before the app loads its data.
|
|
394
|
+
(Supabase calls row rules "RLS"; loading data into the app is "hydrating the store.")
|
|
395
|
+
```
|
|
396
|
+
|
|
397
|
+
Lead with the plain-language version; put the precise term in parentheses or right after it. Never make a newcomer look up three words just to parse one sentence.
|
|
398
|
+
|
|
399
|
+
---
|
|
400
|
+
|
|
401
|
+
## Documentation Checklist [LOW freedom — do not skip]
|
|
402
|
+
|
|
403
|
+
### README
|
|
404
|
+
- [ ] Opens by answering **what / why / who** in the first screen (plain language)
|
|
405
|
+
- [ ] Clear project description
|
|
406
|
+
- [ ] Quick start (< 5 steps)
|
|
407
|
+
- [ ] Prerequisites listed
|
|
408
|
+
- [ ] Installation instructions
|
|
409
|
+
- [ ] Basic usage example
|
|
410
|
+
- [ ] Jargon defined on first use, or a glossary added for 3+ domain terms
|
|
411
|
+
- [ ] Link to detailed docs
|
|
412
|
+
|
|
413
|
+
### API Docs
|
|
414
|
+
- [ ] All public functions documented
|
|
415
|
+
- [ ] Parameters and return types
|
|
416
|
+
- [ ] Usage examples
|
|
417
|
+
- [ ] Error cases documented
|
|
418
|
+
|
|
419
|
+
### Code Comments
|
|
420
|
+
- [ ] Complex logic explained
|
|
421
|
+
- [ ] "Why" not just "what"
|
|
422
|
+
- [ ] JSDoc for public APIs
|
|
423
|
+
- [ ] No obvious comments
|
|
424
|
+
|
|
425
|
+
### Architecture
|
|
426
|
+
- [ ] System overview diagram
|
|
427
|
+
- [ ] Component relationships
|
|
428
|
+
- [ ] Key decisions documented
|
|
429
|
+
- [ ] Data flow explained
|
|
430
|
+
|
|
431
|
+
---
|
|
432
|
+
|
|
433
|
+
## Helpful Diagrams [HIGH freedom]
|
|
434
|
+
|
|
435
|
+
### Mermaid Flowchart
|
|
436
|
+
|
|
437
|
+
```markdown
|
|
438
|
+
\`\`\`mermaid
|
|
439
|
+
flowchart LR
|
|
440
|
+
A[User] --> B[Frontend]
|
|
441
|
+
B --> C[API]
|
|
442
|
+
C --> D[Database]
|
|
443
|
+
C --> E[Cache]
|
|
444
|
+
\`\`\`
|
|
445
|
+
```
|
|
446
|
+
|
|
447
|
+
### Sequence Diagram
|
|
448
|
+
|
|
449
|
+
```markdown
|
|
450
|
+
\`\`\`mermaid
|
|
451
|
+
sequenceDiagram
|
|
452
|
+
User->>+API: POST /login
|
|
453
|
+
API->>+DB: Verify credentials
|
|
454
|
+
DB-->>-API: User data
|
|
455
|
+
API-->>-User: JWT token
|
|
456
|
+
\`\`\`
|
|
457
|
+
```
|
|
458
|
+
|
|
459
|
+
---
|
|
460
|
+
|
|
461
|
+
## Keep Docs Updated [HIGH freedom]
|
|
462
|
+
|
|
463
|
+
```markdown
|
|
464
|
+
# In PR template:
|
|
465
|
+
## Documentation
|
|
466
|
+
- [ ] README updated (if needed)
|
|
467
|
+
- [ ] API docs updated (if endpoints changed)
|
|
468
|
+
- [ ] Code comments added (for complex logic)
|
|
469
|
+
```
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: enhance-agent-guardrails
|
|
3
|
+
description: >
|
|
4
|
+
Install guardrails as code so AI sessions cannot reintroduce leaked secrets,
|
|
5
|
+
injection, or untested code. Use when "set up guardrails", "stop vibe-coding
|
|
6
|
+
regressions", or "add pre-commit security checks". Gate audit →
|
|
7
|
+
audit-gate-logic.
|
|
8
|
+
license: MIT
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# enhance-agent-guardrails — Guardrails-as-Code Against AI Regressions
|
|
12
|
+
|
|
13
|
+
**Degree of freedom: MIXED.** Gap-map judgment `[HIGH freedom]`; plant-and-check, CI wiring, and "never weaken an existing check" `[LOW freedom — run exactly]`.
|
|
14
|
+
|
|
15
|
+
AI agents ship the visible 80% fast and skip the 20% that keeps a repo safe. Studies in
|
|
16
|
+
2026 put ~45% of AI-generated code shipping OWASP Top-10 issues, ~2.74× more security
|
|
17
|
+
findings per PR, and repeated production disasters from unguarded destructive actions.
|
|
18
|
+
Telling the agent to "be secure" doesn't work — **deterministic gates** do. This skill
|
|
19
|
+
installs those gates so the next fast session can't quietly reintroduce old classes of bugs.
|
|
20
|
+
|
|
21
|
+
> **Treat all agent output as untrusted until a machine check says otherwise.** The goal is
|
|
22
|
+
> guardrails that *block at the moment of creation* (pre-commit) and *again before merge*
|
|
23
|
+
> (CI), plus policy files that steer the agent up front. Additive and reversible — never
|
|
24
|
+
> weaken an existing check to make the setup "pass".
|
|
25
|
+
|
|
26
|
+
## How to reason
|
|
27
|
+
|
|
28
|
+
1. **Detect** — hooks, CI, rules, scanners already present
|
|
29
|
+
2. **Map** — which AI failure class is unguarded
|
|
30
|
+
3. **Install** — additive only; pin versions; don't duplicate
|
|
31
|
+
4. **Prove** — a planted finding is blocked, then removed
|
|
32
|
+
|
|
33
|
+
## Worked example
|
|
34
|
+
|
|
35
|
+
> **Detect:** husky + lint-staged; no gitleaks; CI runs typecheck only.
|
|
36
|
+
> **Map:** secrets and SAST unguarded; tests not a merge gate.
|
|
37
|
+
> **Install:** gitleaks pre-commit + CI; semgrep CI; keep existing typecheck.
|
|
38
|
+
> **Prove:** scratch file with a fake AWS key is blocked; file deleted; no history rewrite.
|
|
39
|
+
|
|
40
|
+
## Self-critique before reporting
|
|
41
|
+
|
|
42
|
+
- **Additive** — no existing check was weakened to make setup pass
|
|
43
|
+
- **Bites** — plant-and-check blocked; planted value never committed
|
|
44
|
+
- **Pinned** — scanner versions are not `latest`
|
|
45
|
+
- **Right owner** — leaked-secret rotation → `plan-secrets-audit`; gate bypass → `audit-gate-logic`; gate sprawl → `housekeep-gates`
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## Phase 0 — Detect stack and existing protection [HIGH freedom]
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
# Ecosystem + CI
|
|
53
|
+
cat package.json 2>/dev/null | grep -iE "husky|lint-staged|semgrep|gitleaks|eslint|prettier|typescript"
|
|
54
|
+
ls -la .husky/ .github/workflows/ 2>/dev/null
|
|
55
|
+
ls .cursor/rules/ AGENTS.md CLAUDE.md .pre-commit-config.yaml 2>/dev/null
|
|
56
|
+
# What's already gated?
|
|
57
|
+
rg -n "gitleaks|trufflehog|semgrep|npm audit|osv-scanner|socket" .github/ .husky/ 2>/dev/null
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Record: package manager, CI provider (GitHub Actions / other), existing hooks, existing
|
|
61
|
+
rules/policy files, and which checks already run. **Don't duplicate** what's present —
|
|
62
|
+
extend it.
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## Phase 1 — Research current practice [HIGH freedom]
|
|
67
|
+
|
|
68
|
+
Follow `/research`: current-year guidance on AI-code guardrails (VibeSec / OWASP), and the
|
|
69
|
+
current invocation for the scanners you'll wire (gitleaks, semgrep, osv-scanner/`npm audit`,
|
|
70
|
+
socket). Pin tool versions rather than floating `latest`.
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## Phase 2 — Gap map (which failure classes are unguarded) [HIGH freedom]
|
|
75
|
+
|
|
76
|
+
Map the documented AI failure classes to the repo's current coverage and pick what to add:
|
|
77
|
+
|
|
78
|
+
| Failure class | Guard to add (if missing) |
|
|
79
|
+
|---|---|
|
|
80
|
+
| Hardcoded secrets / credential sprawl | Secret scan (gitleaks / trufflehog) in pre-commit **and** CI |
|
|
81
|
+
| Injection / XSS / SSRF / OWASP | SAST (semgrep with a ruleset for the stack) in CI |
|
|
82
|
+
| Vulnerable / hallucinated dependencies | `npm audit` / `osv-scanner` / socket in CI; lockfile required |
|
|
83
|
+
| Off-system / drifting styles | Lint-as-policy (no raw hex, no arbitrary values, single icon lib) |
|
|
84
|
+
| Untested "plausible" code | CI requires typecheck + test to pass; coverage floor if one exists |
|
|
85
|
+
| Destructive shell/DB ops | Agent policy: human-in-the-loop for `rm -rf`, migrations, prod scripts |
|
|
86
|
+
| Context/spec drift & false-done | Point agents at `verification-before-completion` + `completion-judge` |
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## Phase 3 — Install the guardrails [HIGH freedom]
|
|
91
|
+
|
|
92
|
+
Install only the missing pieces. Keep each additive and clearly named.
|
|
93
|
+
|
|
94
|
+
### 3a. Agent policy files (steer up front)
|
|
95
|
+
|
|
96
|
+
- `.cursor/rules/*.mdc` and/or `AGENTS.md`: encode the non-negotiables as rule-as-code —
|
|
97
|
+
parameterized queries only, validate/sanitize all external input, no hardcoded secrets,
|
|
98
|
+
auth middleware on protected routes, **no destructive ops without explicit human
|
|
99
|
+
approval**, write tests for new features. Ground it in the OWASP Top 10.
|
|
100
|
+
|
|
101
|
+
### 3b. Pre-commit hook (block at creation)
|
|
102
|
+
|
|
103
|
+
- Wire the repo's hook manager (`husky` + `lint-staged` for Node, or
|
|
104
|
+
`.pre-commit-config.yaml`): run secret scan on staged files, lint + typecheck on changed
|
|
105
|
+
files, and fail the commit on any finding. Keep it fast (staged-only).
|
|
106
|
+
|
|
107
|
+
### 3c. CI gate (block before merge — the authoritative gate)
|
|
108
|
+
|
|
109
|
+
- Add/extend a CI job that treats agent output as untrusted: secret scan (full history or
|
|
110
|
+
diff), SAST, dependency audit, typecheck, lint, test. Fail the PR on high-severity
|
|
111
|
+
findings. This is the gate that matters even if a local hook is skipped.
|
|
112
|
+
|
|
113
|
+
### 3d. Lint-as-policy
|
|
114
|
+
|
|
115
|
+
- Add rules that block off-system patterns (`no-restricted-syntax`, raw color/arbitrary-value
|
|
116
|
+
rules, `no-console` where appropriate, `@typescript-eslint/no-explicit-any`) with a
|
|
117
|
+
documented, reviewed escape hatch — so rules get exceptions, not blanket-disabled.
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## Phase 4 — Verify the guards actually bite [LOW freedom — run exactly]
|
|
122
|
+
|
|
123
|
+
A guardrail you didn't test is a guardrail that doesn't work.
|
|
124
|
+
|
|
125
|
+
- **Plant-and-check (dry run):** temporarily introduce a fake secret / off-system value in a
|
|
126
|
+
scratch file and confirm the pre-commit hook and/or the scanner **blocks** it; then remove
|
|
127
|
+
it. Never commit the planted value.
|
|
128
|
+
- Run the lint-as-policy rules against the current tree and report (don't mass-`--fix`
|
|
129
|
+
silently — surface what would change).
|
|
130
|
+
- Confirm the CI workflow is valid (`act`/`yamllint` if available, or a draft PR).
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
## Phase 5 — Report + handoff [LOW freedom — do not skip]
|
|
135
|
+
|
|
136
|
+
```markdown
|
|
137
|
+
## Agent Guardrails — report
|
|
138
|
+
**Already present:** [hooks/CI/rules found]
|
|
139
|
+
**Installed:** agent policy [files] · pre-commit [checks] · CI gate [checks] · lint-as-policy [rules]
|
|
140
|
+
**Verified:** planted secret blocked ✓ · lint rules run ✓ · CI workflow valid ✓
|
|
141
|
+
**Needs human review before enforcing:** [CI changes that will block merges / branch protection]
|
|
142
|
+
**Not covered here (route to):** deep secrets audit → plan-secrets-audit · OWASP depth → plan-security-audit
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
> **STOP for the human** before turning on anything that blocks merges in a shared repo
|
|
146
|
+
> (branch protection, required CI checks) or that rewrites history. Rotating real leaked
|
|
147
|
+
> secrets is out of scope — route to `plan-secrets-audit`.
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
## Related
|
|
152
|
+
|
|
153
|
+
- `audit-gate-logic` — audit whether existing gates can be bypassed or gamed (this skill *installs*)
|
|
154
|
+
- `housekeep-gates` — consolidate accreted duplicate gates; this skill does not delete sprawl
|
|
155
|
+
- `test-mutation` — assertion-strength hook this skill can install the wording for
|
|
156
|
+
- `docs-adr` — same-PR / handoff reminder that a decision needs a record
|
|
157
|
+
- `housekeep-backlog` — same-PR reminder that newly parked work gets a `BL-` row
|
|
158
|
+
- `audit-security` / `plan-security-audit` — the vulnerability depth the SAST gate can't fully cover
|
|
159
|
+
- `plan-secrets-audit` — find + triage existing leaked secrets (and rotation plan)
|
|
160
|
+
- `plan-dependency-provenance` — hallucinated/slopsquatted dependency audit
|
|
161
|
+
- `plan-data-integrity` — destructive-operation and data-loss guardrails
|
|
162
|
+
- `verification-before-completion` (rule) + `completion-judge` — the false-done guard agents should obey
|
|
163
|
+
- `audit-llm-security` — product-facing LLM attack surface (not this repo's coding agent)
|
|
164
|
+
- `housekeep-design` — pairs the visual lint-as-policy with a full design consolidation
|