cokit-cli 1.0.4 → 1.0.5
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/package.json +1 -1
- package/templates/repo/.github/instructions/ck-backend.instructions.md +28 -15
- package/templates/repo/.github/instructions/ck-development.instructions.md +15 -0
- package/templates/repo/.github/instructions/ck-frontend-design-pro.instructions.md +58 -0
- package/templates/repo/.github/instructions/ck-frontend.instructions.md +20 -7
- package/templates/repo/.github/instructions/ck-google-adk-python.instructions.md +242 -0
- package/templates/repo/.github/instructions/ck-research.instructions.md +167 -0
- package/templates/repo/.github/instructions/ck-testing.instructions.md +18 -13
- package/templates/repo/.github/prompts/ck-ask.prompt.md +57 -0
- package/templates/repo/.github/prompts/ck-bootstrap-auto-fast.prompt.md +108 -0
- package/templates/repo/.github/prompts/ck-bootstrap-auto-parallel.prompt.md +66 -0
- package/templates/repo/.github/prompts/ck-bootstrap-auto.prompt.md +114 -0
- package/templates/repo/.github/prompts/ck-bootstrap.prompt.md +136 -0
- package/templates/repo/.github/prompts/ck-brainstorm.prompt.md +68 -0
- package/templates/repo/.github/prompts/ck-ck-help.prompt.md +114 -0
- package/templates/repo/.github/prompts/ck-code-auto.prompt.md +171 -0
- package/templates/repo/.github/prompts/ck-code-no-test.prompt.md +159 -0
- package/templates/repo/.github/prompts/ck-code-parallel.prompt.md +56 -0
- package/templates/repo/.github/prompts/ck-code.prompt.md +167 -18
- package/templates/repo/.github/prompts/ck-coding-level.prompt.md +54 -0
- package/templates/repo/.github/prompts/ck-cook-auto-fast.prompt.md +26 -0
- package/templates/repo/.github/prompts/ck-cook-auto-parallel.prompt.md +49 -0
- package/templates/repo/.github/prompts/ck-cook-auto.prompt.md +15 -0
- package/templates/repo/.github/prompts/ck-cook.prompt.md +96 -0
- package/templates/repo/.github/prompts/ck-debug.prompt.md +14 -0
- package/templates/repo/.github/prompts/ck-design-3d.prompt.md +84 -0
- package/templates/repo/.github/prompts/ck-design-describe.prompt.md +24 -0
- package/templates/repo/.github/prompts/ck-design-fast.prompt.md +32 -0
- package/templates/repo/.github/prompts/ck-design-good.prompt.md +36 -0
- package/templates/repo/.github/prompts/ck-design-screenshot.prompt.md +35 -0
- package/templates/repo/.github/prompts/ck-design-video.prompt.md +35 -0
- package/templates/repo/.github/prompts/ck-docs-init.prompt.md +27 -0
- package/templates/repo/.github/prompts/ck-docs-summarize.prompt.md +23 -0
- package/templates/repo/.github/prompts/ck-docs-update.prompt.md +36 -0
- package/templates/repo/.github/prompts/ck-fix-ci.prompt.md +18 -0
- package/templates/repo/.github/prompts/ck-fix-fast.prompt.md +18 -0
- package/templates/repo/.github/prompts/ck-fix-hard.prompt.md +36 -0
- package/templates/repo/.github/prompts/ck-fix-logs.prompt.md +27 -0
- package/templates/repo/.github/prompts/ck-fix-parallel.prompt.md +54 -0
- package/templates/repo/.github/prompts/ck-fix-test.prompt.md +19 -0
- package/templates/repo/.github/prompts/ck-fix-types.prompt.md +11 -0
- package/templates/repo/.github/prompts/ck-fix-ui.prompt.md +49 -0
- package/templates/repo/.github/prompts/ck-fix.prompt.md +36 -16
- package/templates/repo/.github/prompts/ck-git-cm.prompt.md +8 -0
- package/templates/repo/.github/prompts/ck-git-cp.prompt.md +7 -0
- package/templates/repo/.github/prompts/ck-git-merge.prompt.md +41 -0
- package/templates/repo/.github/prompts/ck-git-pr.prompt.md +49 -0
- package/templates/repo/.github/prompts/ck-kanban.prompt.md +77 -0
- package/templates/repo/.github/prompts/ck-plan-archive.prompt.md +58 -0
- package/templates/repo/.github/prompts/ck-plan-ci.prompt.md +34 -0
- package/templates/repo/.github/prompts/ck-plan-cro.prompt.md +66 -0
- package/templates/repo/.github/prompts/ck-plan-fast.prompt.md +67 -0
- package/templates/repo/.github/prompts/ck-plan-hard.prompt.md +89 -0
- package/templates/repo/.github/prompts/ck-plan-parallel.prompt.md +126 -0
- package/templates/repo/.github/prompts/ck-plan-two.prompt.md +43 -0
- package/templates/repo/.github/prompts/ck-plan-validate.prompt.md +118 -0
- package/templates/repo/.github/prompts/ck-plan.prompt.md +29 -25
- package/templates/repo/.github/prompts/ck-preview.prompt.md +65 -0
- package/templates/repo/.github/prompts/ck-review-codebase.prompt.md +44 -0
- package/templates/repo/.github/prompts/ck-scout-ext.prompt.md +35 -0
- package/templates/repo/.github/prompts/ck-scout.prompt.md +25 -0
- package/templates/repo/.github/prompts/ck-skill-add.prompt.md +36 -0
- package/templates/repo/.github/prompts/ck-skill-create.prompt.md +29 -0
- package/templates/repo/.github/prompts/ck-skill-fix-logs.prompt.md +22 -0
- package/templates/repo/.github/prompts/ck-skill-optimize-auto.prompt.md +25 -0
- package/templates/repo/.github/prompts/ck-skill-optimize.prompt.md +34 -0
- package/templates/repo/.github/prompts/ck-skill-plan.prompt.md +46 -0
- package/templates/repo/.github/prompts/ck-test-ui.prompt.md +92 -0
- package/templates/repo/.github/prompts/ck-test.prompt.md +6 -19
- package/templates/repo/.github/prompts/ck-use-mcp.prompt.md +27 -0
- package/templates/repo/.github/prompts/ck-watzup.prompt.md +11 -0
- package/templates/repo/.github/prompts/ck-worktree.prompt.md +127 -0
- package/templates/repo/.github/skills/ck-ai-artist/SKILL.md +73 -0
- package/templates/repo/.github/skills/ck-ai-artist/references/advanced-techniques.md +184 -0
- package/templates/repo/.github/skills/ck-ai-artist/references/domain-code.md +66 -0
- package/templates/repo/.github/skills/ck-ai-artist/references/domain-data.md +72 -0
- package/templates/repo/.github/skills/ck-ai-artist/references/domain-marketing.md +66 -0
- package/templates/repo/.github/skills/ck-ai-artist/references/domain-patterns.md +33 -0
- package/templates/repo/.github/skills/ck-ai-artist/references/domain-writing.md +68 -0
- package/templates/repo/.github/skills/ck-ai-artist/references/image-prompting.md +141 -0
- package/templates/repo/.github/skills/ck-ai-artist/references/llm-prompting.md +165 -0
- package/templates/repo/.github/skills/ck-ai-artist/references/nano-banana.md +59 -0
- package/templates/repo/.github/skills/ck-ai-artist/references/reasoning-techniques.md +201 -0
- package/templates/repo/.github/skills/ck-backend-development/SKILL.md +93 -0
- package/templates/repo/.github/skills/ck-backend-development/references/backend-api-design.md +495 -0
- package/templates/repo/.github/skills/ck-backend-development/references/backend-architecture.md +454 -0
- package/templates/repo/.github/skills/ck-backend-development/references/backend-authentication.md +338 -0
- package/templates/repo/.github/skills/ck-backend-development/references/backend-code-quality.md +659 -0
- package/templates/repo/.github/skills/ck-backend-development/references/backend-debugging.md +904 -0
- package/templates/repo/.github/skills/ck-backend-development/references/backend-devops.md +494 -0
- package/templates/repo/.github/skills/ck-backend-development/references/backend-mindset.md +387 -0
- package/templates/repo/.github/skills/ck-backend-development/references/backend-performance.md +397 -0
- package/templates/repo/.github/skills/ck-backend-development/references/backend-security.md +290 -0
- package/templates/repo/.github/skills/ck-backend-development/references/backend-technologies.md +256 -0
- package/templates/repo/.github/skills/ck-backend-development/references/backend-testing.md +429 -0
- package/templates/repo/.github/skills/ck-better-auth/SKILL.md +202 -0
- package/templates/repo/.github/skills/ck-better-auth/references/advanced-features.md +553 -0
- package/templates/repo/.github/skills/ck-better-auth/references/database-integration.md +577 -0
- package/templates/repo/.github/skills/ck-better-auth/references/email-password-auth.md +416 -0
- package/templates/repo/.github/skills/ck-better-auth/references/oauth-providers.md +430 -0
- package/templates/repo/.github/skills/ck-better-auth/scripts/.coverage +0 -0
- package/templates/repo/.github/skills/ck-better-auth/scripts/better_auth_init.py +521 -0
- package/templates/repo/.github/skills/ck-better-auth/scripts/requirements.txt +15 -0
- package/templates/repo/.github/skills/ck-better-auth/scripts/tests/.coverage +0 -0
- package/templates/repo/.github/skills/ck-better-auth/scripts/tests/test_better_auth_init.py +421 -0
- package/templates/repo/.github/skills/ck-chrome-devtools/SKILL.md +470 -0
- package/templates/repo/.github/skills/ck-chrome-devtools/references/cdp-domains.md +694 -0
- package/templates/repo/.github/skills/ck-chrome-devtools/references/performance-guide.md +940 -0
- package/templates/repo/.github/skills/ck-chrome-devtools/references/puppeteer-reference.md +953 -0
- package/templates/repo/.github/skills/ck-chrome-devtools/scripts/README.md +272 -0
- package/templates/repo/.github/skills/ck-chrome-devtools/scripts/__tests__/selector.test.js +210 -0
- package/templates/repo/.github/skills/ck-chrome-devtools/scripts/aria-snapshot.js +362 -0
- package/templates/repo/.github/skills/ck-chrome-devtools/scripts/click.js +83 -0
- package/templates/repo/.github/skills/ck-chrome-devtools/scripts/console.js +79 -0
- package/templates/repo/.github/skills/ck-chrome-devtools/scripts/evaluate.js +53 -0
- package/templates/repo/.github/skills/ck-chrome-devtools/scripts/fill.js +76 -0
- package/templates/repo/.github/skills/ck-chrome-devtools/scripts/inject-auth.js +229 -0
- package/templates/repo/.github/skills/ck-chrome-devtools/scripts/install-deps.sh +181 -0
- package/templates/repo/.github/skills/ck-chrome-devtools/scripts/install.sh +83 -0
- package/templates/repo/.github/skills/ck-chrome-devtools/scripts/lib/browser.js +318 -0
- package/templates/repo/.github/skills/ck-chrome-devtools/scripts/lib/selector.js +178 -0
- package/templates/repo/.github/skills/ck-chrome-devtools/scripts/navigate.js +54 -0
- package/templates/repo/.github/skills/ck-chrome-devtools/scripts/network.js +106 -0
- package/templates/repo/.github/skills/ck-chrome-devtools/scripts/package-lock.json +1589 -0
- package/templates/repo/.github/skills/ck-chrome-devtools/scripts/package.json +16 -0
- package/templates/repo/.github/skills/ck-chrome-devtools/scripts/performance.js +149 -0
- package/templates/repo/.github/skills/ck-chrome-devtools/scripts/screenshot.js +198 -0
- package/templates/repo/.github/skills/ck-chrome-devtools/scripts/select-ref.js +131 -0
- package/templates/repo/.github/skills/ck-chrome-devtools/scripts/snapshot.js +135 -0
- package/templates/repo/.github/skills/ck-code-review/SKILL.md +130 -33
- package/templates/repo/.github/skills/ck-code-review/references/code-review-reception.md +209 -0
- package/templates/repo/.github/skills/ck-code-review/references/requesting-code-review.md +105 -0
- package/templates/repo/.github/skills/ck-code-review/references/verification-before-completion.md +139 -0
- package/templates/repo/.github/skills/ck-databases/SKILL.md +231 -0
- package/templates/repo/.github/skills/ck-databases/references/mongodb-aggregation.md +447 -0
- package/templates/repo/.github/skills/ck-databases/references/mongodb-atlas.md +465 -0
- package/templates/repo/.github/skills/ck-databases/references/mongodb-crud.md +408 -0
- package/templates/repo/.github/skills/ck-databases/references/mongodb-indexing.md +442 -0
- package/templates/repo/.github/skills/ck-databases/references/postgresql-administration.md +594 -0
- package/templates/repo/.github/skills/ck-databases/references/postgresql-performance.md +527 -0
- package/templates/repo/.github/skills/ck-databases/references/postgresql-psql-cli.md +467 -0
- package/templates/repo/.github/skills/ck-databases/references/postgresql-queries.md +475 -0
- package/templates/repo/.github/skills/ck-databases/scripts/.coverage +0 -0
- package/templates/repo/.github/skills/ck-databases/scripts/db_backup.py +502 -0
- package/templates/repo/.github/skills/ck-databases/scripts/db_migrate.py +425 -0
- package/templates/repo/.github/skills/ck-databases/scripts/db_performance_check.py +456 -0
- package/templates/repo/.github/skills/ck-databases/scripts/requirements.txt +20 -0
- package/templates/repo/.github/skills/ck-databases/scripts/tests/coverage-db.json +1 -0
- package/templates/repo/.github/skills/ck-databases/scripts/tests/requirements.txt +4 -0
- package/templates/repo/.github/skills/ck-databases/scripts/tests/test_db_backup.py +340 -0
- package/templates/repo/.github/skills/ck-databases/scripts/tests/test_db_migrate.py +277 -0
- package/templates/repo/.github/skills/ck-databases/scripts/tests/test_db_performance_check.py +370 -0
- package/templates/repo/.github/skills/ck-debugging/SKILL.md +70 -22
- package/templates/repo/.github/skills/ck-debugging/references/defense-in-depth.md +124 -0
- package/templates/repo/.github/skills/ck-debugging/references/root-cause-tracing.md +122 -0
- package/templates/repo/.github/skills/ck-debugging/references/systematic-debugging.md +102 -0
- package/templates/repo/.github/skills/ck-debugging/references/verification.md +123 -0
- package/templates/repo/.github/skills/ck-debugging/scripts/find-polluter.sh +63 -0
- package/templates/repo/.github/skills/ck-debugging/scripts/find-polluter.test.md +102 -0
- package/templates/repo/.github/skills/ck-devops/.env.example +76 -0
- package/templates/repo/.github/skills/ck-devops/SKILL.md +283 -0
- package/templates/repo/.github/skills/ck-devops/references/browser-rendering.md +305 -0
- package/templates/repo/.github/skills/ck-devops/references/cloudflare-d1-kv.md +123 -0
- package/templates/repo/.github/skills/ck-devops/references/cloudflare-platform.md +271 -0
- package/templates/repo/.github/skills/ck-devops/references/cloudflare-r2-storage.md +280 -0
- package/templates/repo/.github/skills/ck-devops/references/cloudflare-workers-advanced.md +312 -0
- package/templates/repo/.github/skills/ck-devops/references/cloudflare-workers-apis.md +309 -0
- package/templates/repo/.github/skills/ck-devops/references/cloudflare-workers-basics.md +418 -0
- package/templates/repo/.github/skills/ck-devops/references/docker-basics.md +297 -0
- package/templates/repo/.github/skills/ck-devops/references/docker-compose.md +292 -0
- package/templates/repo/.github/skills/ck-devops/references/gcloud-platform.md +297 -0
- package/templates/repo/.github/skills/ck-devops/references/gcloud-services.md +304 -0
- package/templates/repo/.github/skills/ck-devops/scripts/cloudflare_deploy.py +269 -0
- package/templates/repo/.github/skills/ck-devops/scripts/docker_optimize.py +331 -0
- package/templates/repo/.github/skills/ck-devops/scripts/requirements.txt +20 -0
- package/templates/repo/.github/skills/ck-devops/scripts/tests/requirements.txt +3 -0
- package/templates/repo/.github/skills/ck-devops/scripts/tests/test_cloudflare_deploy.py +285 -0
- package/templates/repo/.github/skills/ck-devops/scripts/tests/test_docker_optimize.py +436 -0
- package/templates/repo/.github/skills/ck-docs-seeker/.env.example +15 -0
- package/templates/repo/.github/skills/ck-docs-seeker/SKILL.md +96 -0
- package/templates/repo/.github/skills/ck-docs-seeker/package.json +25 -0
- package/templates/repo/.github/skills/ck-docs-seeker/references/advanced.md +79 -0
- package/templates/repo/.github/skills/ck-docs-seeker/references/context7-patterns.md +68 -0
- package/templates/repo/.github/skills/ck-docs-seeker/references/errors.md +68 -0
- package/templates/repo/.github/skills/ck-docs-seeker/references/search-patterns.md +93 -0
- package/templates/repo/.github/skills/ck-docs-seeker/references/source-evaluation.md +77 -0
- package/templates/repo/.github/skills/ck-docs-seeker/scripts/analyze-llms-txt.js +211 -0
- package/templates/repo/.github/skills/ck-docs-seeker/scripts/detect-topic.js +172 -0
- package/templates/repo/.github/skills/ck-docs-seeker/scripts/fetch-docs.js +213 -0
- package/templates/repo/.github/skills/ck-docs-seeker/scripts/tests/run-tests.js +72 -0
- package/templates/repo/.github/skills/ck-docs-seeker/scripts/tests/test-analyze-llms.js +119 -0
- package/templates/repo/.github/skills/ck-docs-seeker/scripts/tests/test-detect-topic.js +112 -0
- package/templates/repo/.github/skills/ck-docs-seeker/scripts/tests/test-fetch-docs.js +84 -0
- package/templates/repo/.github/skills/ck-docs-seeker/scripts/utils/env-loader.js +94 -0
- package/templates/repo/.github/skills/ck-docs-seeker/workflows/library-search.md +87 -0
- package/templates/repo/.github/skills/ck-docs-seeker/workflows/repo-analysis.md +91 -0
- package/templates/repo/.github/skills/ck-docs-seeker/workflows/topic-search.md +77 -0
- package/templates/repo/.github/skills/ck-frontend-design/SKILL.md +79 -0
- package/templates/repo/.github/skills/ck-frontend-design/references/analysis-best-practices.md +80 -0
- package/templates/repo/.github/skills/ck-frontend-design/references/analysis-prompts.md +141 -0
- package/templates/repo/.github/skills/ck-frontend-design/references/analysis-techniques.md +118 -0
- package/templates/repo/.github/skills/ck-frontend-design/references/animejs.md +396 -0
- package/templates/repo/.github/skills/ck-frontend-design/references/design-extraction-overview.md +71 -0
- package/templates/repo/.github/skills/ck-frontend-design/references/extraction-best-practices.md +141 -0
- package/templates/repo/.github/skills/ck-frontend-design/references/extraction-output-templates.md +162 -0
- package/templates/repo/.github/skills/ck-frontend-design/references/extraction-prompts.md +127 -0
- package/templates/repo/.github/skills/ck-frontend-design/references/technical-accessibility.md +119 -0
- package/templates/repo/.github/skills/ck-frontend-design/references/technical-best-practices.md +97 -0
- package/templates/repo/.github/skills/ck-frontend-design/references/technical-optimization.md +44 -0
- package/templates/repo/.github/skills/ck-frontend-design/references/technical-overview.md +90 -0
- package/templates/repo/.github/skills/ck-frontend-design/references/technical-workflows.md +150 -0
- package/templates/repo/.github/skills/ck-frontend-design/references/visual-analysis-overview.md +95 -0
- package/templates/repo/.github/skills/ck-frontend-development/SKILL.md +399 -0
- package/templates/repo/.github/skills/ck-frontend-development/resources/common-patterns.md +331 -0
- package/templates/repo/.github/skills/ck-frontend-development/resources/complete-examples.md +872 -0
- package/templates/repo/.github/skills/ck-frontend-development/resources/component-patterns.md +502 -0
- package/templates/repo/.github/skills/ck-frontend-development/resources/data-fetching.md +767 -0
- package/templates/repo/.github/skills/ck-frontend-development/resources/file-organization.md +502 -0
- package/templates/repo/.github/skills/ck-frontend-development/resources/loading-and-error-states.md +501 -0
- package/templates/repo/.github/skills/ck-frontend-development/resources/performance.md +406 -0
- package/templates/repo/.github/skills/ck-frontend-development/resources/routing-guide.md +364 -0
- package/templates/repo/.github/skills/ck-frontend-development/resources/styling-guide.md +428 -0
- package/templates/repo/.github/skills/ck-frontend-development/resources/typescript-standards.md +418 -0
- package/templates/repo/.github/skills/ck-markdown-novel-viewer/SKILL.md +190 -0
- package/templates/repo/.github/skills/ck-markdown-novel-viewer/assets/directory-browser.css +215 -0
- package/templates/repo/.github/skills/ck-markdown-novel-viewer/assets/favicon.png +0 -0
- package/templates/repo/.github/skills/ck-markdown-novel-viewer/assets/novel-theme.css +818 -0
- package/templates/repo/.github/skills/ck-markdown-novel-viewer/assets/reader.js +262 -0
- package/templates/repo/.github/skills/ck-markdown-novel-viewer/assets/template.html +80 -0
- package/templates/repo/.github/skills/ck-markdown-novel-viewer/package.json +15 -0
- package/templates/repo/.github/skills/ck-markdown-novel-viewer/scripts/lib/http-server.cjs +434 -0
- package/templates/repo/.github/skills/ck-markdown-novel-viewer/scripts/lib/markdown-renderer.cjs +272 -0
- package/templates/repo/.github/skills/ck-markdown-novel-viewer/scripts/lib/plan-navigator.cjs +509 -0
- package/templates/repo/.github/skills/ck-markdown-novel-viewer/scripts/lib/port-finder.cjs +48 -0
- package/templates/repo/.github/skills/ck-markdown-novel-viewer/scripts/lib/process-mgr.cjs +150 -0
- package/templates/repo/.github/skills/ck-markdown-novel-viewer/scripts/server.cjs +411 -0
- package/templates/repo/.github/skills/ck-markdown-novel-viewer/scripts/tests/server.test.cjs +283 -0
- package/templates/repo/.github/skills/ck-markdown-novel-viewer/tests/dashboard-assets.test.cjs +340 -0
- package/templates/repo/.github/skills/ck-markdown-novel-viewer/tests/dashboard-renderer.test.cjs +404 -0
- package/templates/repo/.github/skills/ck-markdown-novel-viewer/tests/http-server.test.cjs +271 -0
- package/templates/repo/.github/skills/ck-markdown-novel-viewer/tests/run-tests.cjs +51 -0
- package/templates/repo/.github/skills/ck-markdown-novel-viewer/tests/test-framework.cjs +154 -0
- package/templates/repo/.github/skills/ck-markdown-novel-viewer/tests/verify-xss.cjs +90 -0
- package/templates/repo/.github/skills/ck-mcp-builder/LICENSE.txt +202 -0
- package/templates/repo/.github/skills/ck-mcp-builder/SKILL.md +327 -0
- package/templates/repo/.github/skills/ck-mcp-builder/reference/evaluation.md +602 -0
- package/templates/repo/.github/skills/ck-mcp-builder/reference/mcp_best_practices.md +915 -0
- package/templates/repo/.github/skills/ck-mcp-builder/reference/node_mcp_server.md +916 -0
- package/templates/repo/.github/skills/ck-mcp-builder/reference/python_mcp_server.md +752 -0
- package/templates/repo/.github/skills/ck-mcp-builder/scripts/connections.py +151 -0
- package/templates/repo/.github/skills/ck-mcp-builder/scripts/evaluation.py +373 -0
- package/templates/repo/.github/skills/ck-mcp-builder/scripts/example_evaluation.xml +22 -0
- package/templates/repo/.github/skills/ck-mcp-builder/scripts/requirements.txt +2 -0
- package/templates/repo/.github/skills/ck-mcp-management/README.md +219 -0
- package/templates/repo/.github/skills/ck-mcp-management/SKILL.md +209 -0
- package/templates/repo/.github/skills/ck-mcp-management/assets/tools.json +3146 -0
- package/templates/repo/.github/skills/ck-mcp-management/references/configuration.md +114 -0
- package/templates/repo/.github/skills/ck-mcp-management/references/gemini-cli-integration.md +215 -0
- package/templates/repo/.github/skills/ck-mcp-management/references/mcp-protocol.md +116 -0
- package/templates/repo/.github/skills/ck-mcp-management/scripts/.env.example +10 -0
- package/templates/repo/.github/skills/ck-mcp-management/scripts/cli.ts +195 -0
- package/templates/repo/.github/skills/ck-mcp-management/scripts/dist/analyze-tools.js +70 -0
- package/templates/repo/.github/skills/ck-mcp-management/scripts/dist/cli.js +160 -0
- package/templates/repo/.github/skills/ck-mcp-management/scripts/dist/mcp-client.js +183 -0
- package/templates/repo/.github/skills/ck-mcp-management/scripts/mcp-client.ts +230 -0
- package/templates/repo/.github/skills/ck-mcp-management/scripts/package.json +20 -0
- package/templates/repo/.github/skills/ck-mcp-management/scripts/tsconfig.json +15 -0
- package/templates/repo/.github/skills/ck-media-processing/SKILL.md +90 -0
- package/templates/repo/.github/skills/ck-media-processing/references/common-workflows.md +132 -0
- package/templates/repo/.github/skills/ck-media-processing/references/ffmpeg-encoding.md +358 -0
- package/templates/repo/.github/skills/ck-media-processing/references/ffmpeg-filters.md +503 -0
- package/templates/repo/.github/skills/ck-media-processing/references/ffmpeg-streaming.md +403 -0
- package/templates/repo/.github/skills/ck-media-processing/references/format-compatibility.md +375 -0
- package/templates/repo/.github/skills/ck-media-processing/references/imagemagick-batch.md +612 -0
- package/templates/repo/.github/skills/ck-media-processing/references/imagemagick-editing.md +623 -0
- package/templates/repo/.github/skills/ck-media-processing/references/rmbg-background-removal.md +66 -0
- package/templates/repo/.github/skills/ck-media-processing/references/troubleshooting.md +109 -0
- package/templates/repo/.github/skills/ck-media-processing/scripts/README.md +111 -0
- package/templates/repo/.github/skills/ck-media-processing/scripts/batch-remove-background.sh +124 -0
- package/templates/repo/.github/skills/ck-media-processing/scripts/batch_resize.py +342 -0
- package/templates/repo/.github/skills/ck-media-processing/scripts/media_convert.py +311 -0
- package/templates/repo/.github/skills/ck-media-processing/scripts/remove-background.sh +96 -0
- package/templates/repo/.github/skills/ck-media-processing/scripts/remove-bg-node.js +158 -0
- package/templates/repo/.github/skills/ck-media-processing/scripts/requirements.txt +24 -0
- package/templates/repo/.github/skills/ck-media-processing/scripts/tests/.coverage +0 -0
- package/templates/repo/.github/skills/ck-media-processing/scripts/tests/requirements.txt +2 -0
- package/templates/repo/.github/skills/ck-media-processing/scripts/tests/test_batch_resize.py +372 -0
- package/templates/repo/.github/skills/ck-media-processing/scripts/tests/test_media_convert.py +259 -0
- package/templates/repo/.github/skills/ck-media-processing/scripts/tests/test_video_optimize.py +397 -0
- package/templates/repo/.github/skills/ck-media-processing/scripts/video_optimize.py +414 -0
- package/templates/repo/.github/skills/ck-mobile-development/SKILL.md +210 -0
- package/templates/repo/.github/skills/ck-mobile-development/references/mobile-android.md +604 -0
- package/templates/repo/.github/skills/ck-mobile-development/references/mobile-best-practices.md +545 -0
- package/templates/repo/.github/skills/ck-mobile-development/references/mobile-debugging.md +1089 -0
- package/templates/repo/.github/skills/ck-mobile-development/references/mobile-frameworks.md +465 -0
- package/templates/repo/.github/skills/ck-mobile-development/references/mobile-ios.md +496 -0
- package/templates/repo/.github/skills/ck-mobile-development/references/mobile-mindset.md +544 -0
- package/templates/repo/.github/skills/ck-payment-integration/README.md +185 -0
- package/templates/repo/.github/skills/ck-payment-integration/SKILL.md +116 -0
- package/templates/repo/.github/skills/ck-payment-integration/references/polar/benefits.md +396 -0
- package/templates/repo/.github/skills/ck-payment-integration/references/polar/best-practices.md +482 -0
- package/templates/repo/.github/skills/ck-payment-integration/references/polar/checkouts.md +266 -0
- package/templates/repo/.github/skills/ck-payment-integration/references/polar/overview.md +184 -0
- package/templates/repo/.github/skills/ck-payment-integration/references/polar/products.md +244 -0
- package/templates/repo/.github/skills/ck-payment-integration/references/polar/sdk.md +436 -0
- package/templates/repo/.github/skills/ck-payment-integration/references/polar/subscriptions.md +340 -0
- package/templates/repo/.github/skills/ck-payment-integration/references/polar/webhooks.md +405 -0
- package/templates/repo/.github/skills/ck-payment-integration/references/sepay/api.md +140 -0
- package/templates/repo/.github/skills/ck-payment-integration/references/sepay/best-practices.md +337 -0
- package/templates/repo/.github/skills/ck-payment-integration/references/sepay/overview.md +138 -0
- package/templates/repo/.github/skills/ck-payment-integration/references/sepay/qr-codes.md +228 -0
- package/templates/repo/.github/skills/ck-payment-integration/references/sepay/sdk.md +213 -0
- package/templates/repo/.github/skills/ck-payment-integration/references/sepay/webhooks.md +208 -0
- package/templates/repo/.github/skills/ck-payment-integration/scripts/.env.example +20 -0
- package/templates/repo/.github/skills/ck-payment-integration/scripts/checkout-helper.js +244 -0
- package/templates/repo/.github/skills/ck-payment-integration/scripts/package.json +17 -0
- package/templates/repo/.github/skills/ck-payment-integration/scripts/polar-webhook-verify.js +202 -0
- package/templates/repo/.github/skills/ck-payment-integration/scripts/sepay-webhook-verify.js +193 -0
- package/templates/repo/.github/skills/ck-payment-integration/scripts/test-scripts.js +237 -0
- package/templates/repo/.github/skills/ck-planning/SKILL.md +112 -0
- package/templates/repo/.github/skills/ck-planning/references/codebase-understanding.md +62 -0
- package/templates/repo/.github/skills/ck-planning/references/output-standards.md +127 -0
- package/templates/repo/.github/skills/ck-planning/references/plan-organization.md +150 -0
- package/templates/repo/.github/skills/ck-planning/references/research-phase.md +49 -0
- package/templates/repo/.github/skills/ck-planning/references/solution-design.md +63 -0
- package/templates/repo/.github/skills/ck-problem-solving/SKILL.md +95 -0
- package/templates/repo/.github/skills/ck-problem-solving/references/attribution.md +69 -0
- package/templates/repo/.github/skills/ck-problem-solving/references/collision-zone-thinking.md +79 -0
- package/templates/repo/.github/skills/ck-problem-solving/references/inversion-exercise.md +91 -0
- package/templates/repo/.github/skills/ck-problem-solving/references/meta-pattern-recognition.md +87 -0
- package/templates/repo/.github/skills/ck-problem-solving/references/scale-game.md +95 -0
- package/templates/repo/.github/skills/ck-problem-solving/references/simplification-cascades.md +80 -0
- package/templates/repo/.github/skills/ck-problem-solving/references/when-stuck.md +72 -0
- package/templates/repo/.github/skills/ck-repomix/SKILL.md +247 -0
- package/templates/repo/.github/skills/ck-repomix/references/configuration.md +211 -0
- package/templates/repo/.github/skills/ck-repomix/references/usage-patterns.md +232 -0
- package/templates/repo/.github/skills/ck-repomix/scripts/.coverage +0 -0
- package/templates/repo/.github/skills/ck-repomix/scripts/README.md +179 -0
- package/templates/repo/.github/skills/ck-repomix/scripts/repomix_batch.py +455 -0
- package/templates/repo/.github/skills/ck-repomix/scripts/repos.example.json +15 -0
- package/templates/repo/.github/skills/ck-repomix/scripts/requirements.txt +15 -0
- package/templates/repo/.github/skills/ck-repomix/scripts/tests/test_repomix_batch.py +531 -0
- package/templates/repo/.github/skills/ck-sequential-thinking/.env.example +8 -0
- package/templates/repo/.github/skills/ck-sequential-thinking/README.md +183 -0
- package/templates/repo/.github/skills/ck-sequential-thinking/SKILL.md +92 -0
- package/templates/repo/.github/skills/ck-sequential-thinking/package.json +31 -0
- package/templates/repo/.github/skills/ck-sequential-thinking/references/advanced-strategies.md +79 -0
- package/templates/repo/.github/skills/ck-sequential-thinking/references/advanced-techniques.md +76 -0
- package/templates/repo/.github/skills/ck-sequential-thinking/references/core-patterns.md +95 -0
- package/templates/repo/.github/skills/ck-sequential-thinking/references/examples-api.md +88 -0
- package/templates/repo/.github/skills/ck-sequential-thinking/references/examples-architecture.md +94 -0
- package/templates/repo/.github/skills/ck-sequential-thinking/references/examples-debug.md +90 -0
- package/templates/repo/.github/skills/ck-sequential-thinking/scripts/format-thought.js +159 -0
- package/templates/repo/.github/skills/ck-sequential-thinking/scripts/process-thought.js +236 -0
- package/templates/repo/.github/skills/ck-sequential-thinking/tests/format-thought.test.js +133 -0
- package/templates/repo/.github/skills/ck-sequential-thinking/tests/process-thought.test.js +215 -0
- package/templates/repo/.github/skills/ck-shopify/README.md +66 -0
- package/templates/repo/.github/skills/ck-shopify/SKILL.md +319 -0
- package/templates/repo/.github/skills/ck-shopify/references/app-development.md +470 -0
- package/templates/repo/.github/skills/ck-shopify/references/extensions.md +493 -0
- package/templates/repo/.github/skills/ck-shopify/references/themes.md +498 -0
- package/templates/repo/.github/skills/ck-shopify/scripts/.coverage +0 -0
- package/templates/repo/.github/skills/ck-shopify/scripts/requirements.txt +19 -0
- package/templates/repo/.github/skills/ck-shopify/scripts/shopify_init.py +423 -0
- package/templates/repo/.github/skills/ck-shopify/scripts/tests/.coverage +0 -0
- package/templates/repo/.github/skills/ck-shopify/scripts/tests/test_shopify_init.py +385 -0
- package/templates/repo/.github/skills/ck-skill-creator/LICENSE.txt +202 -0
- package/templates/repo/.github/skills/ck-skill-creator/SKILL.md +265 -0
- package/templates/repo/.github/skills/ck-skill-creator/scripts/init_skill.py +303 -0
- package/templates/repo/.github/skills/ck-skill-creator/scripts/package_skill.py +110 -0
- package/templates/repo/.github/skills/ck-skill-creator/scripts/quick_validate.py +65 -0
- package/templates/repo/.github/skills/ck-threejs/SKILL.md +87 -0
- package/templates/repo/.github/skills/ck-threejs/references/01-getting-started.md +177 -0
- package/templates/repo/.github/skills/ck-threejs/references/02-loaders.md +169 -0
- package/templates/repo/.github/skills/ck-threejs/references/03-textures.md +170 -0
- package/templates/repo/.github/skills/ck-threejs/references/04-cameras.md +195 -0
- package/templates/repo/.github/skills/ck-threejs/references/05-lights.md +183 -0
- package/templates/repo/.github/skills/ck-threejs/references/06-animations.md +214 -0
- package/templates/repo/.github/skills/ck-threejs/references/07-math.md +260 -0
- package/templates/repo/.github/skills/ck-threejs/references/08-interaction.md +267 -0
- package/templates/repo/.github/skills/ck-threejs/references/09-postprocessing.md +240 -0
- package/templates/repo/.github/skills/ck-threejs/references/10-controls.md +259 -0
- package/templates/repo/.github/skills/ck-threejs/references/11-materials-advanced.md +270 -0
- package/templates/repo/.github/skills/ck-threejs/references/12-performance.md +269 -0
- package/templates/repo/.github/skills/ck-threejs/references/13-node-materials.md +298 -0
- package/templates/repo/.github/skills/ck-threejs/references/14-physics-vr.md +304 -0
- package/templates/repo/.github/skills/ck-threejs/references/15-specialized-loaders.md +333 -0
- package/templates/repo/.github/skills/ck-threejs/references/16-webgpu.md +302 -0
- package/templates/repo/.github/skills/ck-ui-styling/LICENSE.txt +202 -0
- package/templates/repo/.github/skills/ck-ui-styling/SKILL.md +319 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/ArsenalSC-OFL.txt +93 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/ArsenalSC-Regular.ttf +0 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/BigShoulders-Bold.ttf +0 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/BigShoulders-OFL.txt +93 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/BigShoulders-Regular.ttf +0 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/Boldonse-OFL.txt +93 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/Boldonse-Regular.ttf +0 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/BricolageGrotesque-Bold.ttf +0 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/BricolageGrotesque-OFL.txt +93 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/BricolageGrotesque-Regular.ttf +0 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/CrimsonPro-Bold.ttf +0 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/CrimsonPro-Italic.ttf +0 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/CrimsonPro-OFL.txt +93 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/CrimsonPro-Regular.ttf +0 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/DMMono-OFL.txt +93 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/DMMono-Regular.ttf +0 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/EricaOne-OFL.txt +94 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/EricaOne-Regular.ttf +0 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/GeistMono-Bold.ttf +0 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/GeistMono-OFL.txt +93 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/GeistMono-Regular.ttf +0 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/Gloock-OFL.txt +93 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/Gloock-Regular.ttf +0 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/IBMPlexMono-Bold.ttf +0 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/IBMPlexMono-OFL.txt +93 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/IBMPlexMono-Regular.ttf +0 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/IBMPlexSerif-Bold.ttf +0 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/IBMPlexSerif-BoldItalic.ttf +0 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/IBMPlexSerif-Italic.ttf +0 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/IBMPlexSerif-Regular.ttf +0 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/InstrumentSans-Bold.ttf +0 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/InstrumentSans-BoldItalic.ttf +0 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/InstrumentSans-Italic.ttf +0 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/InstrumentSans-OFL.txt +93 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/InstrumentSans-Regular.ttf +0 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/InstrumentSerif-Italic.ttf +0 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/InstrumentSerif-Regular.ttf +0 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/Italiana-OFL.txt +93 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/Italiana-Regular.ttf +0 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/JetBrainsMono-Bold.ttf +0 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/JetBrainsMono-OFL.txt +93 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/JetBrainsMono-Regular.ttf +0 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/Jura-Light.ttf +0 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/Jura-Medium.ttf +0 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/Jura-OFL.txt +93 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/LibreBaskerville-OFL.txt +93 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/LibreBaskerville-Regular.ttf +0 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/Lora-Bold.ttf +0 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/Lora-BoldItalic.ttf +0 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/Lora-Italic.ttf +0 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/Lora-OFL.txt +93 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/Lora-Regular.ttf +0 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/NationalPark-Bold.ttf +0 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/NationalPark-OFL.txt +93 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/NationalPark-Regular.ttf +0 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/NothingYouCouldDo-OFL.txt +93 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/NothingYouCouldDo-Regular.ttf +0 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/Outfit-Bold.ttf +0 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/Outfit-OFL.txt +93 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/Outfit-Regular.ttf +0 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/PixelifySans-Medium.ttf +0 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/PixelifySans-OFL.txt +93 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/PoiretOne-OFL.txt +93 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/PoiretOne-Regular.ttf +0 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/RedHatMono-Bold.ttf +0 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/RedHatMono-OFL.txt +93 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/RedHatMono-Regular.ttf +0 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/Silkscreen-OFL.txt +93 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/Silkscreen-Regular.ttf +0 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/SmoochSans-Medium.ttf +0 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/SmoochSans-OFL.txt +93 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/Tektur-Medium.ttf +0 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/Tektur-OFL.txt +93 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/Tektur-Regular.ttf +0 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/WorkSans-Bold.ttf +0 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/WorkSans-BoldItalic.ttf +0 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/WorkSans-Italic.ttf +0 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/WorkSans-OFL.txt +93 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/WorkSans-Regular.ttf +0 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/YoungSerif-OFL.txt +93 -0
- package/templates/repo/.github/skills/ck-ui-styling/canvas-fonts/YoungSerif-Regular.ttf +0 -0
- package/templates/repo/.github/skills/ck-ui-styling/references/canvas-design-system.md +320 -0
- package/templates/repo/.github/skills/ck-ui-styling/references/shadcn-accessibility.md +471 -0
- package/templates/repo/.github/skills/ck-ui-styling/references/shadcn-components.md +424 -0
- package/templates/repo/.github/skills/ck-ui-styling/references/shadcn-theming.md +373 -0
- package/templates/repo/.github/skills/ck-ui-styling/references/tailwind-customization.md +483 -0
- package/templates/repo/.github/skills/ck-ui-styling/references/tailwind-responsive.md +382 -0
- package/templates/repo/.github/skills/ck-ui-styling/references/tailwind-utilities.md +455 -0
- package/templates/repo/.github/skills/ck-ui-styling/scripts/.coverage +0 -0
- package/templates/repo/.github/skills/ck-ui-styling/scripts/requirements.txt +17 -0
- package/templates/repo/.github/skills/ck-ui-styling/scripts/shadcn_add.py +292 -0
- package/templates/repo/.github/skills/ck-ui-styling/scripts/tailwind_config_gen.py +456 -0
- package/templates/repo/.github/skills/ck-ui-styling/scripts/tests/coverage-ui.json +1 -0
- package/templates/repo/.github/skills/ck-ui-styling/scripts/tests/requirements.txt +3 -0
- package/templates/repo/.github/skills/ck-ui-styling/scripts/tests/test_shadcn_add.py +266 -0
- package/templates/repo/.github/skills/ck-ui-styling/scripts/tests/test_tailwind_config_gen.py +336 -0
- package/templates/repo/.github/skills/ck-ui-ux-pro-max/SKILL.md +227 -0
- package/templates/repo/.github/skills/ck-ui-ux-pro-max/data/charts.csv +26 -0
- package/templates/repo/.github/skills/ck-ui-ux-pro-max/data/colors.csv +97 -0
- package/templates/repo/.github/skills/ck-ui-ux-pro-max/data/landing.csv +31 -0
- package/templates/repo/.github/skills/ck-ui-ux-pro-max/data/products.csv +97 -0
- package/templates/repo/.github/skills/ck-ui-ux-pro-max/data/prompts.csv +24 -0
- package/templates/repo/.github/skills/ck-ui-ux-pro-max/data/stacks/flutter.csv +53 -0
- package/templates/repo/.github/skills/ck-ui-ux-pro-max/data/stacks/html-tailwind.csv +51 -0
- package/templates/repo/.github/skills/ck-ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
- package/templates/repo/.github/skills/ck-ui-ux-pro-max/data/stacks/react-native.csv +52 -0
- package/templates/repo/.github/skills/ck-ui-ux-pro-max/data/stacks/react.csv +54 -0
- package/templates/repo/.github/skills/ck-ui-ux-pro-max/data/stacks/svelte.csv +54 -0
- package/templates/repo/.github/skills/ck-ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
- package/templates/repo/.github/skills/ck-ui-ux-pro-max/data/stacks/vue.csv +50 -0
- package/templates/repo/.github/skills/ck-ui-ux-pro-max/data/styles.csv +59 -0
- package/templates/repo/.github/skills/ck-ui-ux-pro-max/data/typography.csv +58 -0
- package/templates/repo/.github/skills/ck-ui-ux-pro-max/data/ux-guidelines.csv +100 -0
- package/templates/repo/.github/skills/ck-ui-ux-pro-max/scripts/core.py +236 -0
- package/templates/repo/.github/skills/ck-ui-ux-pro-max/scripts/search.py +76 -0
- package/templates/repo/.github/skills/ck-web-frameworks/SKILL.md +322 -0
- package/templates/repo/.github/skills/ck-web-frameworks/references/nextjs-app-router.md +465 -0
- package/templates/repo/.github/skills/ck-web-frameworks/references/nextjs-data-fetching.md +459 -0
- package/templates/repo/.github/skills/ck-web-frameworks/references/nextjs-optimization.md +511 -0
- package/templates/repo/.github/skills/ck-web-frameworks/references/nextjs-server-components.md +495 -0
- package/templates/repo/.github/skills/ck-web-frameworks/references/remix-icon-integration.md +603 -0
- package/templates/repo/.github/skills/ck-web-frameworks/references/turborepo-caching.md +551 -0
- package/templates/repo/.github/skills/ck-web-frameworks/references/turborepo-pipelines.md +517 -0
- package/templates/repo/.github/skills/ck-web-frameworks/references/turborepo-setup.md +542 -0
- package/templates/repo/.github/skills/ck-web-frameworks/scripts/.coverage +0 -0
- package/templates/repo/.github/skills/ck-web-frameworks/scripts/__init__.py +0 -0
- package/templates/repo/.github/skills/ck-web-frameworks/scripts/nextjs_init.py +547 -0
- package/templates/repo/.github/skills/ck-web-frameworks/scripts/requirements.txt +16 -0
- package/templates/repo/.github/skills/ck-web-frameworks/scripts/tests/coverage-web.json +1 -0
- package/templates/repo/.github/skills/ck-web-frameworks/scripts/tests/requirements.txt +3 -0
- package/templates/repo/.github/skills/ck-web-frameworks/scripts/tests/test_nextjs_init.py +319 -0
- package/templates/repo/.github/skills/ck-web-frameworks/scripts/tests/test_turborepo_migrate.py +374 -0
- package/templates/repo/.github/skills/ck-web-frameworks/scripts/turborepo_migrate.py +394 -0
- package/templates/repo/.github/prompts/ck-docs.prompt.md +0 -23
- package/templates/repo/.github/prompts/ck-review.prompt.md +0 -24
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: 'ck-devops'
|
|
3
|
+
description: 'Deploy and manage cloud infrastructure on Cloudflare (Workers, R2, D1, KV, Pages, Durable Objects, Browser Rendering), Docker containers, and Google Cloud Platform (Compute Engine, GKE, Cloud Run, App Engine, Cloud Storage). Use when deploying serverless functions to the edge, configuring edge computing solutions, managing Docker containers and images, setting up CI/CD pipelines, optimizing cloud infrastructure costs, implementing global caching strategies, working with cloud databases, or building cloud-native applications.'
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# DevOps Skill
|
|
7
|
+
|
|
8
|
+
Comprehensive guide for deploying and managing cloud infrastructure across Cloudflare edge platform, Docker containerization, and Google Cloud Platform.
|
|
9
|
+
|
|
10
|
+
## When to Use This Skill
|
|
11
|
+
|
|
12
|
+
Use this skill when:
|
|
13
|
+
- Deploying serverless applications to Cloudflare Workers
|
|
14
|
+
- Containerizing applications with Docker
|
|
15
|
+
- Managing Google Cloud infrastructure with gcloud CLI
|
|
16
|
+
- Setting up CI/CD pipelines across platforms
|
|
17
|
+
- Optimizing cloud infrastructure costs
|
|
18
|
+
- Implementing multi-region deployments
|
|
19
|
+
- Building edge-first architectures
|
|
20
|
+
- Managing container orchestration with Kubernetes
|
|
21
|
+
- Configuring cloud storage solutions (R2, Cloud Storage)
|
|
22
|
+
- Automating infrastructure with scripts and IaC
|
|
23
|
+
|
|
24
|
+
## Platform Selection Guide
|
|
25
|
+
|
|
26
|
+
### When to Use Cloudflare
|
|
27
|
+
|
|
28
|
+
**Best For:**
|
|
29
|
+
- Edge-first applications with global distribution
|
|
30
|
+
- Ultra-low latency requirements (<50ms)
|
|
31
|
+
- Static sites with serverless functions
|
|
32
|
+
- Zero egress cost scenarios (R2 storage)
|
|
33
|
+
- WebSocket/real-time applications (Durable Objects)
|
|
34
|
+
- AI/ML at the edge (Workers AI)
|
|
35
|
+
|
|
36
|
+
**Key Products:**
|
|
37
|
+
- Workers (serverless functions)
|
|
38
|
+
- R2 (object storage, S3-compatible)
|
|
39
|
+
- D1 (SQLite database with global replication)
|
|
40
|
+
- KV (key-value store)
|
|
41
|
+
- Pages (static hosting + functions)
|
|
42
|
+
- Durable Objects (stateful compute)
|
|
43
|
+
- Browser Rendering (headless browser automation)
|
|
44
|
+
|
|
45
|
+
**Cost Profile:** Pay-per-request, generous free tier, zero egress fees
|
|
46
|
+
|
|
47
|
+
### When to Use Docker
|
|
48
|
+
|
|
49
|
+
**Best For:**
|
|
50
|
+
- Local development consistency
|
|
51
|
+
- Microservices architectures
|
|
52
|
+
- Multi-language stack applications
|
|
53
|
+
- Traditional VPS/VM deployments
|
|
54
|
+
- Kubernetes orchestration
|
|
55
|
+
- CI/CD build environments
|
|
56
|
+
- Database containerization (dev/test)
|
|
57
|
+
|
|
58
|
+
**Key Capabilities:**
|
|
59
|
+
- Application isolation and portability
|
|
60
|
+
- Multi-stage builds for optimization
|
|
61
|
+
- Docker Compose for multi-container apps
|
|
62
|
+
- Volume management for data persistence
|
|
63
|
+
- Network configuration and service discovery
|
|
64
|
+
- Cross-platform compatibility (amd64, arm64)
|
|
65
|
+
|
|
66
|
+
**Cost Profile:** Infrastructure cost only (compute + storage)
|
|
67
|
+
|
|
68
|
+
### When to Use Google Cloud
|
|
69
|
+
|
|
70
|
+
**Best For:**
|
|
71
|
+
- Enterprise-scale applications
|
|
72
|
+
- Data analytics and ML pipelines (BigQuery, Vertex AI)
|
|
73
|
+
- Hybrid/multi-cloud deployments
|
|
74
|
+
- Kubernetes at scale (GKE)
|
|
75
|
+
- Managed databases (Cloud SQL, Firestore, Spanner)
|
|
76
|
+
- Complex IAM and compliance requirements
|
|
77
|
+
|
|
78
|
+
**Key Services:**
|
|
79
|
+
- Compute Engine (VMs)
|
|
80
|
+
- GKE (managed Kubernetes)
|
|
81
|
+
- Cloud Run (containerized serverless)
|
|
82
|
+
- App Engine (PaaS)
|
|
83
|
+
- Cloud Storage (object storage)
|
|
84
|
+
- Cloud SQL (managed databases)
|
|
85
|
+
|
|
86
|
+
**Cost Profile:** Varied pricing, sustained use discounts, committed use contracts
|
|
87
|
+
|
|
88
|
+
## Quick Start
|
|
89
|
+
|
|
90
|
+
### Cloudflare Workers
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
# Install Wrangler CLI
|
|
94
|
+
npm install -g wrangler
|
|
95
|
+
|
|
96
|
+
# Create and deploy Worker
|
|
97
|
+
wrangler init my-worker
|
|
98
|
+
cd my-worker
|
|
99
|
+
wrangler deploy
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
See: `references/cloudflare-workers-basics.md`
|
|
103
|
+
|
|
104
|
+
### Docker Container
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
# Create Dockerfile
|
|
108
|
+
cat > Dockerfile <<EOF
|
|
109
|
+
FROM node:20-alpine
|
|
110
|
+
WORKDIR /app
|
|
111
|
+
COPY package*.json ./
|
|
112
|
+
RUN npm ci --production
|
|
113
|
+
COPY . .
|
|
114
|
+
EXPOSE 3000
|
|
115
|
+
CMD ["node", "server.js"]
|
|
116
|
+
EOF
|
|
117
|
+
|
|
118
|
+
# Build and run
|
|
119
|
+
docker build -t myapp .
|
|
120
|
+
docker run -p 3000:3000 myapp
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
See: `references/docker-basics.md`
|
|
124
|
+
|
|
125
|
+
### Google Cloud Deployment
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
# Install and authenticate
|
|
129
|
+
curl https://sdk.cloud.google.com | bash
|
|
130
|
+
gcloud init
|
|
131
|
+
gcloud auth login
|
|
132
|
+
|
|
133
|
+
# Deploy to Cloud Run
|
|
134
|
+
gcloud run deploy my-service \
|
|
135
|
+
--image gcr.io/project/image \
|
|
136
|
+
--region us-central1
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
See: `references/gcloud-platform.md`
|
|
140
|
+
|
|
141
|
+
## Reference Navigation
|
|
142
|
+
|
|
143
|
+
### Cloudflare Platform
|
|
144
|
+
- `cloudflare-platform.md` - Edge computing overview, key components
|
|
145
|
+
- `cloudflare-workers-basics.md` - Getting started, handler types, basic patterns
|
|
146
|
+
- `cloudflare-workers-advanced.md` - Advanced patterns, performance, optimization
|
|
147
|
+
- `cloudflare-workers-apis.md` - Runtime APIs, bindings, integrations
|
|
148
|
+
- `cloudflare-r2-storage.md` - R2 object storage, S3 compatibility, best practices
|
|
149
|
+
- `cloudflare-d1-kv.md` - D1 SQLite database, KV store, use cases
|
|
150
|
+
- `browser-rendering.md` - Puppeteer/Playwright automation on Cloudflare
|
|
151
|
+
|
|
152
|
+
### Docker Containerization
|
|
153
|
+
- `docker-basics.md` - Core concepts, Dockerfile, images, containers
|
|
154
|
+
- `docker-compose.md` - Multi-container apps, networking, volumes
|
|
155
|
+
|
|
156
|
+
### Google Cloud Platform
|
|
157
|
+
- `gcloud-platform.md` - GCP overview, gcloud CLI, authentication
|
|
158
|
+
- `gcloud-services.md` - Compute Engine, GKE, Cloud Run, App Engine
|
|
159
|
+
|
|
160
|
+
### Python Utilities
|
|
161
|
+
- `scripts/cloudflare-deploy.py` - Automate Cloudflare Worker deployments
|
|
162
|
+
- `scripts/docker-optimize.py` - Analyze and optimize Dockerfiles
|
|
163
|
+
|
|
164
|
+
## Common Workflows
|
|
165
|
+
|
|
166
|
+
### Edge + Container Hybrid
|
|
167
|
+
|
|
168
|
+
```yaml
|
|
169
|
+
# Cloudflare Workers (API Gateway)
|
|
170
|
+
# -> Docker containers on Cloud Run (Backend Services)
|
|
171
|
+
# -> R2 (Object Storage)
|
|
172
|
+
|
|
173
|
+
# Benefits:
|
|
174
|
+
# - Edge caching and routing
|
|
175
|
+
# - Containerized business logic
|
|
176
|
+
# - Global distribution
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
### Multi-Stage Docker Build
|
|
180
|
+
|
|
181
|
+
```dockerfile
|
|
182
|
+
# Build stage
|
|
183
|
+
FROM node:20-alpine AS build
|
|
184
|
+
WORKDIR /app
|
|
185
|
+
COPY package*.json ./
|
|
186
|
+
RUN npm ci
|
|
187
|
+
COPY . .
|
|
188
|
+
RUN npm run build
|
|
189
|
+
|
|
190
|
+
# Production stage
|
|
191
|
+
FROM node:20-alpine
|
|
192
|
+
WORKDIR /app
|
|
193
|
+
COPY --from=build /app/dist ./dist
|
|
194
|
+
COPY --from=build /app/node_modules ./node_modules
|
|
195
|
+
USER node
|
|
196
|
+
CMD ["node", "dist/server.js"]
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
### CI/CD Pipeline Pattern
|
|
200
|
+
|
|
201
|
+
```yaml
|
|
202
|
+
# 1. Build: Docker multi-stage build
|
|
203
|
+
# 2. Test: Run tests in container
|
|
204
|
+
# 3. Push: Push to registry (GCR, Docker Hub)
|
|
205
|
+
# 4. Deploy: Deploy to Cloudflare Workers / Cloud Run
|
|
206
|
+
# 5. Verify: Health checks and smoke tests
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
## Best Practices
|
|
210
|
+
|
|
211
|
+
### Security
|
|
212
|
+
- Run containers as non-root user
|
|
213
|
+
- Use service account impersonation (GCP)
|
|
214
|
+
- Store secrets in environment variables, not code
|
|
215
|
+
- Scan images for vulnerabilities (Docker Scout)
|
|
216
|
+
- Use API tokens with minimal permissions
|
|
217
|
+
|
|
218
|
+
### Performance
|
|
219
|
+
- Multi-stage Docker builds to reduce image size
|
|
220
|
+
- Edge caching with Cloudflare KV
|
|
221
|
+
- Use R2 for zero egress cost storage
|
|
222
|
+
- Implement health checks for containers
|
|
223
|
+
- Set appropriate timeouts and resource limits
|
|
224
|
+
|
|
225
|
+
### Cost Optimization
|
|
226
|
+
- Use Cloudflare R2 instead of S3 for large egress
|
|
227
|
+
- Implement caching strategies (edge + KV)
|
|
228
|
+
- Right-size container resources
|
|
229
|
+
- Use sustained use discounts (GCP)
|
|
230
|
+
- Monitor usage with cloud provider dashboards
|
|
231
|
+
|
|
232
|
+
### Development
|
|
233
|
+
- Use Docker Compose for local development
|
|
234
|
+
- Wrangler dev for local Worker testing
|
|
235
|
+
- Named gcloud configurations for multi-environment
|
|
236
|
+
- Version control infrastructure code
|
|
237
|
+
- Implement automated testing in CI/CD
|
|
238
|
+
|
|
239
|
+
## Decision Matrix
|
|
240
|
+
|
|
241
|
+
| Need | Choose |
|
|
242
|
+
|------|--------|
|
|
243
|
+
| Sub-50ms latency globally | Cloudflare Workers |
|
|
244
|
+
| Large file storage (zero egress) | Cloudflare R2 |
|
|
245
|
+
| SQL database (global reads) | Cloudflare D1 |
|
|
246
|
+
| Containerized workloads | Docker + Cloud Run/GKE |
|
|
247
|
+
| Enterprise Kubernetes | GKE |
|
|
248
|
+
| Managed relational DB | Cloud SQL |
|
|
249
|
+
| Static site + API | Cloudflare Pages |
|
|
250
|
+
| WebSocket/real-time | Cloudflare Durable Objects |
|
|
251
|
+
| ML/AI pipelines | GCP Vertex AI |
|
|
252
|
+
| Browser automation | Cloudflare Browser Rendering |
|
|
253
|
+
|
|
254
|
+
## Resources
|
|
255
|
+
|
|
256
|
+
- **Cloudflare Docs:** https://developers.cloudflare.com
|
|
257
|
+
- **Docker Docs:** https://docs.docker.com
|
|
258
|
+
- **GCP Docs:** https://cloud.google.com/docs
|
|
259
|
+
- **Wrangler CLI:** https://developers.cloudflare.com/workers/wrangler/
|
|
260
|
+
- **gcloud CLI:** https://cloud.google.com/sdk/gcloud
|
|
261
|
+
|
|
262
|
+
## Implementation Checklist
|
|
263
|
+
|
|
264
|
+
### Cloudflare Workers
|
|
265
|
+
- [ ] Install Wrangler CLI
|
|
266
|
+
- [ ] Create Worker project
|
|
267
|
+
- [ ] Configure wrangler.toml (bindings, routes)
|
|
268
|
+
- [ ] Test locally with `wrangler dev`
|
|
269
|
+
- [ ] Deploy with `wrangler deploy`
|
|
270
|
+
|
|
271
|
+
### Docker
|
|
272
|
+
- [ ] Write Dockerfile with multi-stage builds
|
|
273
|
+
- [ ] Create .dockerignore file
|
|
274
|
+
- [ ] Test build locally
|
|
275
|
+
- [ ] Push to registry
|
|
276
|
+
- [ ] Deploy to target platform
|
|
277
|
+
|
|
278
|
+
### Google Cloud
|
|
279
|
+
- [ ] Install gcloud CLI
|
|
280
|
+
- [ ] Authenticate with service account
|
|
281
|
+
- [ ] Create project and enable APIs
|
|
282
|
+
- [ ] Configure IAM permissions
|
|
283
|
+
- [ ] Deploy and monitor resources
|
|
@@ -0,0 +1,305 @@
|
|
|
1
|
+
# Cloudflare Browser Rendering
|
|
2
|
+
|
|
3
|
+
Headless browser automation with Puppeteer/Playwright on Cloudflare Workers.
|
|
4
|
+
|
|
5
|
+
## Setup
|
|
6
|
+
|
|
7
|
+
**wrangler.toml:**
|
|
8
|
+
```toml
|
|
9
|
+
name = "browser-worker"
|
|
10
|
+
main = "src/index.ts"
|
|
11
|
+
compatibility_date = "2024-01-01"
|
|
12
|
+
|
|
13
|
+
browser = { binding = "MYBROWSER" }
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Basic Screenshot Worker
|
|
17
|
+
|
|
18
|
+
```typescript
|
|
19
|
+
import puppeteer from '@cloudflare/puppeteer';
|
|
20
|
+
|
|
21
|
+
export default {
|
|
22
|
+
async fetch(request: Request, env: Env): Promise<Response> {
|
|
23
|
+
const browser = await puppeteer.launch(env.MYBROWSER);
|
|
24
|
+
const page = await browser.newPage();
|
|
25
|
+
|
|
26
|
+
await page.goto('https://example.com', { waitUntil: 'networkidle2' });
|
|
27
|
+
const screenshot = await page.screenshot({ type: 'png' });
|
|
28
|
+
|
|
29
|
+
await browser.close();
|
|
30
|
+
|
|
31
|
+
return new Response(screenshot, {
|
|
32
|
+
headers: { 'Content-Type': 'image/png' }
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Session Reuse (Cost Optimization)
|
|
39
|
+
|
|
40
|
+
```typescript
|
|
41
|
+
// Disconnect instead of close
|
|
42
|
+
await browser.disconnect();
|
|
43
|
+
|
|
44
|
+
// Retrieve and reconnect
|
|
45
|
+
const sessions = await puppeteer.sessions(env.MYBROWSER);
|
|
46
|
+
const freeSession = sessions.find(s => !s.connectionId);
|
|
47
|
+
|
|
48
|
+
if (freeSession) {
|
|
49
|
+
const browser = await puppeteer.connect(env.MYBROWSER, freeSession.sessionId);
|
|
50
|
+
}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## PDF Generation
|
|
54
|
+
|
|
55
|
+
```typescript
|
|
56
|
+
const browser = await puppeteer.launch(env.MYBROWSER);
|
|
57
|
+
const page = await browser.newPage();
|
|
58
|
+
|
|
59
|
+
await page.setContent(`
|
|
60
|
+
<!DOCTYPE html>
|
|
61
|
+
<html>
|
|
62
|
+
<head>
|
|
63
|
+
<style>
|
|
64
|
+
body { font-family: Arial; padding: 50px; }
|
|
65
|
+
h1 { color: #2c3e50; }
|
|
66
|
+
</style>
|
|
67
|
+
</head>
|
|
68
|
+
<body>
|
|
69
|
+
<h1>Certificate</h1>
|
|
70
|
+
<p>Awarded to: <strong>John Doe</strong></p>
|
|
71
|
+
</body>
|
|
72
|
+
</html>
|
|
73
|
+
`);
|
|
74
|
+
|
|
75
|
+
const pdf = await page.pdf({
|
|
76
|
+
format: 'A4',
|
|
77
|
+
printBackground: true,
|
|
78
|
+
margin: { top: '1cm', right: '1cm', bottom: '1cm', left: '1cm' }
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
await browser.close();
|
|
82
|
+
|
|
83
|
+
return new Response(pdf, {
|
|
84
|
+
headers: { 'Content-Type': 'application/pdf' }
|
|
85
|
+
});
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## Durable Objects for Persistent Sessions
|
|
89
|
+
|
|
90
|
+
```typescript
|
|
91
|
+
export class Browser {
|
|
92
|
+
state: DurableObjectState;
|
|
93
|
+
browser: any;
|
|
94
|
+
lastUsed: number;
|
|
95
|
+
|
|
96
|
+
constructor(state: DurableObjectState, env: Env) {
|
|
97
|
+
this.state = state;
|
|
98
|
+
this.lastUsed = Date.now();
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
async fetch(request: Request, env: Env) {
|
|
102
|
+
if (!this.browser) {
|
|
103
|
+
this.browser = await puppeteer.launch(env.MYBROWSER);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
this.lastUsed = Date.now();
|
|
107
|
+
await this.state.storage.setAlarm(Date.now() + 10000);
|
|
108
|
+
|
|
109
|
+
const page = await this.browser.newPage();
|
|
110
|
+
const url = new URL(request.url).searchParams.get('url');
|
|
111
|
+
await page.goto(url);
|
|
112
|
+
const screenshot = await page.screenshot();
|
|
113
|
+
await page.close();
|
|
114
|
+
|
|
115
|
+
return new Response(screenshot, {
|
|
116
|
+
headers: { 'Content-Type': 'image/png' }
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
async alarm() {
|
|
121
|
+
if (Date.now() - this.lastUsed > 60000) {
|
|
122
|
+
await this.browser?.close();
|
|
123
|
+
this.browser = null;
|
|
124
|
+
} else {
|
|
125
|
+
await this.state.storage.setAlarm(Date.now() + 10000);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
## AI-Powered Web Scraper
|
|
132
|
+
|
|
133
|
+
```typescript
|
|
134
|
+
import { Ai } from '@cloudflare/ai';
|
|
135
|
+
|
|
136
|
+
export default {
|
|
137
|
+
async fetch(request: Request, env: Env): Promise<Response> {
|
|
138
|
+
const browser = await puppeteer.launch(env.MYBROWSER);
|
|
139
|
+
const page = await browser.newPage();
|
|
140
|
+
await page.goto('https://news.ycombinator.com');
|
|
141
|
+
const content = await page.content();
|
|
142
|
+
await browser.close();
|
|
143
|
+
|
|
144
|
+
const ai = new Ai(env.AI);
|
|
145
|
+
const response = await ai.run('@cf/meta/llama-3-8b-instruct', {
|
|
146
|
+
messages: [
|
|
147
|
+
{
|
|
148
|
+
role: 'system',
|
|
149
|
+
content: 'Extract top 5 article titles and URLs as JSON'
|
|
150
|
+
},
|
|
151
|
+
{ role: 'user', content: content }
|
|
152
|
+
]
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
return Response.json(response);
|
|
156
|
+
}
|
|
157
|
+
};
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
## Crawler with Queues
|
|
161
|
+
|
|
162
|
+
```typescript
|
|
163
|
+
export default {
|
|
164
|
+
async queue(batch: MessageBatch<any>, env: Env): Promise<void> {
|
|
165
|
+
const browser = await puppeteer.launch(env.MYBROWSER);
|
|
166
|
+
|
|
167
|
+
for (const message of batch.messages) {
|
|
168
|
+
const page = await browser.newPage();
|
|
169
|
+
await page.goto(message.body.url);
|
|
170
|
+
|
|
171
|
+
const links = await page.evaluate(() => {
|
|
172
|
+
return Array.from(document.querySelectorAll('a')).map(a => a.href);
|
|
173
|
+
});
|
|
174
|
+
|
|
175
|
+
for (const link of links) {
|
|
176
|
+
await env.QUEUE.send({ url: link });
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
await page.close();
|
|
180
|
+
message.ack();
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
await browser.close();
|
|
184
|
+
}
|
|
185
|
+
};
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
## Configuration
|
|
189
|
+
|
|
190
|
+
### Timeout
|
|
191
|
+
```typescript
|
|
192
|
+
await page.goto(url, {
|
|
193
|
+
timeout: 60000, // 60 seconds max
|
|
194
|
+
waitUntil: 'networkidle2'
|
|
195
|
+
});
|
|
196
|
+
|
|
197
|
+
await page.waitForSelector('.content', { timeout: 45000 });
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
### Viewport
|
|
201
|
+
```typescript
|
|
202
|
+
await page.setViewport({ width: 1920, height: 1080 });
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
### Screenshot Options
|
|
206
|
+
```typescript
|
|
207
|
+
const screenshot = await page.screenshot({
|
|
208
|
+
type: 'png', // 'png' | 'jpeg' | 'webp'
|
|
209
|
+
quality: 90, // JPEG/WebP only
|
|
210
|
+
fullPage: true, // Full scrollable page
|
|
211
|
+
clip: { // Crop
|
|
212
|
+
x: 0, y: 0,
|
|
213
|
+
width: 800,
|
|
214
|
+
height: 600
|
|
215
|
+
}
|
|
216
|
+
});
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
## Limits & Pricing
|
|
220
|
+
|
|
221
|
+
### Free Plan
|
|
222
|
+
- 10 minutes/day
|
|
223
|
+
- 3 concurrent browsers
|
|
224
|
+
- 3 new browsers/minute
|
|
225
|
+
|
|
226
|
+
### Paid Plan
|
|
227
|
+
- 10 hours/month included
|
|
228
|
+
- 30 concurrent browsers
|
|
229
|
+
- 30 new browsers/minute
|
|
230
|
+
- $0.09/hour overage
|
|
231
|
+
- $2.00/concurrent browser overage
|
|
232
|
+
|
|
233
|
+
### Cost Optimization
|
|
234
|
+
1. Use `disconnect()` instead of `close()`
|
|
235
|
+
2. Enable Keep-Alive (10 min max)
|
|
236
|
+
3. Pool tabs with browser contexts
|
|
237
|
+
4. Cache auth state with KV
|
|
238
|
+
5. Implement Durable Objects cleanup
|
|
239
|
+
|
|
240
|
+
## Best Practices
|
|
241
|
+
|
|
242
|
+
### Session Management
|
|
243
|
+
- Always use `disconnect()` for reuse
|
|
244
|
+
- Implement session pooling
|
|
245
|
+
- Track session IDs and states
|
|
246
|
+
|
|
247
|
+
### Performance
|
|
248
|
+
- Cache content in KV
|
|
249
|
+
- Use browser contexts vs multiple browsers
|
|
250
|
+
- Choose appropriate `waitUntil` strategy
|
|
251
|
+
- Set realistic timeouts
|
|
252
|
+
|
|
253
|
+
### Error Handling
|
|
254
|
+
- Handle timeout errors gracefully
|
|
255
|
+
- Check session availability before connecting
|
|
256
|
+
- Validate responses before caching
|
|
257
|
+
|
|
258
|
+
### Security
|
|
259
|
+
- Validate user-provided URLs
|
|
260
|
+
- Implement authentication
|
|
261
|
+
- Sanitize extracted content
|
|
262
|
+
- Set appropriate CORS headers
|
|
263
|
+
|
|
264
|
+
## Troubleshooting
|
|
265
|
+
|
|
266
|
+
**Timeout Errors:**
|
|
267
|
+
```typescript
|
|
268
|
+
await page.goto(url, {
|
|
269
|
+
timeout: 60000,
|
|
270
|
+
waitUntil: 'domcontentloaded' // Faster than networkidle2
|
|
271
|
+
});
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
**Memory Issues:**
|
|
275
|
+
```typescript
|
|
276
|
+
await page.close(); // Close pages
|
|
277
|
+
await browser.disconnect(); // Reuse session
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
**Font Rendering:**
|
|
281
|
+
Use supported fonts (Noto Sans, Roboto, etc.) or inject custom:
|
|
282
|
+
```html
|
|
283
|
+
<link href="https://fonts.googleapis.com/css2?family=Poppins" rel="stylesheet">
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
## Key Methods
|
|
287
|
+
|
|
288
|
+
### Puppeteer
|
|
289
|
+
- `puppeteer.launch(binding)` - Start browser
|
|
290
|
+
- `puppeteer.connect(binding, sessionId)` - Reconnect
|
|
291
|
+
- `puppeteer.sessions(binding)` - List sessions
|
|
292
|
+
- `browser.newPage()` - Create page
|
|
293
|
+
- `browser.disconnect()` - Disconnect (keep alive)
|
|
294
|
+
- `browser.close()` - Close (terminate)
|
|
295
|
+
- `page.goto(url, options)` - Navigate
|
|
296
|
+
- `page.screenshot(options)` - Capture
|
|
297
|
+
- `page.pdf(options)` - Generate PDF
|
|
298
|
+
- `page.content()` - Get HTML
|
|
299
|
+
- `page.evaluate(fn)` - Execute JS
|
|
300
|
+
|
|
301
|
+
## Resources
|
|
302
|
+
|
|
303
|
+
- Docs: https://developers.cloudflare.com/browser-rendering/
|
|
304
|
+
- Puppeteer: https://pptr.dev/
|
|
305
|
+
- Examples: https://developers.cloudflare.com/workers/examples/
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
# Cloudflare D1 & KV
|
|
2
|
+
|
|
3
|
+
## D1 (SQLite Database)
|
|
4
|
+
|
|
5
|
+
### Setup
|
|
6
|
+
```bash
|
|
7
|
+
# Create database
|
|
8
|
+
wrangler d1 create my-database
|
|
9
|
+
|
|
10
|
+
# Add to wrangler.toml
|
|
11
|
+
[[d1_databases]]
|
|
12
|
+
binding = "DB"
|
|
13
|
+
database_name = "my-database"
|
|
14
|
+
database_id = "YOUR_DATABASE_ID"
|
|
15
|
+
|
|
16
|
+
# Apply schema
|
|
17
|
+
wrangler d1 execute my-database --file=./schema.sql
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
### Usage
|
|
21
|
+
|
|
22
|
+
```typescript
|
|
23
|
+
// Query
|
|
24
|
+
const result = await env.DB.prepare(
|
|
25
|
+
"SELECT * FROM users WHERE id = ?"
|
|
26
|
+
).bind(userId).first();
|
|
27
|
+
|
|
28
|
+
// Insert
|
|
29
|
+
await env.DB.prepare(
|
|
30
|
+
"INSERT INTO users (name, email) VALUES (?, ?)"
|
|
31
|
+
).bind("Alice", "alice@example.com").run();
|
|
32
|
+
|
|
33
|
+
// Batch (atomic)
|
|
34
|
+
await env.DB.batch([
|
|
35
|
+
env.DB.prepare("UPDATE accounts SET balance = balance - 100 WHERE id = ?").bind(user1),
|
|
36
|
+
env.DB.prepare("UPDATE accounts SET balance = balance + 100 WHERE id = ?").bind(user2)
|
|
37
|
+
]);
|
|
38
|
+
|
|
39
|
+
// All results
|
|
40
|
+
const { results } = await env.DB.prepare("SELECT * FROM users").all();
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Features
|
|
44
|
+
- Global read replication (low-latency reads)
|
|
45
|
+
- Single-writer consistency
|
|
46
|
+
- Standard SQLite syntax
|
|
47
|
+
- 25GB database size limit
|
|
48
|
+
- ACID transactions with batch
|
|
49
|
+
|
|
50
|
+
## KV (Key-Value Store)
|
|
51
|
+
|
|
52
|
+
### Setup
|
|
53
|
+
```bash
|
|
54
|
+
# Create namespace
|
|
55
|
+
wrangler kv:namespace create MY_KV
|
|
56
|
+
|
|
57
|
+
# Add to wrangler.toml
|
|
58
|
+
[[kv_namespaces]]
|
|
59
|
+
binding = "KV"
|
|
60
|
+
id = "YOUR_NAMESPACE_ID"
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### Usage
|
|
64
|
+
|
|
65
|
+
```typescript
|
|
66
|
+
// Put with TTL
|
|
67
|
+
await env.KV.put("session:token", JSON.stringify(data), {
|
|
68
|
+
expirationTtl: 3600,
|
|
69
|
+
metadata: { userId: "123" }
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
// Get
|
|
73
|
+
const value = await env.KV.get("session:token");
|
|
74
|
+
const json = await env.KV.get("session:token", "json");
|
|
75
|
+
const buffer = await env.KV.get("session:token", "arrayBuffer");
|
|
76
|
+
const stream = await env.KV.get("session:token", "stream");
|
|
77
|
+
|
|
78
|
+
// Get with metadata
|
|
79
|
+
const { value, metadata } = await env.KV.getWithMetadata("session:token");
|
|
80
|
+
|
|
81
|
+
// Delete
|
|
82
|
+
await env.KV.delete("session:token");
|
|
83
|
+
|
|
84
|
+
// List
|
|
85
|
+
const list = await env.KV.list({ prefix: "user:" });
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Features
|
|
89
|
+
- Sub-millisecond reads (edge-cached)
|
|
90
|
+
- Eventual consistency (~60 seconds globally)
|
|
91
|
+
- 25MB value size limit
|
|
92
|
+
- Automatic expiration (TTL)
|
|
93
|
+
|
|
94
|
+
## Use Cases
|
|
95
|
+
|
|
96
|
+
### D1
|
|
97
|
+
- Relational data
|
|
98
|
+
- Complex queries with JOINs
|
|
99
|
+
- ACID transactions
|
|
100
|
+
- User accounts, orders, inventory
|
|
101
|
+
|
|
102
|
+
### KV
|
|
103
|
+
- Cache
|
|
104
|
+
- Sessions
|
|
105
|
+
- Feature flags
|
|
106
|
+
- Rate limiting
|
|
107
|
+
- Real-time counters
|
|
108
|
+
|
|
109
|
+
## Decision Matrix
|
|
110
|
+
|
|
111
|
+
| Need | Choose |
|
|
112
|
+
|------|--------|
|
|
113
|
+
| SQL queries | D1 |
|
|
114
|
+
| Sub-millisecond reads | KV |
|
|
115
|
+
| ACID transactions | D1 |
|
|
116
|
+
| Large values (>25MB) | R2 |
|
|
117
|
+
| Strong consistency | D1 (writes), Durable Objects |
|
|
118
|
+
| Automatic expiration | KV |
|
|
119
|
+
|
|
120
|
+
## Resources
|
|
121
|
+
|
|
122
|
+
- D1: https://developers.cloudflare.com/d1/
|
|
123
|
+
- KV: https://developers.cloudflare.com/kv/
|