@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,238 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: create-hook
|
|
3
|
+
description: Create Cursor hooks. Use to create a hook, write hooks.json, add hook scripts, or automate behavior around agent events.
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
# Creating Cursor Hooks
|
|
7
|
+
|
|
8
|
+
Create hooks when you want Cursor to run custom logic before or after agent events. Hooks are scripts or prompt-based checks that exchange JSON over stdin/stdout and can observe, block, modify, or follow up on behavior.
|
|
9
|
+
|
|
10
|
+
When the user asks for a hook, don't stop at describing the format. Gather the missing requirements, then create or update the hook files directly.
|
|
11
|
+
|
|
12
|
+
## Gather Requirements
|
|
13
|
+
|
|
14
|
+
Before you write anything, determine:
|
|
15
|
+
|
|
16
|
+
1. **Scope**: Should this be a project hook or a user hook?
|
|
17
|
+
2. **Trigger**: Which event should run the hook?
|
|
18
|
+
3. **Behavior**: Should it audit, deny/allow, rewrite input, inject context, or continue a workflow?
|
|
19
|
+
4. **Implementation**: Should it be a command hook (script) or a prompt hook?
|
|
20
|
+
5. **Filtering**: Does it need a matcher so it only runs for certain tools, commands, or subagent types?
|
|
21
|
+
6. **Safety**: Should failures fail open or fail closed?
|
|
22
|
+
|
|
23
|
+
Infer these from the conversation when possible. Only ask for the missing pieces.
|
|
24
|
+
|
|
25
|
+
## Choose the Right Location
|
|
26
|
+
|
|
27
|
+
- **Project hooks**: `.cursor/hooks.json` and `.cursor/hooks/*`
|
|
28
|
+
- **User hooks**: `~/.cursor/hooks.json` and `~/.cursor/hooks/*`
|
|
29
|
+
|
|
30
|
+
Path behavior matters:
|
|
31
|
+
|
|
32
|
+
- **Project hooks** run from the project root, so use paths like `.cursor/hooks/my-hook.sh`
|
|
33
|
+
- **User hooks** run from `~/.cursor/`, so use paths like `./hooks/my-hook.sh` or `hooks/my-hook.sh`
|
|
34
|
+
|
|
35
|
+
Prefer **project hooks** when the behavior should be shared with the repository and checked into version control.
|
|
36
|
+
|
|
37
|
+
## Choose the Hook Event
|
|
38
|
+
|
|
39
|
+
Use the narrowest event that matches the user's goal.
|
|
40
|
+
|
|
41
|
+
### Common Agent events
|
|
42
|
+
|
|
43
|
+
- `sessionStart`, `sessionEnd`: set up or audit a session
|
|
44
|
+
- `preToolUse`, `postToolUse`, `postToolUseFailure`: work across all tools
|
|
45
|
+
- `subagentStart`, `subagentStop`: control or continue Task/subagent workflows
|
|
46
|
+
- `beforeShellExecution`, `afterShellExecution`: gate or audit terminal commands
|
|
47
|
+
- `beforeMCPExecution`, `afterMCPExecution`: gate or audit MCP tool calls
|
|
48
|
+
- `beforeReadFile`, `afterFileEdit`: control file reads or post-process edits
|
|
49
|
+
- `beforeSubmitPrompt`: validate prompts before they are sent
|
|
50
|
+
- `preCompact`: observe context compaction
|
|
51
|
+
- `stop`: handle agent completion
|
|
52
|
+
- `afterAgentResponse`, `afterAgentThought`: track agent output or reasoning
|
|
53
|
+
|
|
54
|
+
### Tab events
|
|
55
|
+
|
|
56
|
+
- `beforeTabFileRead`: control file access for inline completions
|
|
57
|
+
- `afterTabFileEdit`: post-process edits made by Tab
|
|
58
|
+
|
|
59
|
+
### Quick event chooser
|
|
60
|
+
|
|
61
|
+
- **Block or approve shell commands** -> `beforeShellExecution`
|
|
62
|
+
- **Audit shell output** -> `afterShellExecution`
|
|
63
|
+
- **Format files after edits** -> `afterFileEdit`
|
|
64
|
+
- **Block or rewrite a specific tool call** -> `preToolUse`
|
|
65
|
+
- **Add follow-up context after a tool succeeds** -> `postToolUse`
|
|
66
|
+
- **Control whether subagents can run** -> `subagentStart`
|
|
67
|
+
- **Chain subagent loops** -> `subagentStop`
|
|
68
|
+
- **Check prompts for secrets or policy violations** -> `beforeSubmitPrompt`
|
|
69
|
+
- **Protect MCP calls** -> `beforeMCPExecution`
|
|
70
|
+
|
|
71
|
+
## Hooks File Format
|
|
72
|
+
|
|
73
|
+
Create a `hooks.json` file with schema version 1:
|
|
74
|
+
|
|
75
|
+
```json
|
|
76
|
+
{
|
|
77
|
+
"version": 1,
|
|
78
|
+
"hooks": {
|
|
79
|
+
"afterFileEdit": [
|
|
80
|
+
{
|
|
81
|
+
"command": ".cursor/hooks/format.sh"
|
|
82
|
+
}
|
|
83
|
+
]
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Each hook definition can include:
|
|
89
|
+
|
|
90
|
+
- `command`: shell command or script path
|
|
91
|
+
- `type`: `"command"` or `"prompt"` (defaults to `"command"`)
|
|
92
|
+
- `timeout`: timeout in seconds
|
|
93
|
+
- `matcher`: filter for when the hook runs
|
|
94
|
+
- `failClosed`: block the action when the hook crashes, times out, or returns invalid JSON
|
|
95
|
+
- `loop_limit`: mainly for `stop` and `subagentStop` follow-up loops
|
|
96
|
+
|
|
97
|
+
## Matchers
|
|
98
|
+
|
|
99
|
+
Use matchers to avoid running the hook on every event.
|
|
100
|
+
|
|
101
|
+
- `preToolUse` / `postToolUse` / `postToolUseFailure`: match on tool type such as `Shell`, `Read`, `Write`, `Task`, or MCP tools in `MCP: ...` form
|
|
102
|
+
- `subagentStart` / `subagentStop`: match on subagent type such as `generalPurpose`, `explore`, or `shell`
|
|
103
|
+
- `beforeShellExecution` / `afterShellExecution`: match on the full shell command string
|
|
104
|
+
- `beforeReadFile`: match on tool type such as `Read` or `TabRead`
|
|
105
|
+
- `afterFileEdit`: match on tool type such as `Write` or `TabWrite`
|
|
106
|
+
- `beforeSubmitPrompt`: matches the value `UserPromptSubmit`
|
|
107
|
+
|
|
108
|
+
Important matcher warning:
|
|
109
|
+
|
|
110
|
+
- Matchers use JavaScript-style regular expressions, not POSIX/grep syntax
|
|
111
|
+
- Do not use POSIX classes like `[[:space:]]`; use JavaScript equivalents like `\s`
|
|
112
|
+
- If the matcher is at all tricky, start by getting the hook working without one or with a very simple matcher, then tighten it after the hook is confirmed to load and fire
|
|
113
|
+
|
|
114
|
+
If the user wants a hook for only one risky command family, prefer script-side filtering for the first working version and add a matcher afterward only if it is simple and clearly correct.
|
|
115
|
+
|
|
116
|
+
## Command Hooks
|
|
117
|
+
|
|
118
|
+
Command hooks are the default. They receive JSON on stdin and can return JSON on stdout.
|
|
119
|
+
|
|
120
|
+
Before using a command hook, verify that every executable it depends on will actually run in the hook environment:
|
|
121
|
+
|
|
122
|
+
- the script itself has a valid shebang and is executable
|
|
123
|
+
- any helper binary it calls is already installed and on `$PATH`
|
|
124
|
+
- if the script depends on tools like `jq`, `python3`, `node`, or repo-local CLIs, verify that explicitly before finishing
|
|
125
|
+
|
|
126
|
+
Do not assume a binary exists just because it is common on your machine.
|
|
127
|
+
|
|
128
|
+
### Minimal project-level example
|
|
129
|
+
|
|
130
|
+
```json
|
|
131
|
+
{
|
|
132
|
+
"version": 1,
|
|
133
|
+
"hooks": {
|
|
134
|
+
"beforeShellExecution": [
|
|
135
|
+
{
|
|
136
|
+
"command": ".cursor/hooks/approve-network.sh",
|
|
137
|
+
"matcher": "curl|wget|nc ",
|
|
138
|
+
"failClosed": true
|
|
139
|
+
}
|
|
140
|
+
]
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
#!/bin/bash
|
|
147
|
+
input=$(cat)
|
|
148
|
+
command=$(echo "$input" | jq -r '.command // empty')
|
|
149
|
+
|
|
150
|
+
if [[ "$command" =~ curl|wget|nc ]]; then
|
|
151
|
+
echo '{
|
|
152
|
+
"permission": "ask",
|
|
153
|
+
"user_message": "This command may make a network request. Please review it before continuing.",
|
|
154
|
+
"agent_message": "A hook flagged this shell command as a possible network call."
|
|
155
|
+
}'
|
|
156
|
+
exit 0
|
|
157
|
+
fi
|
|
158
|
+
|
|
159
|
+
echo '{ "permission": "allow" }'
|
|
160
|
+
exit 0
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
Important behavior:
|
|
164
|
+
|
|
165
|
+
- Exit code `0`: success
|
|
166
|
+
- Exit code `2`: block the action, same as returning deny
|
|
167
|
+
- Other non-zero exit codes: fail open by default unless `failClosed: true`
|
|
168
|
+
|
|
169
|
+
Make hook scripts executable after creating them (`chmod +x`): a non-executable script errors, and by default that fails open, so the hook silently does nothing.
|
|
170
|
+
|
|
171
|
+
## Prompt Hooks
|
|
172
|
+
|
|
173
|
+
Prompt hooks are useful when the policy is easier to describe than to script.
|
|
174
|
+
|
|
175
|
+
```json
|
|
176
|
+
{
|
|
177
|
+
"version": 1,
|
|
178
|
+
"hooks": {
|
|
179
|
+
"beforeShellExecution": [
|
|
180
|
+
{
|
|
181
|
+
"type": "prompt",
|
|
182
|
+
"prompt": "Does this command look safe to execute? Only allow read-only operations. Here is the hook input: $ARGUMENTS",
|
|
183
|
+
"timeout": 10
|
|
184
|
+
}
|
|
185
|
+
]
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
Use prompt hooks for lightweight policy decisions. Prefer command hooks when the logic must be deterministic or when the user needs exact, auditable behavior.
|
|
191
|
+
|
|
192
|
+
## Event Output Cheat Sheet
|
|
193
|
+
|
|
194
|
+
Use the event's supported output fields only.
|
|
195
|
+
|
|
196
|
+
- `preToolUse`: can return `permission`, `user_message`, `agent_message`, and `updated_input`
|
|
197
|
+
- `postToolUse`: can return `additional_context`; for MCP tools it can also return `updated_mcp_tool_output`
|
|
198
|
+
- `subagentStart`: can return `permission` and `user_message`
|
|
199
|
+
- `subagentStop`: can return `followup_message`
|
|
200
|
+
- `beforeShellExecution` / `beforeMCPExecution`: can return `permission`, `user_message`, and `agent_message`
|
|
201
|
+
|
|
202
|
+
When the user wants to rewrite a tool call, prefer `preToolUse`. When they want to gate only shell commands, prefer `beforeShellExecution`.
|
|
203
|
+
|
|
204
|
+
## Implementation Workflow
|
|
205
|
+
|
|
206
|
+
1. Pick the correct location and event
|
|
207
|
+
2. Create or update the correct `hooks.json` file
|
|
208
|
+
3. Start with no matcher or the simplest safe matcher
|
|
209
|
+
4. Create the script under the matching hooks directory
|
|
210
|
+
5. Read stdin JSON and implement the required behavior
|
|
211
|
+
6. Make the script executable
|
|
212
|
+
7. Verify any helper executables the script uses are installed and on `$PATH`
|
|
213
|
+
8. Trigger the relevant action to test the hook
|
|
214
|
+
9. Verify behavior in Cursor's **Hooks** settings tab or the **Hooks** output channel
|
|
215
|
+
|
|
216
|
+
If you are editing an existing hooks setup, preserve unrelated hooks and only change the minimum necessary entries.
|
|
217
|
+
|
|
218
|
+
## Validation and Troubleshooting
|
|
219
|
+
|
|
220
|
+
- Cursor watches `hooks.json` and reloads on save
|
|
221
|
+
- If hooks still do not load, restart Cursor
|
|
222
|
+
- Double-check relative paths:
|
|
223
|
+
- project hooks -> relative to the project root
|
|
224
|
+
- user hooks -> relative to `~/.cursor/`
|
|
225
|
+
- If the hook does not appear to load at all, suspect matcher/config parsing first; remove the matcher and confirm the base hook works before tightening it
|
|
226
|
+
- If the script runs external commands, verify each one is installed and reachable from the hook process with `command -v` or equivalent
|
|
227
|
+
- If the hook should block on failure, set `failClosed: true`
|
|
228
|
+
- If a command hook should intentionally block, returning exit code `2` is valid
|
|
229
|
+
|
|
230
|
+
## Final Checklist
|
|
231
|
+
|
|
232
|
+
- [ ] Used the correct hook location and path style
|
|
233
|
+
- [ ] Chose the narrowest correct event
|
|
234
|
+
- [ ] Added a matcher when appropriate
|
|
235
|
+
- [ ] Returned only fields supported by that hook event
|
|
236
|
+
- [ ] Made the script executable
|
|
237
|
+
- [ ] Tested the hook by triggering the real event
|
|
238
|
+
- [ ] Checked the Hooks tab or Hooks output channel if debugging was needed
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: create-rule
|
|
3
|
+
description: Create Cursor rules for persistent AI guidance. Use when user wants to create a rule, add coding standards, project conventions, file-specific patterns, or mentions ".cursor/rules", "AGENTS.md", "cursor rule", "coding standard", "convention", or "AI guidance".
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
# Creating Cursor Rules
|
|
7
|
+
|
|
8
|
+
Create project rules in `.cursor/rules/` to provide persistent context for the AI agent.
|
|
9
|
+
For one plain-Markdown file that always applies, `AGENTS.md` at the project root does the same job as an `alwaysApply` rule and needs no frontmatter.
|
|
10
|
+
|
|
11
|
+
## Check existing first
|
|
12
|
+
|
|
13
|
+
**Before creating a rule, check:**
|
|
14
|
+
|
|
15
|
+
1. **Check for existing rules:**
|
|
16
|
+
```bash
|
|
17
|
+
ls -la .cursor/rules/*.mdc 2>/dev/null
|
|
18
|
+
cat .cursor/rules/*.mdc 2>/dev/null | head -100
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
2. **Check for conflicting conventions:**
|
|
22
|
+
```bash
|
|
23
|
+
cat CONTRIBUTING.md .editorconfig .eslintrc* 2>/dev/null | head -50
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
3. **Check if similar rule exists:**
|
|
27
|
+
- Don't duplicate existing rules
|
|
28
|
+
- Consider extending existing rules instead
|
|
29
|
+
|
|
30
|
+
**Why:** Rules should complement, not conflict with, existing project conventions.
|
|
31
|
+
|
|
32
|
+
## Gather Requirements
|
|
33
|
+
|
|
34
|
+
Before creating a rule, determine:
|
|
35
|
+
|
|
36
|
+
1. **Purpose**: What should this rule enforce or teach?
|
|
37
|
+
2. **Scope**: Should it always apply, or only for specific files?
|
|
38
|
+
3. **File patterns**: If file-specific, which glob patterns?
|
|
39
|
+
|
|
40
|
+
### Inferring from Context
|
|
41
|
+
|
|
42
|
+
If you have previous conversation context, infer rules from what was discussed. You can create multiple rules if the conversation covers distinct topics or patterns. Don't ask redundant questions if the context already provides the answers.
|
|
43
|
+
|
|
44
|
+
### Required Questions
|
|
45
|
+
|
|
46
|
+
If the user hasn't specified scope, ask:
|
|
47
|
+
- "Should this rule always apply, or only when working with specific files?"
|
|
48
|
+
|
|
49
|
+
If they mentioned specific files and haven't provided concrete patterns, ask:
|
|
50
|
+
- "Which file patterns should this rule apply to?" (e.g., `**/*.ts`, `backend/**/*.py`)
|
|
51
|
+
|
|
52
|
+
Get the file patterns right: a wrong glob means the rule never loads, or loads for every file.
|
|
53
|
+
|
|
54
|
+
Use the AskQuestion tool when available to gather this efficiently.
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## Rule File Format
|
|
59
|
+
|
|
60
|
+
Rules are `.mdc` files in `.cursor/rules/` with YAML frontmatter:
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
.cursor/rules/
|
|
64
|
+
typescript-standards.mdc
|
|
65
|
+
react-patterns.mdc
|
|
66
|
+
api-conventions.mdc
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### File Structure
|
|
70
|
+
|
|
71
|
+
```markdown
|
|
72
|
+
---
|
|
73
|
+
description: Brief description of what this rule does
|
|
74
|
+
globs: **/*.ts # File pattern for file-specific rules
|
|
75
|
+
alwaysApply: false # Set to true if rule should always apply
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
# Rule Title
|
|
79
|
+
|
|
80
|
+
Your rule content here...
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### Frontmatter Fields
|
|
84
|
+
|
|
85
|
+
| Field | Type | Description |
|
|
86
|
+
|-------|------|-------------|
|
|
87
|
+
| `description` | string | What the rule does (shown in rule picker) |
|
|
88
|
+
| `globs` | string | File pattern - rule applies when matching files are open |
|
|
89
|
+
| `alwaysApply` | boolean | If true, applies to every session |
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## Rule Configurations
|
|
94
|
+
|
|
95
|
+
### Always Apply
|
|
96
|
+
|
|
97
|
+
For universal standards that should apply to every conversation:
|
|
98
|
+
|
|
99
|
+
```yaml
|
|
100
|
+
---
|
|
101
|
+
description: Core coding standards for the project
|
|
102
|
+
alwaysApply: true
|
|
103
|
+
---
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### Apply to Specific Files
|
|
107
|
+
|
|
108
|
+
For rules that apply when working with certain file types:
|
|
109
|
+
|
|
110
|
+
```yaml
|
|
111
|
+
---
|
|
112
|
+
description: TypeScript conventions for this project
|
|
113
|
+
globs: **/*.ts
|
|
114
|
+
alwaysApply: false
|
|
115
|
+
---
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
## Best Practices
|
|
121
|
+
|
|
122
|
+
### Keep Rules Concise
|
|
123
|
+
|
|
124
|
+
- **Under 50 lines**: Rules should be concise and to the point
|
|
125
|
+
- **One concern per rule**: Split large rules into focused pieces
|
|
126
|
+
- **Actionable**: Write like clear internal docs
|
|
127
|
+
- **Normal volume, with the reason**: state each constraint once and say why. MUST/NEVER/CRITICAL over-trigger on current models; "try to" reads as permission to skip
|
|
128
|
+
- **Concrete examples**: Ideally provide concrete examples of how to fix issues
|
|
129
|
+
- **Always-on costs every turn**: an `alwaysApply` rule rides in every request inside the cached prefix. Keep those few, short, and byte-stable (no dates, counters, or generated timestamps); scope the rest with `globs`
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
## Example Rules
|
|
134
|
+
|
|
135
|
+
### TypeScript Standards
|
|
136
|
+
|
|
137
|
+
```markdown
|
|
138
|
+
---
|
|
139
|
+
description: TypeScript coding standards
|
|
140
|
+
globs: **/*.ts
|
|
141
|
+
alwaysApply: false
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
# Error Handling
|
|
145
|
+
|
|
146
|
+
\`\`\`typescript
|
|
147
|
+
// ❌ BAD
|
|
148
|
+
try {
|
|
149
|
+
await fetchData();
|
|
150
|
+
} catch (e) {}
|
|
151
|
+
|
|
152
|
+
// ✅ GOOD
|
|
153
|
+
try {
|
|
154
|
+
await fetchData();
|
|
155
|
+
} catch (e) {
|
|
156
|
+
logger.error('Failed to fetch', { error: e });
|
|
157
|
+
throw new DataFetchError('Unable to retrieve data', { cause: e });
|
|
158
|
+
}
|
|
159
|
+
\`\`\`
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
### React Patterns
|
|
163
|
+
|
|
164
|
+
```markdown
|
|
165
|
+
---
|
|
166
|
+
description: React component patterns
|
|
167
|
+
globs: **/*.tsx
|
|
168
|
+
alwaysApply: false
|
|
169
|
+
---
|
|
170
|
+
|
|
171
|
+
# React Patterns
|
|
172
|
+
|
|
173
|
+
- Use functional components
|
|
174
|
+
- Extract custom hooks for reusable logic
|
|
175
|
+
- Colocate styles with components
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
---
|
|
179
|
+
|
|
180
|
+
## Checklist
|
|
181
|
+
|
|
182
|
+
- [ ] File is `.mdc` format in `.cursor/rules/`
|
|
183
|
+
- [ ] Frontmatter configured correctly
|
|
184
|
+
- [ ] Content under 50 lines (split larger rules by concern)
|
|
185
|
+
- [ ] Includes concrete examples
|
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: create-skill
|
|
3
|
+
description: Guide users through creating effective Agent Skills for Cursor. Use when user wants to create, write, update, or debug a skill, or asks about SKILL.md format, skill structure, ~/.cursor/skills/, or skill best practices.
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
# Creating Skills in Cursor
|
|
7
|
+
|
|
8
|
+
This skill guides you through creating effective Agent Skills for Cursor. Skills are markdown files that teach the agent how to perform specific tasks: reviewing PRs using team standards, generating commit messages in a preferred format, querying database schemas, or any specialized workflow.
|
|
9
|
+
|
|
10
|
+
## Check existing first
|
|
11
|
+
|
|
12
|
+
**Before creating a skill, check:**
|
|
13
|
+
|
|
14
|
+
1. **Check for existing skills:**
|
|
15
|
+
```bash
|
|
16
|
+
ls -la ~/.cursor/skills/*/SKILL.md 2>/dev/null
|
|
17
|
+
ls -la .cursor/skills/*/SKILL.md 2>/dev/null
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
2. **Check for similar functionality:**
|
|
21
|
+
```bash
|
|
22
|
+
grep -r "description:" ~/.cursor/skills/*/SKILL.md 2>/dev/null
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
3. **Consider extending vs creating:**
|
|
26
|
+
- Could an existing skill be enhanced?
|
|
27
|
+
- Would a rule be more appropriate than a skill?
|
|
28
|
+
|
|
29
|
+
**Why:** Avoid skill duplication. Skills should have clear, distinct purposes.
|
|
30
|
+
|
|
31
|
+
## Before You Begin: Gather Requirements
|
|
32
|
+
|
|
33
|
+
Before creating a skill, gather essential information from the user about:
|
|
34
|
+
|
|
35
|
+
1. **Purpose and scope**: What specific task or workflow should this skill help with?
|
|
36
|
+
2. **Target location**: Should this be a personal skill (~/.cursor/skills/) or project skill (.cursor/skills/)?
|
|
37
|
+
3. **Trigger scenarios**: When should the agent automatically apply this skill?
|
|
38
|
+
4. **Key domain knowledge**: What specialized information does the agent need that it wouldn't already know?
|
|
39
|
+
5. **Output format preferences**: Are there specific templates, formats, or styles required?
|
|
40
|
+
6. **Existing patterns**: Are there existing examples or conventions to follow?
|
|
41
|
+
|
|
42
|
+
### Inferring from Context
|
|
43
|
+
|
|
44
|
+
If you have previous conversation context, infer the skill from what was discussed. You can create skills based on workflows, patterns, or domain knowledge that emerged in the conversation.
|
|
45
|
+
|
|
46
|
+
### Gathering Additional Information
|
|
47
|
+
|
|
48
|
+
If you need clarification, use the AskQuestion tool when available:
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
Example AskQuestion usage:
|
|
52
|
+
- "Where should this skill be stored?" with options like ["Personal (~/.cursor/skills/)", "Project (.cursor/skills/)"]
|
|
53
|
+
- "Should this skill include executable scripts?" with options like ["Yes", "No"]
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
If the AskQuestion tool is not available, ask these questions conversationally.
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## Skill File Structure
|
|
61
|
+
|
|
62
|
+
### Directory Layout
|
|
63
|
+
|
|
64
|
+
Skills are stored as directories containing a `SKILL.md` file:
|
|
65
|
+
|
|
66
|
+
```
|
|
67
|
+
skill-name/
|
|
68
|
+
├── SKILL.md # Required - main instructions
|
|
69
|
+
├── reference.md # Optional - detailed documentation
|
|
70
|
+
├── examples.md # Optional - usage examples
|
|
71
|
+
└── scripts/ # Optional - utility scripts
|
|
72
|
+
├── validate.py
|
|
73
|
+
└── helper.sh
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### Storage Locations
|
|
77
|
+
|
|
78
|
+
| Type | Path | Scope |
|
|
79
|
+
|------|------|-------|
|
|
80
|
+
| Personal | ~/.cursor/skills/skill-name/ | Available across all your projects |
|
|
81
|
+
| Project | .cursor/skills/skill-name/ | Shared with anyone using the repository |
|
|
82
|
+
|
|
83
|
+
**IMPORTANT**: Never create skills in `~/.cursor/skills-cursor/`. This directory is reserved for Cursor's internal built-in skills and is managed automatically by the system.
|
|
84
|
+
|
|
85
|
+
### SKILL.md Structure
|
|
86
|
+
|
|
87
|
+
Every skill requires a `SKILL.md` file with YAML frontmatter and markdown body:
|
|
88
|
+
|
|
89
|
+
```markdown
|
|
90
|
+
---
|
|
91
|
+
name: your-skill-name
|
|
92
|
+
description: Brief description of what this skill does and when to use it
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
# Your Skill Name
|
|
96
|
+
|
|
97
|
+
## Instructions
|
|
98
|
+
Outcomes, constraints, and how to verify. Numbered steps only where order is load-bearing (destructive ops, auth, migrations).
|
|
99
|
+
|
|
100
|
+
## Examples
|
|
101
|
+
Concrete examples of using this skill.
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### Required Metadata Fields
|
|
105
|
+
|
|
106
|
+
| Field | Requirements | Purpose |
|
|
107
|
+
|-------|--------------|---------|
|
|
108
|
+
| `name` | Max 64 chars, lowercase letters/numbers/hyphens only | Unique identifier for the skill |
|
|
109
|
+
| `description` | Max 320 chars in kenji (spec max 1024), non-empty | Helps agent decide when to apply the skill |
|
|
110
|
+
|
|
111
|
+
### Optional fields
|
|
112
|
+
|
|
113
|
+
Cursor ignores keys it does not list; Claude Code honors all of these. Any other key goes under `metadata`.
|
|
114
|
+
|
|
115
|
+
| Field | Hosts | Use |
|
|
116
|
+
|-------|-------|-----|
|
|
117
|
+
| `disable-model-invocation: true` | Cursor, Claude Code | User-initiated rituals. Also keeps the description out of the always-on skill roster that every request pays for. |
|
|
118
|
+
| `user-invocable: false` | Claude Code | Reference-only skill; hides the `/` entry. |
|
|
119
|
+
| `effort` | Claude Code | `low` / `medium` / `high` / `xhigh` / `max`. Opus 5.5 defaults to `medium`; declare `high` for audit, plan, judge, security, and architecture skills, `low` for mechanical, read-only, or handoff skills. Effort is the thinking control — prose cannot raise or lower it. |
|
|
120
|
+
| `context: fork` + `agent: <name>` | Claude Code | Run in a forked context so the output stays out of the main conversation; `agent: Explore` for read-only inventory. |
|
|
121
|
+
| `model`, `allowed-tools` | Claude Code | Pin a model; restrict tools. |
|
|
122
|
+
| `paths` | Cursor, Claude Code | Globs; the skill applies when matching files are in play. |
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## Writing Effective Descriptions
|
|
127
|
+
|
|
128
|
+
The description is **critical** for skill discovery. The agent uses it to decide when to apply your skill.
|
|
129
|
+
|
|
130
|
+
### Description Best Practices
|
|
131
|
+
|
|
132
|
+
1. **Write in third person** (the description is injected into the system prompt):
|
|
133
|
+
- ✅ Good: "Processes Excel files and generates reports"
|
|
134
|
+
- ❌ Avoid: "I can help you process Excel files"
|
|
135
|
+
- ❌ Avoid: "You can use this to process Excel files"
|
|
136
|
+
|
|
137
|
+
2. **Be specific and include trigger terms**:
|
|
138
|
+
- ✅ Good: "Extract text and tables from PDF files, fill forms, merge documents. Use when working with PDF files or when the user mentions PDFs, forms, or document extraction."
|
|
139
|
+
- ❌ Vague: "Helps with documents"
|
|
140
|
+
|
|
141
|
+
3. **Include both WHAT and WHEN**:
|
|
142
|
+
- WHAT: What the skill does (specific capabilities)
|
|
143
|
+
- WHEN: When the agent should use it (trigger scenarios)
|
|
144
|
+
|
|
145
|
+
### Description Examples
|
|
146
|
+
|
|
147
|
+
```yaml
|
|
148
|
+
# PDF Processing
|
|
149
|
+
description: Extract text and tables from PDF files, fill forms, merge documents. Use when working with PDF files or when the user mentions PDFs, forms, or document extraction.
|
|
150
|
+
|
|
151
|
+
# Excel Analysis
|
|
152
|
+
description: Analyze Excel spreadsheets, create pivot tables, generate charts. Use when analyzing Excel files, spreadsheets, tabular data, or .xlsx files.
|
|
153
|
+
|
|
154
|
+
# Git Commit Helper
|
|
155
|
+
description: Generate descriptive commit messages by analyzing git diffs. Use when the user asks for help writing commit messages or reviewing staged changes.
|
|
156
|
+
|
|
157
|
+
# Code Review
|
|
158
|
+
description: Review code for quality, security, and best practices following team standards. Use when reviewing pull requests, code changes, or when the user asks for a code review.
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
## Core Authoring Principles
|
|
164
|
+
|
|
165
|
+
### 1. Concise is Key
|
|
166
|
+
|
|
167
|
+
The context window is shared with conversation history, other skills, and requests. Every token competes for space.
|
|
168
|
+
|
|
169
|
+
**Default assumption**: The agent is already very smart. Only add context it doesn't already have.
|
|
170
|
+
|
|
171
|
+
Challenge each piece of information:
|
|
172
|
+
- "Does the agent really need this explanation?"
|
|
173
|
+
- "Can I assume the agent knows this?"
|
|
174
|
+
- "Does this paragraph justify its token cost?"
|
|
175
|
+
|
|
176
|
+
**Good (concise)**:
|
|
177
|
+
```markdown
|
|
178
|
+
## Extract PDF text
|
|
179
|
+
|
|
180
|
+
Use pdfplumber for text extraction:
|
|
181
|
+
|
|
182
|
+
\`\`\`python
|
|
183
|
+
import pdfplumber
|
|
184
|
+
|
|
185
|
+
with pdfplumber.open("file.pdf") as pdf:
|
|
186
|
+
text = pdf.pages[0].extract_text()
|
|
187
|
+
\`\`\`
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
**Bad (verbose)**:
|
|
191
|
+
```markdown
|
|
192
|
+
## Extract PDF text
|
|
193
|
+
|
|
194
|
+
PDF (Portable Document Format) files are a common file format that contains
|
|
195
|
+
text, images, and other content. To extract text from a PDF, you'll need to
|
|
196
|
+
use a library. There are many libraries available for PDF processing, but we
|
|
197
|
+
recommend pdfplumber because it's easy to use and handles most cases well...
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
### 2. Keep SKILL.md Under 500 Lines
|
|
201
|
+
|
|
202
|
+
For optimal performance, the main SKILL.md file should be concise. Use progressive disclosure for detailed content.
|
|
203
|
+
|
|
204
|
+
### 3. Progressive Disclosure
|
|
205
|
+
|
|
206
|
+
Put essential information in SKILL.md; detailed reference material in separate files that the agent reads only when needed.
|
|
207
|
+
|
|
208
|
+
```markdown
|
|
209
|
+
# PDF Processing
|
|
210
|
+
|
|
211
|
+
## Quick start
|
|
212
|
+
[Essential instructions here]
|
|
213
|
+
|
|
214
|
+
## Additional resources
|
|
215
|
+
- For complete API details, see [reference.md](reference.md)
|
|
216
|
+
- For usage examples, see [examples.md](examples.md)
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
**Keep references one level deep** - link directly from SKILL.md to reference files. Deeply nested references may result in partial reads.
|
|
220
|
+
|
|
221
|
+
### 4. Prune with the verbosity levers
|
|
222
|
+
|
|
223
|
+
Adapted from [mattpocock/skills](https://github.com/mattpocock/skills) (MIT):
|
|
224
|
+
|
|
225
|
+
- **No-op test** — if a sentence doesn't change behavior versus the agent's
|
|
226
|
+
default ("be thorough"), delete the whole sentence. Do not swap in an
|
|
227
|
+
intensifier (*relentless*); on current models emphasis over-triggers — name
|
|
228
|
+
the concrete behavior and its reason instead.
|
|
229
|
+
- **Positive phrasing** — state the target behavior instead of prohibiting the
|
|
230
|
+
bad one; keep prohibitions only as hard guardrails, paired with what to do
|
|
231
|
+
instead.
|
|
232
|
+
- **Leading words** — collapse restated qualities into one compact concept the
|
|
233
|
+
model already knows ("fast, deterministic, low-overhead" → a *tight* loop).
|
|
234
|
+
- **One trigger per branch** — in descriptions, synonyms of the same trigger are
|
|
235
|
+
duplication; keep only genuinely distinct branches.
|
|
236
|
+
- **Checkable completion criteria** — end steps on a condition the agent can
|
|
237
|
+
verify, not a vibe; vague criteria invite premature completion.
|
|
238
|
+
|
|
239
|
+
### 5. Set Appropriate Degrees of Freedom
|
|
240
|
+
|
|
241
|
+
Match specificity to the task's fragility:
|
|
242
|
+
|
|
243
|
+
| Freedom Level | When to Use | Example |
|
|
244
|
+
|---------------|-------------|---------|
|
|
245
|
+
| **High** (text instructions) | Multiple valid approaches, context-dependent | Code review guidelines |
|
|
246
|
+
| **Medium** (pseudocode/templates) | Preferred pattern with acceptable variation | Report generation |
|
|
247
|
+
| **Low** (specific scripts) | Fragile operations, consistency critical | Database migrations |
|
|
248
|
+
|
|
249
|
+
### 6. Write for current models
|
|
250
|
+
|
|
251
|
+
- **Effort, not prose, sets thinking.** Leave out "think step by step", "think hard", and "double-check your work"; set `effort:` and state the outcome to verify. Keep evidence rules ("tie every finding to a tool result") — they target fabricated progress, not thinking.
|
|
252
|
+
- **Normal volume, with the reason.** MUST/NEVER/CRITICAL over-trigger; "try to" and "if possible" read as permission to skip. Say it once and say why.
|
|
253
|
+
- **Describe success, not the grader.** State every requirement; leave out how the output will be scored or tested by a reader.
|
|
254
|
+
- **Do not suppress updates.** The always-on verification rule asks for an intent line, load-bearing notes and a recap; never add "no preamble" or "hold findings". A skill that runs unattended says when the turn may end.
|
|
255
|
+
- **Frontend skills name the defaults to avoid** (cream backgrounds, italic accent words, "01/02/03" labels, pill buttons, Inter/Roboto, purple gradients, three equal cards); "avoid a generic look" swaps one default for another.
|
|
256
|
+
|
|
257
|
+
---
|
|
258
|
+
|
|
259
|
+
## Skill creation workflow (summary)
|
|
260
|
+
|
|
261
|
+
1. **Discovery** — purpose, location, triggers, constraints
|
|
262
|
+
2. **Design** — name, description, sections, supporting files
|
|
263
|
+
3. **Implement** — `SKILL.md` + `references/` + `scripts/` as needed
|
|
264
|
+
4. **Verify** — in kenji run `npm run validate:skills`; description ≤320 chars, body <500 lines
|
|
265
|
+
|
|
266
|
+
## Additional resources
|
|
267
|
+
|
|
268
|
+
- Patterns, anti-patterns, full workflow, example, checklist → [references/authoring-guide.md](references/authoring-guide.md)
|
|
269
|
+
|