@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,474 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: design-generative-art
|
|
3
|
+
description: >
|
|
4
|
+
Create algorithmic visuals with p5.js, Canvas, or SVG using seeded
|
|
5
|
+
randomness and interactive controls. Use when "generative art", "procedural
|
|
6
|
+
visuals", "flow fields", "particle system", or "art from code". Charts →
|
|
7
|
+
data-visualization.
|
|
8
|
+
license: Apache-2.0
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Algorithmic Art Skill
|
|
12
|
+
|
|
13
|
+
**Degree of freedom: MIXED.** Algorithm and palette `[HIGH freedom]`; existing
|
|
14
|
+
pipeline inventory and seed reproducibility `[LOW freedom — run exactly]`.
|
|
15
|
+
|
|
16
|
+
Create generative, procedural, and mathematical art using code. Transform algorithms into visual experiences.
|
|
17
|
+
|
|
18
|
+
## How to reason
|
|
19
|
+
|
|
20
|
+
1. **Inventory** — existing p5 / canvas / noise utilities
|
|
21
|
+
2. **Seed** — deterministic RNG; same seed = same pixels
|
|
22
|
+
3. **Parameterize** — density, palette, scale, complexity
|
|
23
|
+
4. **Validate** — resolution-independent; reduced-motion on loops
|
|
24
|
+
|
|
25
|
+
## Worked example
|
|
26
|
+
|
|
27
|
+
> **Inventory:** no p5; one `getContext('2d')` chart canvas — do not hijack it.
|
|
28
|
+
> **Seed:** `mulberry32(42)` drives a new `src/components/art/` flow field.
|
|
29
|
+
> **Parameterize:** `density`, `palette` (ocean), `scale`; slider re-renders from the same seed.
|
|
30
|
+
> **Validate:** seed 42 twice matches; `prefers-reduced-motion` stops the RAF loop.
|
|
31
|
+
|
|
32
|
+
## Self-critique before reporting
|
|
33
|
+
|
|
34
|
+
- **No pipeline clash** — did not overwrite an existing canvas/WebGL path
|
|
35
|
+
- **Reproducible** — same seed paints identical output
|
|
36
|
+
- **Controls matter** — each param changes the picture, not just a label
|
|
37
|
+
- **Right owner** — data charts → `data-visualization`; UI illustration → `design-frontend`; WebGL/3D → `enhance-web-web3d`
|
|
38
|
+
|
|
39
|
+
## Check existing first [LOW freedom — run exactly]
|
|
40
|
+
|
|
41
|
+
**Before creating ANY generative art, verify:**
|
|
42
|
+
|
|
43
|
+
1. **Check for existing creative coding setup:**
|
|
44
|
+
```bash
|
|
45
|
+
cat package.json | grep -i "p5\|three\|canvas\|pixi\|paper"
|
|
46
|
+
ls -la src/components/art/ src/components/generative/ 2>/dev/null
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
2. **Check for existing canvas/WebGL usage:**
|
|
50
|
+
```bash
|
|
51
|
+
rg "Canvas|useFrame|getContext.*2d|WebGL" --type tsx -l
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
3. **Check for existing noise/random utilities:**
|
|
55
|
+
```bash
|
|
56
|
+
rg "simplex\|perlin\|noise\|seedrandom" --type ts
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
**Why:** Don't conflict with existing rendering pipelines or duplicate utility code.
|
|
60
|
+
|
|
61
|
+
## Core Principles [HIGH freedom]
|
|
62
|
+
|
|
63
|
+
### 1. Seeded Randomness
|
|
64
|
+
Every piece should be reproducible with a seed:
|
|
65
|
+
```typescript
|
|
66
|
+
// Deterministic random number generator
|
|
67
|
+
function mulberry32(seed: number) {
|
|
68
|
+
return function() {
|
|
69
|
+
let t = seed += 0x6D2B79F5
|
|
70
|
+
t = Math.imul(t ^ t >>> 15, t | 1)
|
|
71
|
+
t ^= t + Math.imul(t ^ t >>> 7, t | 61)
|
|
72
|
+
return ((t ^ t >>> 14) >>> 0) / 4294967296
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// Usage
|
|
77
|
+
const rng = mulberry32(42) // Same seed = same output
|
|
78
|
+
const value = rng() // 0-1 deterministic random
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### 2. Parameterized Generation
|
|
82
|
+
Make art controllable via parameters:
|
|
83
|
+
```typescript
|
|
84
|
+
interface ArtParams {
|
|
85
|
+
seed: number
|
|
86
|
+
density: number // 0-1
|
|
87
|
+
palette: string[]
|
|
88
|
+
scale: number
|
|
89
|
+
speed: number
|
|
90
|
+
complexity: number // 0-1
|
|
91
|
+
}
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### 3. Resolution Independence
|
|
95
|
+
Design for any canvas size:
|
|
96
|
+
```typescript
|
|
97
|
+
// Normalize coordinates to 0-1 range
|
|
98
|
+
const nx = x / width
|
|
99
|
+
const ny = y / height
|
|
100
|
+
// Then scale to canvas
|
|
101
|
+
const px = nx * canvas.width
|
|
102
|
+
const py = ny * canvas.height
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## Techniques
|
|
106
|
+
|
|
107
|
+
### Flow Fields
|
|
108
|
+
```typescript
|
|
109
|
+
function createFlowField(cols: number, rows: number, seed: number) {
|
|
110
|
+
const rng = mulberry32(seed)
|
|
111
|
+
const field: number[][] = []
|
|
112
|
+
|
|
113
|
+
for (let y = 0; y < rows; y++) {
|
|
114
|
+
field[y] = []
|
|
115
|
+
for (let x = 0; x < cols; x++) {
|
|
116
|
+
// Perlin-like noise using layered sine waves
|
|
117
|
+
const angle = Math.sin(x * 0.1) * Math.cos(y * 0.1) * Math.PI * 2
|
|
118
|
+
+ rng() * 0.5
|
|
119
|
+
field[y][x] = angle
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
return field
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
function drawFlowField(ctx: CanvasRenderingContext2D, field: number[][], params: ArtParams) {
|
|
126
|
+
const cellW = ctx.canvas.width / field[0].length
|
|
127
|
+
const cellH = ctx.canvas.height / field.length
|
|
128
|
+
|
|
129
|
+
// Spawn particles and follow flow
|
|
130
|
+
for (let i = 0; i < params.density * 1000; i++) {
|
|
131
|
+
let x = rng() * ctx.canvas.width
|
|
132
|
+
let y = rng() * ctx.canvas.height
|
|
133
|
+
|
|
134
|
+
ctx.beginPath()
|
|
135
|
+
ctx.moveTo(x, y)
|
|
136
|
+
ctx.strokeStyle = params.palette[Math.floor(rng() * params.palette.length)]
|
|
137
|
+
ctx.globalAlpha = 0.3
|
|
138
|
+
|
|
139
|
+
for (let step = 0; step < 100; step++) {
|
|
140
|
+
const col = Math.floor(x / cellW)
|
|
141
|
+
const row = Math.floor(y / cellH)
|
|
142
|
+
|
|
143
|
+
if (col < 0 || col >= field[0].length || row < 0 || row >= field.length) break
|
|
144
|
+
|
|
145
|
+
const angle = field[row][col]
|
|
146
|
+
x += Math.cos(angle) * params.scale
|
|
147
|
+
y += Math.sin(angle) * params.scale
|
|
148
|
+
ctx.lineTo(x, y)
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
ctx.stroke()
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
### Recursive Subdivision
|
|
157
|
+
```typescript
|
|
158
|
+
function subdivide(
|
|
159
|
+
ctx: CanvasRenderingContext2D,
|
|
160
|
+
x: number, y: number, w: number, h: number,
|
|
161
|
+
depth: number, maxDepth: number, rng: () => number,
|
|
162
|
+
palette: string[]
|
|
163
|
+
) {
|
|
164
|
+
if (depth >= maxDepth || rng() < 0.15) {
|
|
165
|
+
// Draw leaf
|
|
166
|
+
ctx.fillStyle = palette[Math.floor(rng() * palette.length)]
|
|
167
|
+
ctx.globalAlpha = 0.6 + rng() * 0.4
|
|
168
|
+
ctx.fillRect(x + 1, y + 1, w - 2, h - 2)
|
|
169
|
+
return
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
// Random split direction and position
|
|
173
|
+
const horizontal = rng() > 0.5
|
|
174
|
+
const split = 0.3 + rng() * 0.4 // 30-70% split
|
|
175
|
+
|
|
176
|
+
if (horizontal) {
|
|
177
|
+
const splitY = y + h * split
|
|
178
|
+
subdivide(ctx, x, y, w, splitY - y, depth + 1, maxDepth, rng, palette)
|
|
179
|
+
subdivide(ctx, x, splitY, w, y + h - splitY, depth + 1, maxDepth, rng, palette)
|
|
180
|
+
} else {
|
|
181
|
+
const splitX = x + w * split
|
|
182
|
+
subdivide(ctx, x, y, splitX - x, h, depth + 1, maxDepth, rng, palette)
|
|
183
|
+
subdivide(ctx, splitX, y, x + w - splitX, h, depth + 1, maxDepth, rng, palette)
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
### Circle Packing
|
|
189
|
+
```typescript
|
|
190
|
+
interface Circle {
|
|
191
|
+
x: number; y: number; r: number; color: string
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
function circlePacking(
|
|
195
|
+
width: number, height: number,
|
|
196
|
+
maxCircles: number, maxRadius: number,
|
|
197
|
+
rng: () => number, palette: string[]
|
|
198
|
+
): Circle[] {
|
|
199
|
+
const circles: Circle[] = []
|
|
200
|
+
let attempts = 0
|
|
201
|
+
const maxAttempts = maxCircles * 50
|
|
202
|
+
|
|
203
|
+
while (circles.length < maxCircles && attempts < maxAttempts) {
|
|
204
|
+
attempts++
|
|
205
|
+
const candidate = {
|
|
206
|
+
x: rng() * width,
|
|
207
|
+
y: rng() * height,
|
|
208
|
+
r: 2,
|
|
209
|
+
color: palette[Math.floor(rng() * palette.length)]
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
// Grow until collision
|
|
213
|
+
let valid = true
|
|
214
|
+
while (valid && candidate.r < maxRadius) {
|
|
215
|
+
candidate.r += 1
|
|
216
|
+
for (const other of circles) {
|
|
217
|
+
const dist = Math.hypot(candidate.x - other.x, candidate.y - other.y)
|
|
218
|
+
if (dist < candidate.r + other.r + 2) {
|
|
219
|
+
candidate.r -= 1
|
|
220
|
+
valid = false
|
|
221
|
+
break
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
// Check bounds
|
|
225
|
+
if (candidate.x - candidate.r < 0 || candidate.x + candidate.r > width ||
|
|
226
|
+
candidate.y - candidate.r < 0 || candidate.y + candidate.r > height) {
|
|
227
|
+
candidate.r -= 1
|
|
228
|
+
valid = false
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
if (candidate.r > 2) circles.push(candidate)
|
|
233
|
+
}
|
|
234
|
+
return circles
|
|
235
|
+
}
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
### L-Systems (Fractal Trees/Plants)
|
|
239
|
+
```typescript
|
|
240
|
+
interface LSystem {
|
|
241
|
+
axiom: string
|
|
242
|
+
rules: Record<string, string>
|
|
243
|
+
angle: number
|
|
244
|
+
length: number
|
|
245
|
+
iterations: number
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
const fractalTree: LSystem = {
|
|
249
|
+
axiom: 'F',
|
|
250
|
+
rules: { 'F': 'FF+[+F-F-F]-[-F+F+F]' },
|
|
251
|
+
angle: 25,
|
|
252
|
+
length: 4,
|
|
253
|
+
iterations: 4,
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
function generateLSystem(system: LSystem): string {
|
|
257
|
+
let current = system.axiom
|
|
258
|
+
for (let i = 0; i < system.iterations; i++) {
|
|
259
|
+
current = current.split('').map(c => system.rules[c] || c).join('')
|
|
260
|
+
}
|
|
261
|
+
return current
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
function drawLSystem(ctx: CanvasRenderingContext2D, system: LSystem, startX: number, startY: number) {
|
|
265
|
+
const instructions = generateLSystem(system)
|
|
266
|
+
const stack: { x: number; y: number; angle: number }[] = []
|
|
267
|
+
let x = startX, y = startY, angle = -90 // Start pointing up
|
|
268
|
+
|
|
269
|
+
ctx.beginPath()
|
|
270
|
+
ctx.moveTo(x, y)
|
|
271
|
+
|
|
272
|
+
for (const char of instructions) {
|
|
273
|
+
switch (char) {
|
|
274
|
+
case 'F':
|
|
275
|
+
const nx = x + Math.cos(angle * Math.PI / 180) * system.length
|
|
276
|
+
const ny = y + Math.sin(angle * Math.PI / 180) * system.length
|
|
277
|
+
ctx.lineTo(nx, ny)
|
|
278
|
+
x = nx; y = ny
|
|
279
|
+
break
|
|
280
|
+
case '+': angle += system.angle; break
|
|
281
|
+
case '-': angle -= system.angle; break
|
|
282
|
+
case '[': stack.push({ x, y, angle }); break
|
|
283
|
+
case ']':
|
|
284
|
+
const state = stack.pop()!
|
|
285
|
+
x = state.x; y = state.y; angle = state.angle
|
|
286
|
+
ctx.moveTo(x, y)
|
|
287
|
+
break
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
ctx.stroke()
|
|
291
|
+
}
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
## React Component Pattern
|
|
295
|
+
|
|
296
|
+
```tsx
|
|
297
|
+
'use client'
|
|
298
|
+
import { useEffect, useRef, useState, useCallback } from 'react'
|
|
299
|
+
|
|
300
|
+
interface GenerativeArtProps {
|
|
301
|
+
seed?: number
|
|
302
|
+
width?: number
|
|
303
|
+
height?: number
|
|
304
|
+
palette?: string[]
|
|
305
|
+
className?: string
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
export function GenerativeArt({
|
|
309
|
+
seed = Date.now(),
|
|
310
|
+
width = 800,
|
|
311
|
+
height = 600,
|
|
312
|
+
palette = ['#264653', '#2a9d8f', '#e9c46a', '#f4a261', '#e76f51'],
|
|
313
|
+
className,
|
|
314
|
+
}: GenerativeArtProps) {
|
|
315
|
+
const canvasRef = useRef<HTMLCanvasElement>(null)
|
|
316
|
+
const [currentSeed, setCurrentSeed] = useState(seed)
|
|
317
|
+
|
|
318
|
+
const render = useCallback(() => {
|
|
319
|
+
const canvas = canvasRef.current
|
|
320
|
+
if (!canvas) return
|
|
321
|
+
const ctx = canvas.getContext('2d')!
|
|
322
|
+
const rng = mulberry32(currentSeed)
|
|
323
|
+
|
|
324
|
+
// Clear
|
|
325
|
+
ctx.fillStyle = '#1a1a2e'
|
|
326
|
+
ctx.fillRect(0, 0, width, height)
|
|
327
|
+
|
|
328
|
+
// Your generative algorithm here
|
|
329
|
+
drawFlowField(ctx, createFlowField(40, 30, currentSeed), {
|
|
330
|
+
seed: currentSeed,
|
|
331
|
+
density: 0.8,
|
|
332
|
+
palette,
|
|
333
|
+
scale: 2,
|
|
334
|
+
speed: 1,
|
|
335
|
+
complexity: 0.7,
|
|
336
|
+
})
|
|
337
|
+
}, [currentSeed, width, height, palette])
|
|
338
|
+
|
|
339
|
+
useEffect(() => { render() }, [render])
|
|
340
|
+
|
|
341
|
+
return (
|
|
342
|
+
<div className={className}>
|
|
343
|
+
<canvas
|
|
344
|
+
ref={canvasRef}
|
|
345
|
+
width={width}
|
|
346
|
+
height={height}
|
|
347
|
+
className="rounded-lg"
|
|
348
|
+
style={{ maxWidth: '100%', height: 'auto' }}
|
|
349
|
+
/>
|
|
350
|
+
<div className="flex gap-2 mt-4">
|
|
351
|
+
<button
|
|
352
|
+
onClick={() => setCurrentSeed(Date.now())}
|
|
353
|
+
className="px-4 py-2 bg-primary text-primary-foreground rounded-lg"
|
|
354
|
+
>
|
|
355
|
+
Regenerate
|
|
356
|
+
</button>
|
|
357
|
+
<input
|
|
358
|
+
type="number"
|
|
359
|
+
value={currentSeed}
|
|
360
|
+
onChange={(e) => setCurrentSeed(Number(e.target.value))}
|
|
361
|
+
className="px-3 py-2 border rounded-lg w-32"
|
|
362
|
+
aria-label="Seed value"
|
|
363
|
+
/>
|
|
364
|
+
</div>
|
|
365
|
+
</div>
|
|
366
|
+
)
|
|
367
|
+
}
|
|
368
|
+
```
|
|
369
|
+
|
|
370
|
+
## Color Palettes
|
|
371
|
+
|
|
372
|
+
```typescript
|
|
373
|
+
// Curated palettes for generative art
|
|
374
|
+
const PALETTES = {
|
|
375
|
+
// Warm
|
|
376
|
+
sunset: ['#ff6b6b', '#feca57', '#ff9ff3', '#54a0ff', '#5f27cd'],
|
|
377
|
+
autumn: ['#d35400', '#e67e22', '#f39c12', '#2c3e50', '#ecf0f1'],
|
|
378
|
+
|
|
379
|
+
// Cool
|
|
380
|
+
ocean: ['#0c2461', '#1e3799', '#4a69bd', '#6a89cc', '#82ccdd'],
|
|
381
|
+
forest: ['#1b4332', '#2d6a4f', '#40916c', '#52b788', '#74c69d'],
|
|
382
|
+
|
|
383
|
+
// Monochrome
|
|
384
|
+
ink: ['#000000', '#1a1a1a', '#333333', '#4d4d4d', '#666666'],
|
|
385
|
+
paper: ['#f5f0e8', '#ede4d4', '#e5d9c0', '#ddc9a3', '#d4ba87'],
|
|
386
|
+
|
|
387
|
+
// Vibrant
|
|
388
|
+
neon: ['#ff00ff', '#00ffff', '#ff0066', '#66ff00', '#ffff00'],
|
|
389
|
+
candy: ['#ff6f91', '#ff9671', '#ffc75f', '#f9f871', '#d4fc79'],
|
|
390
|
+
|
|
391
|
+
// Japanese-inspired
|
|
392
|
+
wabi: ['#2c1810', '#5c3a2e', '#b5651d', '#daa06d', '#f5deb3'],
|
|
393
|
+
sakura: ['#ffb7c5', '#ff69b4', '#c71585', '#8b008b', '#4a0028'],
|
|
394
|
+
}
|
|
395
|
+
```
|
|
396
|
+
|
|
397
|
+
## Animation Loop
|
|
398
|
+
|
|
399
|
+
```typescript
|
|
400
|
+
function animatedArt(canvas: HTMLCanvasElement, params: ArtParams) {
|
|
401
|
+
const ctx = canvas.getContext('2d')!
|
|
402
|
+
let frame = 0
|
|
403
|
+
let animationId: number
|
|
404
|
+
|
|
405
|
+
function loop() {
|
|
406
|
+
frame++
|
|
407
|
+
const t = frame * params.speed * 0.01
|
|
408
|
+
|
|
409
|
+
// Semi-transparent overlay for trails
|
|
410
|
+
ctx.fillStyle = 'rgba(0, 0, 0, 0.02)'
|
|
411
|
+
ctx.fillRect(0, 0, canvas.width, canvas.height)
|
|
412
|
+
|
|
413
|
+
// Animated elements
|
|
414
|
+
for (let i = 0; i < 50; i++) {
|
|
415
|
+
const x = canvas.width / 2 + Math.cos(t + i * 0.5) * 200
|
|
416
|
+
const y = canvas.height / 2 + Math.sin(t * 0.7 + i * 0.3) * 200
|
|
417
|
+
const r = 2 + Math.sin(t + i) * 1
|
|
418
|
+
|
|
419
|
+
ctx.beginPath()
|
|
420
|
+
ctx.arc(x, y, r, 0, Math.PI * 2)
|
|
421
|
+
ctx.fillStyle = params.palette[i % params.palette.length]
|
|
422
|
+
ctx.globalAlpha = 0.8
|
|
423
|
+
ctx.fill()
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
animationId = requestAnimationFrame(loop)
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
loop()
|
|
430
|
+
return () => cancelAnimationFrame(animationId)
|
|
431
|
+
}
|
|
432
|
+
```
|
|
433
|
+
|
|
434
|
+
## Export & Sharing
|
|
435
|
+
|
|
436
|
+
```typescript
|
|
437
|
+
// Export canvas as PNG
|
|
438
|
+
function exportPNG(canvas: HTMLCanvasElement, filename: string) {
|
|
439
|
+
const link = document.createElement('a')
|
|
440
|
+
link.download = `${filename}-${Date.now()}.png`
|
|
441
|
+
link.href = canvas.toDataURL('image/png')
|
|
442
|
+
link.click()
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
// Export as SVG (for vector output)
|
|
446
|
+
function exportSVG(svgElement: SVGSVGElement, filename: string) {
|
|
447
|
+
const serializer = new XMLSerializer()
|
|
448
|
+
const svgString = serializer.serializeToString(svgElement)
|
|
449
|
+
const blob = new Blob([svgString], { type: 'image/svg+xml' })
|
|
450
|
+
const link = document.createElement('a')
|
|
451
|
+
link.download = `${filename}-${Date.now()}.svg`
|
|
452
|
+
link.href = URL.createObjectURL(blob)
|
|
453
|
+
link.click()
|
|
454
|
+
}
|
|
455
|
+
```
|
|
456
|
+
|
|
457
|
+
## Related Skills
|
|
458
|
+
|
|
459
|
+
- `enhance-web-web3d` — WebGL, Three.js, shaders for 3D generative art
|
|
460
|
+
- `design-motion` — Animation patterns for interactive pieces
|
|
461
|
+
- `design-canvas` — Print-quality visual design philosophy
|
|
462
|
+
- `data-visualization` — Data-driven generative compositions
|
|
463
|
+
|
|
464
|
+
## Validation [LOW freedom — do not skip]
|
|
465
|
+
|
|
466
|
+
After creating algorithmic art:
|
|
467
|
+
|
|
468
|
+
1. **Reproducibility** → Same seed produces identical output
|
|
469
|
+
2. **Performance** → 60fps for animated pieces
|
|
470
|
+
3. **Resolution** → Looks good at target export size
|
|
471
|
+
4. **Palette** → Colors work together harmoniously
|
|
472
|
+
5. **Parameters** → Controls produce meaningful visual changes
|
|
473
|
+
6. **Export** → PNG/SVG export works correctly
|
|
474
|
+
7. **Accessibility** → Animated art respects `prefers-reduced-motion`
|