@kensaurus/skills 0.0.0-stage → 2.0.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 +1761 -0
- package/LICENSE +21 -0
- package/NOTICE +13 -0
- package/README.md +820 -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 +93 -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 +296 -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 +154 -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 +379 -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 +304 -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-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 +242 -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 +104 -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 +387 -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 +296 -0
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: audit-bundle-size
|
|
3
|
+
description: >
|
|
4
|
+
Analyse and shrink a web app's JavaScript bundle. Use when "reduce bundle
|
|
5
|
+
size", "tree shaking", "code splitting", "lazy loading", "slow initial
|
|
6
|
+
load", "chunk size", "LCP caused by JS", or "why is the bundle so big".
|
|
7
|
+
Runtime → audit-performance.
|
|
8
|
+
license: MIT
|
|
9
|
+
effort: high
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# audit-bundle-size — Find and Eliminate Bundle Bloat
|
|
13
|
+
|
|
14
|
+
**Degree of freedom: MIXED** — Offender triage and swap choice `[HIGH freedom]`;
|
|
15
|
+
Phase 1 production build + analyser `[LOW freedom — run exactly]`.
|
|
16
|
+
|
|
17
|
+
> **Audit-and-fix exception.** Measure the payload, then shrink it. Runtime
|
|
18
|
+
> slowness → `audit-performance`.
|
|
19
|
+
>
|
|
20
|
+
> Fix only what the measurement named, in the files it named; a repo-wide
|
|
21
|
+
> dependency sweep the report did not list is a different session. Edit
|
|
22
|
+
> surgically — the offending import, `dynamic()` boundary, or chunk config —
|
|
23
|
+
> rather than rewriting whole files. Pre-existing bugs met on the way go in
|
|
24
|
+
> the report as follow-ups. Add or change tests only where the repo already
|
|
25
|
+
> keeps them for that surface; scratch checks and generated analyser reports
|
|
26
|
+
> (`client.html`, `bundle-report.html`) stay out of the commit. An
|
|
27
|
+
> `ANALYZE=true`-guarded analyser config stays only if the repo already keeps one.
|
|
28
|
+
|
|
29
|
+
**Every kilobyte of JavaScript the browser must download, parse, and compile
|
|
30
|
+
before showing anything costs real users real time.** A large initial bundle is
|
|
31
|
+
the #1 avoidable cause of slow LCP and poor Core Web Vitals. Find exactly what
|
|
32
|
+
is bloating it and fix each item.
|
|
33
|
+
|
|
34
|
+
## How to reason — Observe → Interpret → Classify → Severity
|
|
35
|
+
|
|
36
|
+
1. **Observe** — quote First Load JS / chunk gzip and the treemap contributor (`file` + package)
|
|
37
|
+
2. **Interpret** — is this unused code on the critical path, a duplicate, or a missing split?
|
|
38
|
+
3. **Classify** — giant-vendor / full-library import / missing-lazy / unused-dep / dev-in-prod / duplicate
|
|
39
|
+
4. **Severity** — by gzip on the initial route: >250 KB First Load JS = review; do not delete a feature to save KB
|
|
40
|
+
|
|
41
|
+
## Worked example
|
|
42
|
+
|
|
43
|
+
> **Observe:** Next.js First Load JS 420 KB gzip. Treemap: default `lodash`
|
|
44
|
+
> import in `lib/utils.ts`; `moment` with all locales in the shared layout.
|
|
45
|
+
> **Interpret:** two libraries pull unused code onto every route.
|
|
46
|
+
> **Classify:** full-library import + oversized date lib.
|
|
47
|
+
> **Severity:** High — over the 250 KB review threshold.
|
|
48
|
+
> **Finding:** named `lodash/debounce` + replace `moment` with `dayjs`; remesure
|
|
49
|
+
> First Load JS before claiming a save.
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## Phase 0: Detect bundler and existing setup [HIGH freedom]
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
package.json scripts.build → build command and framework
|
|
57
|
+
vite.config.* → Vite + rollupOptions
|
|
58
|
+
next.config.* → Next.js (webpack / Turbopack)
|
|
59
|
+
webpack.config.* → standalone Webpack
|
|
60
|
+
astro.config.* → Astro (islands, Vite underneath)
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Identify:
|
|
64
|
+
- **Bundler**: Vite / Webpack / Rollup / esbuild / Turbopack / Next.js built-in
|
|
65
|
+
- **Analyser available**: `rollup-plugin-visualizer`, `webpack-bundle-analyzer`,
|
|
66
|
+
`@next/bundle-analyzer`, `source-map-explorer`
|
|
67
|
+
- **Framework**: Next.js (App / Pages), SvelteKit, Astro, Remix, Nuxt, Vite SPA
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## Phase 1: Run a production build with analysis [LOW freedom — run exactly]
|
|
72
|
+
|
|
73
|
+
### Vite / Rollup
|
|
74
|
+
|
|
75
|
+
If `rollup-plugin-visualizer` is not installed:
|
|
76
|
+
```bash
|
|
77
|
+
npm install --save-dev rollup-plugin-visualizer
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Add temporarily to `vite.config.ts`:
|
|
81
|
+
```typescript
|
|
82
|
+
import { visualizer } from 'rollup-plugin-visualizer';
|
|
83
|
+
// in plugins array:
|
|
84
|
+
visualizer({ open: false, filename: 'dist/bundle-report.html', gzipSize: true })
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Then build:
|
|
88
|
+
```bash
|
|
89
|
+
npm run build 2>&1 | tail -40
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Read `dist/bundle-report.html` for the treemap, or parse `dist/stats.json` if
|
|
93
|
+
the plugin is configured to output JSON.
|
|
94
|
+
|
|
95
|
+
### Next.js
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
ANALYZE=true npm run build 2>&1 | tail -60
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
This requires `@next/bundle-analyzer` in `next.config.*`:
|
|
102
|
+
```javascript
|
|
103
|
+
const withBundleAnalyzer = require('@next/bundle-analyzer')({
|
|
104
|
+
enabled: process.env.ANALYZE === 'true',
|
|
105
|
+
});
|
|
106
|
+
module.exports = withBundleAnalyzer({ /* your config */ });
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
Read the generated `client.html` report. Key number: **First Load JS** per route.
|
|
110
|
+
Next.js prints this in the build output — capture it for before/after comparison.
|
|
111
|
+
|
|
112
|
+
### If no analyser is installed
|
|
113
|
+
|
|
114
|
+
Use `source-map-explorer` on the build output:
|
|
115
|
+
```bash
|
|
116
|
+
npx source-map-explorer 'dist/**/*.js' --html dist/bundle-report.html
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Or for a quick size summary:
|
|
120
|
+
```bash
|
|
121
|
+
find dist -name '*.js' | xargs ls -lh | sort -k5 -hr | head -20
|
|
122
|
+
find dist -name '*.css' | xargs ls -lh | sort -k5 -hr | head -5
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## Phase 2: Parse the results — find the problems [HIGH freedom]
|
|
128
|
+
|
|
129
|
+
For each chunk or entry point, record:
|
|
130
|
+
|
|
131
|
+
| Chunk | Raw size | Gzip size | Largest contributors |
|
|
132
|
+
|-------|----------|-----------|---------------------|
|
|
133
|
+
| main / page.js | ... | ... | [dep@version, ...] |
|
|
134
|
+
| vendor | ... | ... | [dep@version, ...] |
|
|
135
|
+
|
|
136
|
+
### Red flags to look for
|
|
137
|
+
|
|
138
|
+
| Problem | Signal | Impact |
|
|
139
|
+
|---------|--------|--------|
|
|
140
|
+
| One giant vendor chunk | Single `vendor.js` > 200 KB gzip | High — blocks first paint |
|
|
141
|
+
| Duplicate dependency | Same library listed twice (e.g. `lodash` + `lodash-es`) | Medium |
|
|
142
|
+
| Full library import | `import _ from 'lodash'` (imports everything) | High |
|
|
143
|
+
| Missing lazy routes | All routes in one bundle | High |
|
|
144
|
+
| Unused package | Large dep that appears in bundle but only 1–2 exports used | High |
|
|
145
|
+
| Dev-only dep in prod bundle | `faker`, `debug`, `chalk` in client code | Medium |
|
|
146
|
+
| Moment.js | 67 KB gzip with all locales | Medium — replace with date-fns or dayjs |
|
|
147
|
+
| Material UI / Ant Design full import | Full icon library loaded | High |
|
|
148
|
+
| `react-icons` full package | 50+ MB raw, huge when not tree-shaken | High |
|
|
149
|
+
|
|
150
|
+
**Also check:**
|
|
151
|
+
- [ ] React Compiler on (delete manual memo it makes redundant — smaller bundle, fewer bugs)
|
|
152
|
+
- [ ] Barrel imports routed through `experimental.optimizePackageImports` / direct paths (icon libs, lodash, date libs)
|
|
153
|
+
- [ ] Route prefetch is deliberate — Next.js 16 prefetch is conservative by default; `<Link prefetch>` only on likely-next routes, and don't double-prefetch what Speculation Rules already cover
|
|
154
|
+
|
|
155
|
+
Below-fold widgets → `dynamic()` with a Suspense skeleton; navigation prefetch/prerender → `enhance-web-instant-nav`.
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
## Phase 3: Research current alternatives [HIGH freedom]
|
|
160
|
+
|
|
161
|
+
For the largest offenders, check current alternatives:
|
|
162
|
+
```json
|
|
163
|
+
firecrawl:firecrawl_search
|
|
164
|
+
{
|
|
165
|
+
"query": "replace <package-name> smaller alternative bundle size [current year]",
|
|
166
|
+
"limit": 3,
|
|
167
|
+
"sources": [{ "type": "web" }]
|
|
168
|
+
}
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
Common swaps (research to confirm current state):
|
|
172
|
+
- `moment` → `date-fns` or `dayjs` (much smaller, tree-shakeable)
|
|
173
|
+
- `lodash` → native JS or `lodash-es` with named imports
|
|
174
|
+
- Full icon set → per-icon imports or SVG sprites
|
|
175
|
+
- `axios` → native `fetch` (if browser targets allow)
|
|
176
|
+
- Large chart libs → check if a lighter alternative exists for the charts used
|
|
177
|
+
|
|
178
|
+
---
|
|
179
|
+
|
|
180
|
+
## Self-critique before applying [LOW freedom — do not skip]
|
|
181
|
+
|
|
182
|
+
1. **Measured** — First Load JS / gzip from a production build, not "looks big"
|
|
183
|
+
2. **Behavior preserved** — dynamic import has a loading state; do not delete a feature to save KB
|
|
184
|
+
3. **Right owner** — runtime slowness without payload evidence → `audit-performance`
|
|
185
|
+
4. **Analyzer honest** — if the analyser was skipped, say what you used
|
|
186
|
+
5. **Remeasure after each fix class** — no save claimed from inspection alone
|
|
187
|
+
|
|
188
|
+
---
|
|
189
|
+
|
|
190
|
+
## Phase 4: Fix — ordered by size saved [HIGH freedom]
|
|
191
|
+
|
|
192
|
+
### Fix 1: Named imports (tree shaking)
|
|
193
|
+
|
|
194
|
+
```typescript
|
|
195
|
+
// Before — pulls in the whole library
|
|
196
|
+
import _ from 'lodash';
|
|
197
|
+
import { BellIcon } from '@heroicons/react/24/solid'; // only needs Bell
|
|
198
|
+
|
|
199
|
+
// After — only the export you need
|
|
200
|
+
import debounce from 'lodash/debounce';
|
|
201
|
+
import { BellIcon } from '@heroicons/react/24/solid'; // already correct for heroicons v2
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
For icon libraries that do not tree-shake well, use per-icon deep imports or
|
|
205
|
+
an SVG sprite sheet.
|
|
206
|
+
|
|
207
|
+
### Fix 2: Dynamic imports for routes (code splitting)
|
|
208
|
+
|
|
209
|
+
**Next.js App Router** — code-splits by route automatically. If you have heavy
|
|
210
|
+
components inside a page, split them:
|
|
211
|
+
```typescript
|
|
212
|
+
import dynamic from 'next/dynamic';
|
|
213
|
+
const HeavyChart = dynamic(() => import('../components/HeavyChart'), {
|
|
214
|
+
loading: () => <ChartSkeleton />,
|
|
215
|
+
ssr: false, // if it uses browser-only APIs
|
|
216
|
+
});
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
**Vite / React Router:**
|
|
220
|
+
```typescript
|
|
221
|
+
const LazyPage = React.lazy(() => import('./pages/LazyPage'));
|
|
222
|
+
// Wrap in <Suspense fallback={<PageSkeleton />}>
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
**SvelteKit** — routes are code-split by default. For heavy components:
|
|
226
|
+
```svelte
|
|
227
|
+
{#await import('./HeavyComponent.svelte') then { default: Component }}
|
|
228
|
+
<Component />
|
|
229
|
+
{/await}
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
### Fix 3: Replace or remove over-sized dependencies
|
|
233
|
+
|
|
234
|
+
Follow the research from Phase 3. For any replacement:
|
|
235
|
+
1. Read the new library's docs via Context7 or Firecrawl before touching code.
|
|
236
|
+
2. Make the swap in one file, run `npm run build`, compare sizes before merging everywhere.
|
|
237
|
+
|
|
238
|
+
### Fix 4: Bundle splitting configuration
|
|
239
|
+
|
|
240
|
+
**Vite** — split large deps into their own cacheable chunks:
|
|
241
|
+
```typescript
|
|
242
|
+
build: {
|
|
243
|
+
rollupOptions: {
|
|
244
|
+
output: {
|
|
245
|
+
manualChunks: {
|
|
246
|
+
'react-vendor': ['react', 'react-dom'],
|
|
247
|
+
'router': ['react-router-dom'],
|
|
248
|
+
'charts': ['recharts'], // or whatever charting lib
|
|
249
|
+
},
|
|
250
|
+
},
|
|
251
|
+
},
|
|
252
|
+
},
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
**Next.js** — configure `splitChunks` in `next.config.*` only if the default
|
|
256
|
+
chunking is creating sub-optimal splits. Prefer `dynamic()` over manual config.
|
|
257
|
+
|
|
258
|
+
### Fix 5: Remove dev-only packages from the client bundle
|
|
259
|
+
|
|
260
|
+
Any package that should only run server-side or in tests must not be imported
|
|
261
|
+
from client-side code. Move to `devDependencies` and verify it disappears from
|
|
262
|
+
the bundle after rebuild.
|
|
263
|
+
|
|
264
|
+
---
|
|
265
|
+
|
|
266
|
+
## Phase 5: Measure the improvement [LOW freedom — run exactly]
|
|
267
|
+
|
|
268
|
+
After fixes, rebuild and re-run Phase 1:
|
|
269
|
+
|
|
270
|
+
```
|
|
271
|
+
Before: First Load JS = X KB gzip
|
|
272
|
+
After: First Load JS = Y KB gzip
|
|
273
|
+
Saved: Z KB (N%)
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
For each route (Next.js build output shows this), confirm the numbers improved.
|
|
277
|
+
Run a quick Playwright check to confirm the app still works:
|
|
278
|
+
|
|
279
|
+
```bash
|
|
280
|
+
PW="npx --yes @playwright/cli@latest"
|
|
281
|
+
$PW -s=bundle-check open --headed "<app-url>" # then `goto` each key route
|
|
282
|
+
$PW -s=bundle-check snapshot # no blank screen or error
|
|
283
|
+
$PW -s=bundle-check console # no new errors
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
---
|
|
287
|
+
|
|
288
|
+
## Quick-reference: size targets
|
|
289
|
+
|
|
290
|
+
| Asset | Target | Review if |
|
|
291
|
+
|-------|--------|-----------|
|
|
292
|
+
| Initial JS (gzip) | < 100 KB | > 250 KB |
|
|
293
|
+
| Route chunk (gzip) | < 50 KB | > 150 KB |
|
|
294
|
+
| CSS total (gzip) | < 20 KB | > 50 KB |
|
|
295
|
+
| Largest single image | < 200 KB | > 500 KB |
|
|
296
|
+
| Total page weight | < 500 KB | > 1.5 MB |
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: audit-cicd
|
|
3
|
+
description: >
|
|
4
|
+
Audit GitHub Actions CI/CD for cost, speed, and safety. Use when the Actions
|
|
5
|
+
bill or minutes are high, runners cost too much, CI is slow, cache storage
|
|
6
|
+
grows, or "CI/CD / workflow audit". Bypass or ratchet gaming →
|
|
7
|
+
audit-gate-logic.
|
|
8
|
+
license: MIT
|
|
9
|
+
effort: high
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# CI/CD Audit Skill
|
|
13
|
+
|
|
14
|
+
**Degree of freedom: MIXED** — Steps 1–3 judgment `[HIGH freedom]`; Step 0
|
|
15
|
+
`gh` inventory and Step 4 deletes `[LOW freedom — run exactly]`.
|
|
16
|
+
|
|
17
|
+
Systematic audit of GitHub Actions workflows to cut the Actions bill (minutes +
|
|
18
|
+
storage) and speed up CI **without losing test coverage or deploy safety**.
|
|
19
|
+
Uses the `gh` CLI for live billing, run history, and storage data.
|
|
20
|
+
|
|
21
|
+
## How to reason
|
|
22
|
+
|
|
23
|
+
1. **Observe** — quote the trigger, `runs-on`, `concurrency`, or `gh` minute/storage number
|
|
24
|
+
2. **Interpret** — billed twice, doomed minutes, or a 10× runner on every push?
|
|
25
|
+
3. **Classify** — double-bill / no-concurrency / expensive-runner / doomed-job / storage / correct
|
|
26
|
+
4. **Severity** — by `$` × safety; never score a cut that drops coverage
|
|
27
|
+
|
|
28
|
+
## Worked example
|
|
29
|
+
|
|
30
|
+
> **Observe:** `build-mobile.yml` `runs-on: macos-15` on `push:` to every
|
|
31
|
+
> branch; no `if:` gate; private repo.
|
|
32
|
+
> **Interpret:** every push bills ~10× Ubuntu for an iOS job nobody requested.
|
|
33
|
+
> **Classify:** expensive-runner on ordinary push.
|
|
34
|
+
> **Severity:** Very high (~10×).
|
|
35
|
+
> **Finding:** `build-mobile.yml` | macos on push | dispatch/tag-only | ~10×
|
|
36
|
+
|
|
37
|
+
## Step 0: Inventory the account and pipelines [LOW freedom — run exactly]
|
|
38
|
+
|
|
39
|
+
Measure before optimizing. Only **private** repos consume the paid minute
|
|
40
|
+
allowance; public repos get free minutes — don't spend effort there.
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
# Which repos actually cost money (private, active, recent pushes)?
|
|
44
|
+
gh repo list <owner> --limit 200 --json name,visibility,isArchived,pushedAt \
|
|
45
|
+
--jq 'sort_by(.pushedAt)|reverse|.[]|select(.visibility=="PRIVATE" and .isArchived==false)|"\(.name)\t\(.pushedAt[0:10])"'
|
|
46
|
+
|
|
47
|
+
# Per repo: active workflows, run volume (last 14d), and runner types
|
|
48
|
+
gh api "repos/<owner>/<repo>/actions/workflows" --jq '.workflows[]|select(.state=="active")|.name'
|
|
49
|
+
gh run list --repo <owner>/<repo> --created ">=YYYY-MM-DD" --limit 200 --json databaseId --jq 'length'
|
|
50
|
+
|
|
51
|
+
# Storage (the other half of the bill)
|
|
52
|
+
gh api "repos/<owner>/<repo>/actions/artifacts" --paginate --jq '[.artifacts[]|select(.expired==false)|.size_in_bytes]|add'
|
|
53
|
+
gh api "repos/<owner>/<repo>/actions/cache/usage" --jq '.active_caches_size_in_bytes'
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Rank repos by `runs × runner-multiplier`. A `macos-*` job counts ~10x a
|
|
57
|
+
`ubuntu` job; `*-large`/bigger runners cost more than standard.
|
|
58
|
+
|
|
59
|
+
## Step 1: Anti-pattern scan (per workflow) [HIGH freedom]
|
|
60
|
+
|
|
61
|
+
For each `.github/workflows/*.yml`, check for the recurring cost drivers:
|
|
62
|
+
|
|
63
|
+
- [ ] **Double-billing triggers** — the *same jobs* run on both `push: [main]`
|
|
64
|
+
and `pull_request` for main (every merge bills twice). PR gates
|
|
65
|
+
verification; a separate `deploy.yml` handles main. If both are needed,
|
|
66
|
+
guard per-job with `if: github.event_name == '...'`.
|
|
67
|
+
- [ ] **Missing `concurrency`** — no `cancel-in-progress`, so rapid pushes/PR
|
|
68
|
+
syncs stack full runs instead of superseding.
|
|
69
|
+
- [ ] **Expensive runners on ordinary pushes** — `macos-*` / `*-large` firing
|
|
70
|
+
on every push instead of `workflow_dispatch` or version tags only.
|
|
71
|
+
- [ ] **No path filters** — docs/config-only changes run the full heavy suite
|
|
72
|
+
(add `paths:` / `paths-ignore:`).
|
|
73
|
+
- [ ] **Doomed jobs** — a costly job (visual/e2e/Lighthouse) runs in parallel
|
|
74
|
+
with a cheap gate and keeps burning minutes after the gate fails
|
|
75
|
+
(gate it with `needs: [...]`).
|
|
76
|
+
- [ ] **Long/default artifact retention** — `upload-artifact` without
|
|
77
|
+
`retention-days` keeps outputs 90 days; heavy reports uploaded on
|
|
78
|
+
success (`if: always()`) instead of `if: failure()`.
|
|
79
|
+
- [ ] **Self-uploading SARIF pile-ups** — e.g. gitleaks-action uploads a tiny
|
|
80
|
+
SARIF artifact every run for 90 days.
|
|
81
|
+
- [ ] **Over-frequent crons** — daily `schedule:` where weekly suffices.
|
|
82
|
+
- [ ] **Redundant rebuilds** — two jobs each run the same build instead of
|
|
83
|
+
building once and sharing via artifact (only when their build env is
|
|
84
|
+
identical — see Safety).
|
|
85
|
+
|
|
86
|
+
## Step 2: Cost levers (highest impact first) [HIGH freedom]
|
|
87
|
+
|
|
88
|
+
| Lever | Fix | Impact |
|
|
89
|
+
|-------|-----|--------|
|
|
90
|
+
| macOS/large on push | Gate to `workflow_dispatch` / tags | Very high (~10x) |
|
|
91
|
+
| Doomed heavy jobs | `needs: [cheap-gate]` so they skip on failure | High |
|
|
92
|
+
| Double-billing triggers | Drop the redundant trigger (keep the gate) | High |
|
|
93
|
+
| No concurrency | Add `cancel-in-progress` | Medium |
|
|
94
|
+
| No path filters | `paths:` / `paths-ignore:` | Medium |
|
|
95
|
+
| Daily crons | Move to weekly | Medium |
|
|
96
|
+
| Artifact retention | `retention-days: 1–7` + `if: failure()` | Storage |
|
|
97
|
+
| Repeated installs | Cache deps / Playwright browsers / build cache | Medium |
|
|
98
|
+
|
|
99
|
+
## Step 3: Fix patterns [HIGH freedom]
|
|
100
|
+
|
|
101
|
+
```yaml
|
|
102
|
+
# Concurrency — every workflow. CI/verification cancels superseded runs:
|
|
103
|
+
concurrency:
|
|
104
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
105
|
+
cancel-in-progress: true
|
|
106
|
+
|
|
107
|
+
# Deploy/release: never cancel a live deploy. For combined verify-on-PR +
|
|
108
|
+
# deploy-on-push workflows, cancel PR churn only:
|
|
109
|
+
concurrency:
|
|
110
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
111
|
+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
```yaml
|
|
115
|
+
# Expensive runner: dispatch/tag-only, not every push
|
|
116
|
+
build-ios:
|
|
117
|
+
runs-on: macos-15
|
|
118
|
+
if: ${{ inputs.platform == 'ios' || startsWith(github.ref, 'refs/tags/') }}
|
|
119
|
+
timeout-minutes: 60 # cap runaway 10x spend
|
|
120
|
+
|
|
121
|
+
# Lean artifacts
|
|
122
|
+
- uses: actions/upload-artifact@v4
|
|
123
|
+
if: failure()
|
|
124
|
+
with: { name: report, path: report/, retention-days: 3 }
|
|
125
|
+
|
|
126
|
+
# Stop the gitleaks SARIF pile-up
|
|
127
|
+
env: { GITLEAKS_ENABLE_UPLOAD_ARTIFACT: "false" }
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
## Step 4: Storage cleanup (destructive — confirm first) [LOW freedom — confirm first]
|
|
131
|
+
|
|
132
|
+
Artifacts and caches are ephemeral CI outputs; deleting them is safe but
|
|
133
|
+
irreversible. Confirm with the user, then:
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
# Delete non-expired artifacts in a repo
|
|
137
|
+
gh api "repos/<owner>/<repo>/actions/artifacts" --paginate \
|
|
138
|
+
--jq '.artifacts[]|select(.expired==false)|.id' \
|
|
139
|
+
| xargs -I{} gh api -X DELETE "repos/<owner>/<repo>/actions/artifacts/{}"
|
|
140
|
+
|
|
141
|
+
# Delete caches
|
|
142
|
+
gh api "repos/<owner>/<repo>/actions/caches" --paginate --jq '.actions_caches[].id' \
|
|
143
|
+
| xargs -I{} gh api -X DELETE "repos/<owner>/<repo>/actions/caches/{}"
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
## Safety rules (do NOT trade coverage or deploys for cost)
|
|
147
|
+
|
|
148
|
+
- **Never delete, skip, or weaken a test** to save minutes. Make advisory
|
|
149
|
+
scans (`npm audit`, CVE scans) `continue-on-error` or move them to a
|
|
150
|
+
`schedule` — keep the check.
|
|
151
|
+
- **Keep the deploy gate.** If `deploy.yml` triggers on the CI `workflow_run`
|
|
152
|
+
for `push`, do not remove the `push` trigger from CI.
|
|
153
|
+
- **Only share a build across jobs when their build env is identical.** Reusing
|
|
154
|
+
an artifact built with different secrets/flags (prod env, QA build stamps)
|
|
155
|
+
ships or tests the wrong bundle.
|
|
156
|
+
- **Update branch protection when renaming/merging jobs.** If a required status
|
|
157
|
+
check's job name changes, `PATCH` `required_status_checks.contexts` in the
|
|
158
|
+
same change or merges hang. Verify:
|
|
159
|
+
`gh api repos/<owner>/<repo>/branches/<main>/protection/required_status_checks --jq '.contexts'`
|
|
160
|
+
- **Verify with live runs.** After pushing, confirm no `startup_failure`
|
|
161
|
+
(YAML parses) and that intended jobs skip/run:
|
|
162
|
+
`gh run view <id> --json jobs --jq '.jobs[]|"\(.conclusion // .status) \(.name)"'`
|
|
163
|
+
|
|
164
|
+
## Account backstops (one-time, GitHub UI)
|
|
165
|
+
|
|
166
|
+
UI-only at the time of writing — check whether the settings API now covers
|
|
167
|
+
them before telling the user it is manual.
|
|
168
|
+
|
|
169
|
+
- **Default artifact/log retention** → Settings → Actions → General → drop from
|
|
170
|
+
90 days to ~14 (applies to all repos, including future ones).
|
|
171
|
+
- **Spending budget** → Settings → Billing → Budgets → set an Actions budget
|
|
172
|
+
with 75/90/100% alerts; keep "Stop usage" off so production deploys never
|
|
173
|
+
hard-break.
|
|
174
|
+
- **Rotate any secret leaked in a workflow/remote** (the user must revoke;
|
|
175
|
+
you can only strip it from configs).
|
|
176
|
+
|
|
177
|
+
## Self-critique before reporting [LOW freedom — do not skip]
|
|
178
|
+
|
|
179
|
+
1. **Evidenced** — workflow YAML or `gh` count, not "CI feels expensive"
|
|
180
|
+
2. **Reproducible** — same trigger/`runs-on` still present
|
|
181
|
+
3. **Severity justified** — ranked by `$` × runner multiplier
|
|
182
|
+
4. **Right owner** — silent bypass / ratchet → `audit-gate-logic`; hosting bill → `audit-infra-cost`
|
|
183
|
+
5. **No-false-safety** — no test deleted or skipped to save minutes; storage delete confirmed
|
|
184
|
+
|
|
185
|
+
## Output: CI/CD Cost Audit Report
|
|
186
|
+
|
|
187
|
+
```markdown
|
|
188
|
+
## CI/CD Audit: [owner]
|
|
189
|
+
|
|
190
|
+
### Spend snapshot
|
|
191
|
+
- Actions billable: ~$X/mo (private repos exhaust the included minutes)
|
|
192
|
+
- Top spenders: [repo — ~$Y, driver], ...
|
|
193
|
+
- Storage: [X GB artifacts / Y GB caches]
|
|
194
|
+
|
|
195
|
+
### Findings (prioritized)
|
|
196
|
+
| # | Repo | Workflow | Anti-pattern | Fix | Impact |
|
|
197
|
+
|---|------|----------|--------------|-----|--------|
|
|
198
|
+
| 1 | repo | build-mobile.yml | macOS on every push | dispatch/tag-only | ~10x |
|
|
199
|
+
|
|
200
|
+
### Already healthy
|
|
201
|
+
- [repos/workflows already using concurrency, gated runners, path filters]
|
|
202
|
+
|
|
203
|
+
### Manual actions (user-only)
|
|
204
|
+
- [ ] Default artifact/log retention → 14 days
|
|
205
|
+
- [ ] Actions spending budget + alerts
|
|
206
|
+
- [ ] Rotate leaked secret(s), if any
|
|
207
|
+
|
|
208
|
+
### Expected outcome
|
|
209
|
+
~$A → ~$B/mo, no loss of test coverage or deploy safety.
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
## Related
|
|
213
|
+
|
|
214
|
+
- `audit-gate-logic` — does the gate actually stop what it claims (bypass / ratchet)
|
|
215
|
+
- `audit-infra-cost` — hosting / DB / egress (not Actions minutes)
|
|
216
|
+
- `test-visual-regression` — screenshot CI artifact retention
|
|
217
|
+
- `audit-security` / `deploy-verify` / `workflow-pr` / `create-hook`
|
|
218
|
+
|