cokit-cli 1.0.1 → 1.0.3
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/AGENTS.md +103 -0
- package/README.FLOW.md +237 -0
- package/README.md +153 -94
- package/agents/brainstormer.agent.md +71 -0
- package/agents/code-reviewer.agent.md +128 -0
- package/agents/database-admin.agent.md +91 -0
- package/agents/debugger.agent.md +128 -0
- package/agents/docs-manager.agent.md +121 -0
- package/agents/fullstack-developer.agent.md +96 -0
- package/agents/git-manager.agent.md +392 -0
- package/agents/mcp-manager.agent.md +93 -0
- package/agents/planner.agent.md +94 -0
- package/agents/project-manager.agent.md +124 -0
- package/agents/researcher.agent.md +32 -0
- package/agents/scout-external.agent.md +141 -0
- package/agents/scout.agent.md +107 -0
- package/agents/tester.agent.md +106 -0
- package/agents/ui-ux-designer.agent.md +225 -0
- package/collections/ck-core.collection.yml +30 -0
- package/collections/ck-development-rules.collection.yml +18 -0
- package/collections/ck-documentation.collection.yml +18 -0
- package/collections/ck-git-workflow.collection.yml +18 -0
- package/collections/ck-orchestration.collection.yml +22 -0
- package/collections/ck-ui-design.collection.yml +18 -0
- package/docs/README.md +85 -0
- package/docs/copilot-processing-flow.md +128 -0
- package/instructions/ck-backend.instructions.md +48 -0
- package/instructions/ck-development.instructions.md +40 -0
- package/instructions/ck-frontend-design-pro.instructions.md +58 -0
- package/instructions/ck-frontend.instructions.md +44 -0
- package/instructions/ck-google-adk-python.instructions.md +242 -0
- package/instructions/ck-research.instructions.md +167 -0
- package/instructions/ck-testing.instructions.md +36 -0
- package/package.json +9 -2
- package/plans/260108-0924-rebuild-cokit-awesome-copilot-format/phase-01-restructure-folders.md +183 -0
- package/plans/260108-0924-rebuild-cokit-awesome-copilot-format/phase-02-convert-agents.md +206 -0
- package/plans/260108-0924-rebuild-cokit-awesome-copilot-format/phase-03-convert-commands-to-prompts.md +284 -0
- package/plans/260108-0924-rebuild-cokit-awesome-copilot-format/phase-04-convert-skills-to-instructions.md +349 -0
- package/plans/260108-0924-rebuild-cokit-awesome-copilot-format/phase-05-create-collections.md +320 -0
- package/plans/260108-0924-rebuild-cokit-awesome-copilot-format/phase-06-update-cli-build-scripts.md +450 -0
- package/plans/260108-0924-rebuild-cokit-awesome-copilot-format/phase-07-update-documentation.md +407 -0
- package/plans/260108-0924-rebuild-cokit-awesome-copilot-format/plan.md +136 -0
- package/prompts/ck-ask.prompt.md +57 -0
- package/prompts/ck-bootstrap-auto-fast.prompt.md +108 -0
- package/prompts/ck-bootstrap-auto-parallel.prompt.md +66 -0
- package/prompts/ck-bootstrap-auto.prompt.md +114 -0
- package/prompts/ck-bootstrap.prompt.md +136 -0
- package/prompts/ck-brainstorm.prompt.md +68 -0
- package/prompts/ck-ck-help.prompt.md +114 -0
- package/prompts/ck-code-auto.prompt.md +171 -0
- package/prompts/ck-code-no-test.prompt.md +159 -0
- package/prompts/ck-code-parallel.prompt.md +56 -0
- package/prompts/ck-code.prompt.md +177 -0
- package/prompts/ck-coding-level.prompt.md +54 -0
- package/prompts/ck-cook-auto-fast.prompt.md +26 -0
- package/prompts/ck-cook-auto-parallel.prompt.md +49 -0
- package/prompts/ck-cook-auto.prompt.md +15 -0
- package/prompts/ck-cook.prompt.md +96 -0
- package/prompts/ck-debug.prompt.md +14 -0
- package/prompts/ck-design-3d.prompt.md +84 -0
- package/prompts/ck-design-describe.prompt.md +24 -0
- package/prompts/ck-design-fast.prompt.md +32 -0
- package/prompts/ck-design-good.prompt.md +36 -0
- package/prompts/ck-design-screenshot.prompt.md +35 -0
- package/prompts/ck-design-video.prompt.md +35 -0
- package/prompts/ck-docs-init.prompt.md +27 -0
- package/prompts/ck-docs-summarize.prompt.md +23 -0
- package/prompts/ck-docs-update.prompt.md +36 -0
- package/prompts/ck-fix-ci.prompt.md +18 -0
- package/prompts/ck-fix-fast.prompt.md +18 -0
- package/prompts/ck-fix-hard.prompt.md +36 -0
- package/prompts/ck-fix-logs.prompt.md +27 -0
- package/prompts/ck-fix-parallel.prompt.md +54 -0
- package/prompts/ck-fix-test.prompt.md +19 -0
- package/prompts/ck-fix-types.prompt.md +11 -0
- package/prompts/ck-fix-ui.prompt.md +49 -0
- package/prompts/ck-fix.prompt.md +44 -0
- package/prompts/ck-git-cm.prompt.md +8 -0
- package/prompts/ck-git-cp.prompt.md +7 -0
- package/prompts/ck-git-merge.prompt.md +41 -0
- package/prompts/ck-git-pr.prompt.md +49 -0
- package/prompts/ck-kanban.prompt.md +77 -0
- package/prompts/ck-plan-archive.prompt.md +58 -0
- package/prompts/ck-plan-ci.prompt.md +34 -0
- package/prompts/ck-plan-cro.prompt.md +66 -0
- package/prompts/ck-plan-fast.prompt.md +67 -0
- package/prompts/ck-plan-hard.prompt.md +89 -0
- package/prompts/ck-plan-parallel.prompt.md +126 -0
- package/prompts/ck-plan-two.prompt.md +43 -0
- package/prompts/ck-plan-validate.prompt.md +118 -0
- package/prompts/ck-plan.prompt.md +29 -1
- package/prompts/ck-preview.prompt.md +65 -0
- package/prompts/ck-review-codebase.prompt.md +44 -0
- package/prompts/ck-scout-ext.prompt.md +35 -0
- package/prompts/ck-scout.prompt.md +25 -0
- package/prompts/ck-skill-add.prompt.md +36 -0
- package/prompts/ck-skill-create.prompt.md +29 -0
- package/prompts/ck-skill-fix-logs.prompt.md +22 -0
- package/prompts/ck-skill-optimize-auto.prompt.md +25 -0
- package/prompts/ck-skill-optimize.prompt.md +34 -0
- package/prompts/ck-skill-plan.prompt.md +46 -0
- package/prompts/ck-test-ui.prompt.md +92 -0
- package/prompts/ck-test.prompt.md +10 -0
- package/prompts/ck-use-mcp.prompt.md +27 -0
- package/prompts/ck-watzup.prompt.md +11 -0
- package/prompts/ck-worktree.prompt.md +127 -0
- package/rules/README.agents.md +55 -0
- package/rules/README.collections.md +78 -0
- package/rules/README.copilot-instructions.md +66 -0
- package/rules/README.instructions.md +73 -0
- package/rules/README.md +39 -0
- package/rules/README.prompts.md +76 -0
- package/rules/README.skills.md +71 -0
- package/skills/ck-ai-artist/SKILL.md +73 -0
- package/skills/ck-ai-artist/references/advanced-techniques.md +184 -0
- package/skills/ck-ai-artist/references/domain-code.md +66 -0
- package/skills/ck-ai-artist/references/domain-data.md +72 -0
- package/skills/ck-ai-artist/references/domain-marketing.md +66 -0
- package/skills/ck-ai-artist/references/domain-patterns.md +33 -0
- package/skills/ck-ai-artist/references/domain-writing.md +68 -0
- package/skills/ck-ai-artist/references/image-prompting.md +141 -0
- package/skills/ck-ai-artist/references/llm-prompting.md +165 -0
- package/skills/ck-ai-artist/references/nano-banana.md +59 -0
- package/skills/ck-ai-artist/references/reasoning-techniques.md +201 -0
- package/skills/ck-backend-development/SKILL.md +93 -0
- package/skills/ck-backend-development/references/backend-api-design.md +495 -0
- package/skills/ck-backend-development/references/backend-architecture.md +454 -0
- package/skills/ck-backend-development/references/backend-authentication.md +338 -0
- package/skills/ck-backend-development/references/backend-code-quality.md +659 -0
- package/skills/ck-backend-development/references/backend-debugging.md +904 -0
- package/skills/ck-backend-development/references/backend-devops.md +494 -0
- package/skills/ck-backend-development/references/backend-mindset.md +387 -0
- package/skills/ck-backend-development/references/backend-performance.md +397 -0
- package/skills/ck-backend-development/references/backend-security.md +290 -0
- package/skills/ck-backend-development/references/backend-technologies.md +256 -0
- package/skills/ck-backend-development/references/backend-testing.md +429 -0
- package/skills/ck-better-auth/SKILL.md +202 -0
- package/skills/ck-better-auth/references/advanced-features.md +553 -0
- package/skills/ck-better-auth/references/database-integration.md +577 -0
- package/skills/ck-better-auth/references/email-password-auth.md +416 -0
- package/skills/ck-better-auth/references/oauth-providers.md +430 -0
- package/skills/ck-better-auth/scripts/.coverage +0 -0
- package/skills/ck-better-auth/scripts/better_auth_init.py +521 -0
- package/skills/ck-better-auth/scripts/requirements.txt +15 -0
- package/skills/ck-better-auth/scripts/tests/.coverage +0 -0
- package/skills/ck-better-auth/scripts/tests/test_better_auth_init.py +421 -0
- package/skills/ck-chrome-devtools/SKILL.md +470 -0
- package/skills/ck-chrome-devtools/references/cdp-domains.md +694 -0
- package/skills/ck-chrome-devtools/references/performance-guide.md +940 -0
- package/skills/ck-chrome-devtools/references/puppeteer-reference.md +953 -0
- package/skills/ck-chrome-devtools/scripts/README.md +272 -0
- package/skills/ck-chrome-devtools/scripts/__tests__/selector.test.js +210 -0
- package/skills/ck-chrome-devtools/scripts/aria-snapshot.js +362 -0
- package/skills/ck-chrome-devtools/scripts/click.js +83 -0
- package/skills/ck-chrome-devtools/scripts/console.js +79 -0
- package/skills/ck-chrome-devtools/scripts/evaluate.js +53 -0
- package/skills/ck-chrome-devtools/scripts/fill.js +76 -0
- package/skills/ck-chrome-devtools/scripts/inject-auth.js +229 -0
- package/skills/ck-chrome-devtools/scripts/install-deps.sh +181 -0
- package/skills/ck-chrome-devtools/scripts/install.sh +83 -0
- package/skills/ck-chrome-devtools/scripts/lib/browser.js +318 -0
- package/skills/ck-chrome-devtools/scripts/lib/selector.js +178 -0
- package/skills/ck-chrome-devtools/scripts/navigate.js +54 -0
- package/skills/ck-chrome-devtools/scripts/network.js +106 -0
- package/skills/ck-chrome-devtools/scripts/package-lock.json +1589 -0
- package/skills/ck-chrome-devtools/scripts/package.json +16 -0
- package/skills/ck-chrome-devtools/scripts/performance.js +149 -0
- package/skills/ck-chrome-devtools/scripts/screenshot.js +198 -0
- package/skills/ck-chrome-devtools/scripts/select-ref.js +131 -0
- package/skills/ck-chrome-devtools/scripts/snapshot.js +135 -0
- package/skills/ck-code-review/SKILL.md +110 -53
- package/skills/ck-code-review/references/code-review-reception.md +182 -49
- package/skills/ck-code-review/references/requesting-code-review.md +105 -0
- package/skills/ck-code-review/references/verification-before-completion.md +111 -58
- package/skills/ck-databases/SKILL.md +231 -0
- package/skills/ck-databases/references/mongodb-aggregation.md +447 -0
- package/skills/ck-databases/references/mongodb-atlas.md +465 -0
- package/skills/ck-databases/references/mongodb-crud.md +408 -0
- package/skills/ck-databases/references/mongodb-indexing.md +442 -0
- package/skills/ck-databases/references/postgresql-administration.md +594 -0
- package/skills/ck-databases/references/postgresql-performance.md +527 -0
- package/skills/ck-databases/references/postgresql-psql-cli.md +467 -0
- package/skills/ck-databases/references/postgresql-queries.md +475 -0
- package/skills/ck-databases/scripts/.coverage +0 -0
- package/skills/ck-databases/scripts/db_backup.py +502 -0
- package/skills/ck-databases/scripts/db_migrate.py +425 -0
- package/skills/ck-databases/scripts/db_performance_check.py +456 -0
- package/skills/ck-databases/scripts/requirements.txt +20 -0
- package/skills/ck-databases/scripts/tests/coverage-db.json +1 -0
- package/skills/ck-databases/scripts/tests/requirements.txt +4 -0
- package/skills/ck-databases/scripts/tests/test_db_backup.py +340 -0
- package/skills/ck-databases/scripts/tests/test_db_migrate.py +277 -0
- package/skills/ck-databases/scripts/tests/test_db_performance_check.py +370 -0
- package/skills/ck-debugging/SKILL.md +55 -43
- package/skills/ck-debugging/references/defense-in-depth.md +124 -0
- package/skills/ck-debugging/references/root-cause-tracing.md +100 -43
- package/skills/ck-debugging/references/systematic-debugging.md +80 -52
- package/skills/ck-debugging/references/verification.md +101 -52
- package/skills/ck-debugging/scripts/find-polluter.sh +63 -0
- package/skills/ck-debugging/scripts/find-polluter.test.md +102 -0
- package/skills/ck-devops/.env.example +76 -0
- package/skills/ck-devops/SKILL.md +283 -0
- package/skills/ck-devops/references/browser-rendering.md +305 -0
- package/skills/ck-devops/references/cloudflare-d1-kv.md +123 -0
- package/skills/ck-devops/references/cloudflare-platform.md +271 -0
- package/skills/ck-devops/references/cloudflare-r2-storage.md +280 -0
- package/skills/ck-devops/references/cloudflare-workers-advanced.md +312 -0
- package/skills/ck-devops/references/cloudflare-workers-apis.md +309 -0
- package/skills/ck-devops/references/cloudflare-workers-basics.md +418 -0
- package/skills/ck-devops/references/docker-basics.md +297 -0
- package/skills/ck-devops/references/docker-compose.md +292 -0
- package/skills/ck-devops/references/gcloud-platform.md +297 -0
- package/skills/ck-devops/references/gcloud-services.md +304 -0
- package/skills/ck-devops/scripts/cloudflare_deploy.py +269 -0
- package/skills/ck-devops/scripts/docker_optimize.py +331 -0
- package/skills/ck-devops/scripts/requirements.txt +20 -0
- package/skills/ck-devops/scripts/tests/requirements.txt +3 -0
- package/skills/ck-devops/scripts/tests/test_cloudflare_deploy.py +285 -0
- package/skills/ck-devops/scripts/tests/test_docker_optimize.py +436 -0
- package/skills/ck-docs-seeker/.env.example +15 -0
- package/skills/ck-docs-seeker/SKILL.md +70 -65
- package/skills/ck-docs-seeker/package.json +25 -0
- package/skills/ck-docs-seeker/references/advanced.md +79 -0
- package/skills/ck-docs-seeker/references/context7-patterns.md +68 -0
- package/skills/ck-docs-seeker/references/errors.md +68 -0
- package/skills/ck-docs-seeker/scripts/analyze-llms-txt.js +211 -0
- package/skills/ck-docs-seeker/scripts/detect-topic.js +172 -0
- package/skills/ck-docs-seeker/scripts/fetch-docs.js +213 -0
- package/skills/ck-docs-seeker/scripts/tests/run-tests.js +72 -0
- package/skills/ck-docs-seeker/scripts/tests/test-analyze-llms.js +119 -0
- package/skills/ck-docs-seeker/scripts/tests/test-detect-topic.js +112 -0
- package/skills/ck-docs-seeker/scripts/tests/test-fetch-docs.js +84 -0
- package/skills/ck-docs-seeker/scripts/utils/env-loader.js +94 -0
- package/skills/ck-docs-seeker/workflows/library-search.md +87 -0
- package/skills/ck-docs-seeker/workflows/repo-analysis.md +91 -0
- package/skills/ck-docs-seeker/workflows/topic-search.md +77 -0
- package/skills/ck-frontend-design/SKILL.md +79 -0
- package/skills/ck-frontend-design/references/analysis-best-practices.md +80 -0
- package/skills/ck-frontend-design/references/analysis-prompts.md +141 -0
- package/skills/ck-frontend-design/references/analysis-techniques.md +118 -0
- package/skills/ck-frontend-design/references/animejs.md +396 -0
- package/skills/ck-frontend-design/references/design-extraction-overview.md +71 -0
- package/skills/ck-frontend-design/references/extraction-best-practices.md +141 -0
- package/skills/ck-frontend-design/references/extraction-output-templates.md +162 -0
- package/skills/ck-frontend-design/references/extraction-prompts.md +127 -0
- package/skills/ck-frontend-design/references/technical-accessibility.md +119 -0
- package/skills/ck-frontend-design/references/technical-best-practices.md +97 -0
- package/skills/ck-frontend-design/references/technical-optimization.md +44 -0
- package/skills/ck-frontend-design/references/technical-overview.md +90 -0
- package/skills/ck-frontend-design/references/technical-workflows.md +150 -0
- package/skills/ck-frontend-design/references/visual-analysis-overview.md +95 -0
- package/skills/ck-frontend-development/SKILL.md +399 -0
- package/skills/ck-frontend-development/resources/common-patterns.md +331 -0
- package/skills/ck-frontend-development/resources/complete-examples.md +872 -0
- package/skills/ck-frontend-development/resources/component-patterns.md +502 -0
- package/skills/ck-frontend-development/resources/data-fetching.md +767 -0
- package/skills/ck-frontend-development/resources/file-organization.md +502 -0
- package/skills/ck-frontend-development/resources/loading-and-error-states.md +501 -0
- package/skills/ck-frontend-development/resources/performance.md +406 -0
- package/skills/ck-frontend-development/resources/routing-guide.md +364 -0
- package/skills/ck-frontend-development/resources/styling-guide.md +428 -0
- package/skills/ck-frontend-development/resources/typescript-standards.md +418 -0
- package/skills/ck-markdown-novel-viewer/SKILL.md +190 -0
- package/skills/ck-markdown-novel-viewer/assets/directory-browser.css +215 -0
- package/skills/ck-markdown-novel-viewer/assets/favicon.png +0 -0
- package/skills/ck-markdown-novel-viewer/assets/novel-theme.css +818 -0
- package/skills/ck-markdown-novel-viewer/assets/reader.js +262 -0
- package/skills/ck-markdown-novel-viewer/assets/template.html +80 -0
- package/skills/ck-markdown-novel-viewer/package.json +15 -0
- package/skills/ck-markdown-novel-viewer/scripts/lib/http-server.cjs +434 -0
- package/skills/ck-markdown-novel-viewer/scripts/lib/markdown-renderer.cjs +272 -0
- package/skills/ck-markdown-novel-viewer/scripts/lib/plan-navigator.cjs +509 -0
- package/skills/ck-markdown-novel-viewer/scripts/lib/port-finder.cjs +48 -0
- package/skills/ck-markdown-novel-viewer/scripts/lib/process-mgr.cjs +150 -0
- package/skills/ck-markdown-novel-viewer/scripts/server.cjs +411 -0
- package/skills/ck-markdown-novel-viewer/scripts/tests/server.test.cjs +283 -0
- package/skills/ck-markdown-novel-viewer/tests/dashboard-assets.test.cjs +340 -0
- package/skills/ck-markdown-novel-viewer/tests/dashboard-renderer.test.cjs +404 -0
- package/skills/ck-markdown-novel-viewer/tests/http-server.test.cjs +271 -0
- package/skills/ck-markdown-novel-viewer/tests/run-tests.cjs +51 -0
- package/skills/ck-markdown-novel-viewer/tests/test-framework.cjs +154 -0
- package/skills/ck-markdown-novel-viewer/tests/verify-xss.cjs +90 -0
- package/skills/ck-mcp-builder/LICENSE.txt +202 -0
- package/skills/ck-mcp-builder/SKILL.md +327 -0
- package/skills/ck-mcp-builder/reference/evaluation.md +602 -0
- package/skills/ck-mcp-builder/reference/mcp_best_practices.md +915 -0
- package/skills/ck-mcp-builder/reference/node_mcp_server.md +916 -0
- package/skills/ck-mcp-builder/reference/python_mcp_server.md +752 -0
- package/skills/ck-mcp-builder/scripts/connections.py +151 -0
- package/skills/ck-mcp-builder/scripts/evaluation.py +373 -0
- package/skills/ck-mcp-builder/scripts/example_evaluation.xml +22 -0
- package/skills/ck-mcp-builder/scripts/requirements.txt +2 -0
- package/skills/ck-mcp-management/README.md +219 -0
- package/skills/ck-mcp-management/SKILL.md +209 -0
- package/skills/ck-mcp-management/assets/tools.json +3146 -0
- package/skills/ck-mcp-management/references/configuration.md +114 -0
- package/skills/ck-mcp-management/references/gemini-cli-integration.md +215 -0
- package/skills/ck-mcp-management/references/mcp-protocol.md +116 -0
- package/skills/ck-mcp-management/scripts/.env.example +10 -0
- package/skills/ck-mcp-management/scripts/cli.ts +195 -0
- package/skills/ck-mcp-management/scripts/dist/analyze-tools.js +70 -0
- package/skills/ck-mcp-management/scripts/dist/cli.js +160 -0
- package/skills/ck-mcp-management/scripts/dist/mcp-client.js +183 -0
- package/skills/ck-mcp-management/scripts/mcp-client.ts +230 -0
- package/skills/ck-mcp-management/scripts/package.json +20 -0
- package/skills/ck-mcp-management/scripts/tsconfig.json +15 -0
- package/skills/ck-media-processing/SKILL.md +90 -0
- package/skills/ck-media-processing/references/common-workflows.md +132 -0
- package/skills/ck-media-processing/references/ffmpeg-encoding.md +358 -0
- package/skills/ck-media-processing/references/ffmpeg-filters.md +503 -0
- package/skills/ck-media-processing/references/ffmpeg-streaming.md +403 -0
- package/skills/ck-media-processing/references/format-compatibility.md +375 -0
- package/skills/ck-media-processing/references/imagemagick-batch.md +612 -0
- package/skills/ck-media-processing/references/imagemagick-editing.md +623 -0
- package/skills/ck-media-processing/references/rmbg-background-removal.md +66 -0
- package/skills/ck-media-processing/references/troubleshooting.md +109 -0
- package/skills/ck-media-processing/scripts/README.md +111 -0
- package/skills/ck-media-processing/scripts/batch-remove-background.sh +124 -0
- package/skills/ck-media-processing/scripts/batch_resize.py +342 -0
- package/skills/ck-media-processing/scripts/media_convert.py +311 -0
- package/skills/ck-media-processing/scripts/remove-background.sh +96 -0
- package/skills/ck-media-processing/scripts/remove-bg-node.js +158 -0
- package/skills/ck-media-processing/scripts/requirements.txt +24 -0
- package/skills/ck-media-processing/scripts/tests/.coverage +0 -0
- package/skills/ck-media-processing/scripts/tests/requirements.txt +2 -0
- package/skills/ck-media-processing/scripts/tests/test_batch_resize.py +372 -0
- package/skills/ck-media-processing/scripts/tests/test_media_convert.py +259 -0
- package/skills/ck-media-processing/scripts/tests/test_video_optimize.py +397 -0
- package/skills/ck-media-processing/scripts/video_optimize.py +414 -0
- package/skills/ck-mobile-development/SKILL.md +210 -0
- package/skills/ck-mobile-development/references/mobile-android.md +604 -0
- package/skills/ck-mobile-development/references/mobile-best-practices.md +545 -0
- package/skills/ck-mobile-development/references/mobile-debugging.md +1089 -0
- package/skills/ck-mobile-development/references/mobile-frameworks.md +465 -0
- package/skills/ck-mobile-development/references/mobile-ios.md +496 -0
- package/skills/ck-mobile-development/references/mobile-mindset.md +544 -0
- package/skills/ck-payment-integration/README.md +185 -0
- package/skills/ck-payment-integration/SKILL.md +116 -0
- package/skills/ck-payment-integration/references/polar/benefits.md +396 -0
- package/skills/ck-payment-integration/references/polar/best-practices.md +482 -0
- package/skills/ck-payment-integration/references/polar/checkouts.md +266 -0
- package/skills/ck-payment-integration/references/polar/overview.md +184 -0
- package/skills/ck-payment-integration/references/polar/products.md +244 -0
- package/skills/ck-payment-integration/references/polar/sdk.md +436 -0
- package/skills/ck-payment-integration/references/polar/subscriptions.md +340 -0
- package/skills/ck-payment-integration/references/polar/webhooks.md +405 -0
- package/skills/ck-payment-integration/references/sepay/api.md +140 -0
- package/skills/ck-payment-integration/references/sepay/best-practices.md +337 -0
- package/skills/ck-payment-integration/references/sepay/overview.md +138 -0
- package/skills/ck-payment-integration/references/sepay/qr-codes.md +228 -0
- package/skills/ck-payment-integration/references/sepay/sdk.md +213 -0
- package/skills/ck-payment-integration/references/sepay/webhooks.md +208 -0
- package/skills/ck-payment-integration/scripts/.env.example +20 -0
- package/skills/ck-payment-integration/scripts/checkout-helper.js +244 -0
- package/skills/ck-payment-integration/scripts/package.json +17 -0
- package/skills/ck-payment-integration/scripts/polar-webhook-verify.js +202 -0
- package/skills/ck-payment-integration/scripts/sepay-webhook-verify.js +193 -0
- package/skills/ck-payment-integration/scripts/test-scripts.js +237 -0
- package/skills/ck-planning/SKILL.md +79 -49
- package/skills/ck-planning/references/codebase-understanding.md +62 -0
- package/skills/ck-planning/references/output-standards.md +127 -0
- package/skills/ck-planning/references/plan-organization.md +122 -60
- package/skills/ck-planning/references/research-phase.md +49 -56
- package/skills/ck-planning/references/solution-design.md +61 -63
- package/skills/ck-problem-solving/SKILL.md +95 -0
- package/skills/ck-problem-solving/references/attribution.md +69 -0
- package/skills/ck-problem-solving/references/collision-zone-thinking.md +79 -0
- package/skills/ck-problem-solving/references/inversion-exercise.md +91 -0
- package/skills/ck-problem-solving/references/meta-pattern-recognition.md +87 -0
- package/skills/ck-problem-solving/references/scale-game.md +95 -0
- package/skills/ck-problem-solving/references/simplification-cascades.md +80 -0
- package/skills/ck-problem-solving/references/when-stuck.md +72 -0
- package/skills/ck-repomix/SKILL.md +247 -0
- package/skills/ck-repomix/references/configuration.md +211 -0
- package/skills/ck-repomix/references/usage-patterns.md +232 -0
- package/skills/ck-repomix/scripts/.coverage +0 -0
- package/skills/ck-repomix/scripts/README.md +179 -0
- package/skills/ck-repomix/scripts/repomix_batch.py +455 -0
- package/skills/ck-repomix/scripts/repos.example.json +15 -0
- package/skills/ck-repomix/scripts/requirements.txt +15 -0
- package/skills/ck-repomix/scripts/tests/test_repomix_batch.py +531 -0
- package/skills/ck-sequential-thinking/.env.example +8 -0
- package/skills/ck-sequential-thinking/README.md +183 -0
- package/skills/ck-sequential-thinking/SKILL.md +14 -2
- package/skills/ck-sequential-thinking/package.json +31 -0
- package/skills/ck-sequential-thinking/references/advanced-strategies.md +79 -0
- package/skills/ck-sequential-thinking/references/advanced-techniques.md +2 -14
- package/skills/ck-sequential-thinking/references/core-patterns.md +8 -0
- package/skills/ck-sequential-thinking/references/examples-api.md +88 -0
- package/skills/ck-sequential-thinking/references/examples-architecture.md +94 -0
- package/skills/ck-sequential-thinking/references/examples-debug.md +90 -0
- package/skills/ck-sequential-thinking/scripts/format-thought.js +159 -0
- package/skills/ck-sequential-thinking/scripts/process-thought.js +236 -0
- package/skills/ck-sequential-thinking/tests/format-thought.test.js +133 -0
- package/skills/ck-sequential-thinking/tests/process-thought.test.js +215 -0
- package/skills/ck-shopify/README.md +66 -0
- package/skills/ck-shopify/SKILL.md +319 -0
- package/skills/ck-shopify/references/app-development.md +470 -0
- package/skills/ck-shopify/references/extensions.md +493 -0
- package/skills/ck-shopify/references/themes.md +498 -0
- package/skills/ck-shopify/scripts/.coverage +0 -0
- package/skills/ck-shopify/scripts/requirements.txt +19 -0
- package/skills/ck-shopify/scripts/shopify_init.py +423 -0
- package/skills/ck-shopify/scripts/tests/.coverage +0 -0
- package/skills/ck-shopify/scripts/tests/test_shopify_init.py +385 -0
- package/skills/ck-skill-creator/LICENSE.txt +202 -0
- package/skills/ck-skill-creator/SKILL.md +265 -0
- package/skills/ck-skill-creator/scripts/init_skill.py +303 -0
- package/skills/ck-skill-creator/scripts/package_skill.py +110 -0
- package/skills/ck-skill-creator/scripts/quick_validate.py +65 -0
- package/skills/ck-threejs/SKILL.md +87 -0
- package/skills/ck-threejs/references/01-getting-started.md +177 -0
- package/skills/ck-threejs/references/02-loaders.md +169 -0
- package/skills/ck-threejs/references/03-textures.md +170 -0
- package/skills/ck-threejs/references/04-cameras.md +195 -0
- package/skills/ck-threejs/references/05-lights.md +183 -0
- package/skills/ck-threejs/references/06-animations.md +214 -0
- package/skills/ck-threejs/references/07-math.md +260 -0
- package/skills/ck-threejs/references/08-interaction.md +267 -0
- package/skills/ck-threejs/references/09-postprocessing.md +240 -0
- package/skills/ck-threejs/references/10-controls.md +259 -0
- package/skills/ck-threejs/references/11-materials-advanced.md +270 -0
- package/skills/ck-threejs/references/12-performance.md +269 -0
- package/skills/ck-threejs/references/13-node-materials.md +298 -0
- package/skills/ck-threejs/references/14-physics-vr.md +304 -0
- package/skills/ck-threejs/references/15-specialized-loaders.md +333 -0
- package/skills/ck-threejs/references/16-webgpu.md +302 -0
- package/skills/ck-ui-styling/LICENSE.txt +202 -0
- package/skills/ck-ui-styling/SKILL.md +319 -0
- package/skills/ck-ui-styling/canvas-fonts/ArsenalSC-OFL.txt +93 -0
- package/skills/ck-ui-styling/canvas-fonts/ArsenalSC-Regular.ttf +0 -0
- package/skills/ck-ui-styling/canvas-fonts/BigShoulders-Bold.ttf +0 -0
- package/skills/ck-ui-styling/canvas-fonts/BigShoulders-OFL.txt +93 -0
- package/skills/ck-ui-styling/canvas-fonts/BigShoulders-Regular.ttf +0 -0
- package/skills/ck-ui-styling/canvas-fonts/Boldonse-OFL.txt +93 -0
- package/skills/ck-ui-styling/canvas-fonts/Boldonse-Regular.ttf +0 -0
- package/skills/ck-ui-styling/canvas-fonts/BricolageGrotesque-Bold.ttf +0 -0
- package/skills/ck-ui-styling/canvas-fonts/BricolageGrotesque-OFL.txt +93 -0
- package/skills/ck-ui-styling/canvas-fonts/BricolageGrotesque-Regular.ttf +0 -0
- package/skills/ck-ui-styling/canvas-fonts/CrimsonPro-Bold.ttf +0 -0
- package/skills/ck-ui-styling/canvas-fonts/CrimsonPro-Italic.ttf +0 -0
- package/skills/ck-ui-styling/canvas-fonts/CrimsonPro-OFL.txt +93 -0
- package/skills/ck-ui-styling/canvas-fonts/CrimsonPro-Regular.ttf +0 -0
- package/skills/ck-ui-styling/canvas-fonts/DMMono-OFL.txt +93 -0
- package/skills/ck-ui-styling/canvas-fonts/DMMono-Regular.ttf +0 -0
- package/skills/ck-ui-styling/canvas-fonts/EricaOne-OFL.txt +94 -0
- package/skills/ck-ui-styling/canvas-fonts/EricaOne-Regular.ttf +0 -0
- package/skills/ck-ui-styling/canvas-fonts/GeistMono-Bold.ttf +0 -0
- package/skills/ck-ui-styling/canvas-fonts/GeistMono-OFL.txt +93 -0
- package/skills/ck-ui-styling/canvas-fonts/GeistMono-Regular.ttf +0 -0
- package/skills/ck-ui-styling/canvas-fonts/Gloock-OFL.txt +93 -0
- package/skills/ck-ui-styling/canvas-fonts/Gloock-Regular.ttf +0 -0
- package/skills/ck-ui-styling/canvas-fonts/IBMPlexMono-Bold.ttf +0 -0
- package/skills/ck-ui-styling/canvas-fonts/IBMPlexMono-OFL.txt +93 -0
- package/skills/ck-ui-styling/canvas-fonts/IBMPlexMono-Regular.ttf +0 -0
- package/skills/ck-ui-styling/canvas-fonts/IBMPlexSerif-Bold.ttf +0 -0
- package/skills/ck-ui-styling/canvas-fonts/IBMPlexSerif-BoldItalic.ttf +0 -0
- package/skills/ck-ui-styling/canvas-fonts/IBMPlexSerif-Italic.ttf +0 -0
- package/skills/ck-ui-styling/canvas-fonts/IBMPlexSerif-Regular.ttf +0 -0
- package/skills/ck-ui-styling/canvas-fonts/InstrumentSans-Bold.ttf +0 -0
- package/skills/ck-ui-styling/canvas-fonts/InstrumentSans-BoldItalic.ttf +0 -0
- package/skills/ck-ui-styling/canvas-fonts/InstrumentSans-Italic.ttf +0 -0
- package/skills/ck-ui-styling/canvas-fonts/InstrumentSans-OFL.txt +93 -0
- package/skills/ck-ui-styling/canvas-fonts/InstrumentSans-Regular.ttf +0 -0
- package/skills/ck-ui-styling/canvas-fonts/InstrumentSerif-Italic.ttf +0 -0
- package/skills/ck-ui-styling/canvas-fonts/InstrumentSerif-Regular.ttf +0 -0
- package/skills/ck-ui-styling/canvas-fonts/Italiana-OFL.txt +93 -0
- package/skills/ck-ui-styling/canvas-fonts/Italiana-Regular.ttf +0 -0
- package/skills/ck-ui-styling/canvas-fonts/JetBrainsMono-Bold.ttf +0 -0
- package/skills/ck-ui-styling/canvas-fonts/JetBrainsMono-OFL.txt +93 -0
- package/skills/ck-ui-styling/canvas-fonts/JetBrainsMono-Regular.ttf +0 -0
- package/skills/ck-ui-styling/canvas-fonts/Jura-Light.ttf +0 -0
- package/skills/ck-ui-styling/canvas-fonts/Jura-Medium.ttf +0 -0
- package/skills/ck-ui-styling/canvas-fonts/Jura-OFL.txt +93 -0
- package/skills/ck-ui-styling/canvas-fonts/LibreBaskerville-OFL.txt +93 -0
- package/skills/ck-ui-styling/canvas-fonts/LibreBaskerville-Regular.ttf +0 -0
- package/skills/ck-ui-styling/canvas-fonts/Lora-Bold.ttf +0 -0
- package/skills/ck-ui-styling/canvas-fonts/Lora-BoldItalic.ttf +0 -0
- package/skills/ck-ui-styling/canvas-fonts/Lora-Italic.ttf +0 -0
- package/skills/ck-ui-styling/canvas-fonts/Lora-OFL.txt +93 -0
- package/skills/ck-ui-styling/canvas-fonts/Lora-Regular.ttf +0 -0
- package/skills/ck-ui-styling/canvas-fonts/NationalPark-Bold.ttf +0 -0
- package/skills/ck-ui-styling/canvas-fonts/NationalPark-OFL.txt +93 -0
- package/skills/ck-ui-styling/canvas-fonts/NationalPark-Regular.ttf +0 -0
- package/skills/ck-ui-styling/canvas-fonts/NothingYouCouldDo-OFL.txt +93 -0
- package/skills/ck-ui-styling/canvas-fonts/NothingYouCouldDo-Regular.ttf +0 -0
- package/skills/ck-ui-styling/canvas-fonts/Outfit-Bold.ttf +0 -0
- package/skills/ck-ui-styling/canvas-fonts/Outfit-OFL.txt +93 -0
- package/skills/ck-ui-styling/canvas-fonts/Outfit-Regular.ttf +0 -0
- package/skills/ck-ui-styling/canvas-fonts/PixelifySans-Medium.ttf +0 -0
- package/skills/ck-ui-styling/canvas-fonts/PixelifySans-OFL.txt +93 -0
- package/skills/ck-ui-styling/canvas-fonts/PoiretOne-OFL.txt +93 -0
- package/skills/ck-ui-styling/canvas-fonts/PoiretOne-Regular.ttf +0 -0
- package/skills/ck-ui-styling/canvas-fonts/RedHatMono-Bold.ttf +0 -0
- package/skills/ck-ui-styling/canvas-fonts/RedHatMono-OFL.txt +93 -0
- package/skills/ck-ui-styling/canvas-fonts/RedHatMono-Regular.ttf +0 -0
- package/skills/ck-ui-styling/canvas-fonts/Silkscreen-OFL.txt +93 -0
- package/skills/ck-ui-styling/canvas-fonts/Silkscreen-Regular.ttf +0 -0
- package/skills/ck-ui-styling/canvas-fonts/SmoochSans-Medium.ttf +0 -0
- package/skills/ck-ui-styling/canvas-fonts/SmoochSans-OFL.txt +93 -0
- package/skills/ck-ui-styling/canvas-fonts/Tektur-Medium.ttf +0 -0
- package/skills/ck-ui-styling/canvas-fonts/Tektur-OFL.txt +93 -0
- package/skills/ck-ui-styling/canvas-fonts/Tektur-Regular.ttf +0 -0
- package/skills/ck-ui-styling/canvas-fonts/WorkSans-Bold.ttf +0 -0
- package/skills/ck-ui-styling/canvas-fonts/WorkSans-BoldItalic.ttf +0 -0
- package/skills/ck-ui-styling/canvas-fonts/WorkSans-Italic.ttf +0 -0
- package/skills/ck-ui-styling/canvas-fonts/WorkSans-OFL.txt +93 -0
- package/skills/ck-ui-styling/canvas-fonts/WorkSans-Regular.ttf +0 -0
- package/skills/ck-ui-styling/canvas-fonts/YoungSerif-OFL.txt +93 -0
- package/skills/ck-ui-styling/canvas-fonts/YoungSerif-Regular.ttf +0 -0
- package/skills/ck-ui-styling/references/canvas-design-system.md +320 -0
- package/skills/ck-ui-styling/references/shadcn-accessibility.md +471 -0
- package/skills/ck-ui-styling/references/shadcn-components.md +424 -0
- package/skills/ck-ui-styling/references/shadcn-theming.md +373 -0
- package/skills/ck-ui-styling/references/tailwind-customization.md +483 -0
- package/skills/ck-ui-styling/references/tailwind-responsive.md +382 -0
- package/skills/ck-ui-styling/references/tailwind-utilities.md +455 -0
- package/skills/ck-ui-styling/scripts/.coverage +0 -0
- package/skills/ck-ui-styling/scripts/requirements.txt +17 -0
- package/skills/ck-ui-styling/scripts/shadcn_add.py +292 -0
- package/skills/ck-ui-styling/scripts/tailwind_config_gen.py +456 -0
- package/skills/ck-ui-styling/scripts/tests/coverage-ui.json +1 -0
- package/skills/ck-ui-styling/scripts/tests/requirements.txt +3 -0
- package/skills/ck-ui-styling/scripts/tests/test_shadcn_add.py +266 -0
- package/skills/ck-ui-styling/scripts/tests/test_tailwind_config_gen.py +336 -0
- package/skills/ck-ui-ux-pro-max/SKILL.md +227 -0
- package/skills/ck-ui-ux-pro-max/data/charts.csv +26 -0
- package/skills/ck-ui-ux-pro-max/data/colors.csv +97 -0
- package/skills/ck-ui-ux-pro-max/data/landing.csv +31 -0
- package/skills/ck-ui-ux-pro-max/data/products.csv +97 -0
- package/skills/ck-ui-ux-pro-max/data/prompts.csv +24 -0
- package/skills/ck-ui-ux-pro-max/data/stacks/flutter.csv +53 -0
- package/skills/ck-ui-ux-pro-max/data/stacks/html-tailwind.csv +51 -0
- package/skills/ck-ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
- package/skills/ck-ui-ux-pro-max/data/stacks/react-native.csv +52 -0
- package/skills/ck-ui-ux-pro-max/data/stacks/react.csv +54 -0
- package/skills/ck-ui-ux-pro-max/data/stacks/svelte.csv +54 -0
- package/skills/ck-ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
- package/skills/ck-ui-ux-pro-max/data/stacks/vue.csv +50 -0
- package/skills/ck-ui-ux-pro-max/data/styles.csv +59 -0
- package/skills/ck-ui-ux-pro-max/data/typography.csv +58 -0
- package/skills/ck-ui-ux-pro-max/data/ux-guidelines.csv +100 -0
- package/skills/ck-ui-ux-pro-max/scripts/core.py +236 -0
- package/skills/ck-ui-ux-pro-max/scripts/search.py +76 -0
- package/skills/ck-web-frameworks/SKILL.md +322 -0
- package/skills/ck-web-frameworks/references/nextjs-app-router.md +465 -0
- package/skills/ck-web-frameworks/references/nextjs-data-fetching.md +459 -0
- package/skills/ck-web-frameworks/references/nextjs-optimization.md +511 -0
- package/skills/ck-web-frameworks/references/nextjs-server-components.md +495 -0
- package/skills/ck-web-frameworks/references/remix-icon-integration.md +603 -0
- package/skills/ck-web-frameworks/references/turborepo-caching.md +551 -0
- package/skills/ck-web-frameworks/references/turborepo-pipelines.md +517 -0
- package/skills/ck-web-frameworks/references/turborepo-setup.md +542 -0
- package/skills/ck-web-frameworks/scripts/.coverage +0 -0
- package/skills/ck-web-frameworks/scripts/__init__.py +0 -0
- package/skills/ck-web-frameworks/scripts/nextjs_init.py +547 -0
- package/skills/ck-web-frameworks/scripts/requirements.txt +16 -0
- package/skills/ck-web-frameworks/scripts/tests/coverage-web.json +1 -0
- package/skills/ck-web-frameworks/scripts/tests/requirements.txt +3 -0
- package/skills/ck-web-frameworks/scripts/tests/test_nextjs_init.py +319 -0
- package/skills/ck-web-frameworks/scripts/tests/test_turborepo_migrate.py +374 -0
- package/skills/ck-web-frameworks/scripts/turborepo_migrate.py +394 -0
- package/src/commands/init.js +61 -30
- package/src/utils/paths.js +35 -4
|
@@ -0,0 +1,414 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
Video size optimization with quality/size balance.
|
|
4
|
+
|
|
5
|
+
Supports resolution reduction, frame rate adjustment, audio bitrate optimization,
|
|
6
|
+
multi-pass encoding, and comparison metrics.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
import argparse
|
|
10
|
+
import json
|
|
11
|
+
import subprocess
|
|
12
|
+
import sys
|
|
13
|
+
from dataclasses import dataclass
|
|
14
|
+
from pathlib import Path
|
|
15
|
+
from typing import Optional, Tuple
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
@dataclass
|
|
19
|
+
class VideoInfo:
|
|
20
|
+
"""Video file information."""
|
|
21
|
+
path: Path
|
|
22
|
+
duration: float
|
|
23
|
+
width: int
|
|
24
|
+
height: int
|
|
25
|
+
bitrate: int
|
|
26
|
+
fps: float
|
|
27
|
+
size: int
|
|
28
|
+
codec: str
|
|
29
|
+
audio_codec: str
|
|
30
|
+
audio_bitrate: int
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class VideoOptimizer:
|
|
34
|
+
"""Handle video optimization operations using FFmpeg."""
|
|
35
|
+
|
|
36
|
+
def __init__(self, verbose: bool = False, dry_run: bool = False):
|
|
37
|
+
self.verbose = verbose
|
|
38
|
+
self.dry_run = dry_run
|
|
39
|
+
|
|
40
|
+
def check_ffmpeg(self) -> bool:
|
|
41
|
+
"""Check if FFmpeg is available."""
|
|
42
|
+
try:
|
|
43
|
+
subprocess.run(
|
|
44
|
+
['ffmpeg', '-version'],
|
|
45
|
+
stdout=subprocess.DEVNULL,
|
|
46
|
+
stderr=subprocess.DEVNULL,
|
|
47
|
+
check=True
|
|
48
|
+
)
|
|
49
|
+
return True
|
|
50
|
+
except (subprocess.CalledProcessError, FileNotFoundError):
|
|
51
|
+
return False
|
|
52
|
+
|
|
53
|
+
def get_video_info(self, input_path: Path) -> Optional[VideoInfo]:
|
|
54
|
+
"""Extract video information using ffprobe."""
|
|
55
|
+
try:
|
|
56
|
+
cmd = [
|
|
57
|
+
'ffprobe',
|
|
58
|
+
'-v', 'quiet',
|
|
59
|
+
'-print_format', 'json',
|
|
60
|
+
'-show_format',
|
|
61
|
+
'-show_streams',
|
|
62
|
+
str(input_path)
|
|
63
|
+
]
|
|
64
|
+
|
|
65
|
+
result = subprocess.run(cmd, capture_output=True, check=True)
|
|
66
|
+
data = json.loads(result.stdout)
|
|
67
|
+
|
|
68
|
+
# Find video and audio streams
|
|
69
|
+
video_stream = None
|
|
70
|
+
audio_stream = None
|
|
71
|
+
|
|
72
|
+
for stream in data['streams']:
|
|
73
|
+
if stream['codec_type'] == 'video' and not video_stream:
|
|
74
|
+
video_stream = stream
|
|
75
|
+
elif stream['codec_type'] == 'audio' and not audio_stream:
|
|
76
|
+
audio_stream = stream
|
|
77
|
+
|
|
78
|
+
if not video_stream:
|
|
79
|
+
return None
|
|
80
|
+
|
|
81
|
+
# Parse frame rate
|
|
82
|
+
fps_parts = video_stream.get('r_frame_rate', '0/1').split('/')
|
|
83
|
+
fps = float(fps_parts[0]) / float(fps_parts[1]) if len(fps_parts) == 2 else 0
|
|
84
|
+
|
|
85
|
+
return VideoInfo(
|
|
86
|
+
path=input_path,
|
|
87
|
+
duration=float(data['format'].get('duration', 0)),
|
|
88
|
+
width=int(video_stream.get('width', 0)),
|
|
89
|
+
height=int(video_stream.get('height', 0)),
|
|
90
|
+
bitrate=int(data['format'].get('bit_rate', 0)),
|
|
91
|
+
fps=fps,
|
|
92
|
+
size=int(data['format'].get('size', 0)),
|
|
93
|
+
codec=video_stream.get('codec_name', 'unknown'),
|
|
94
|
+
audio_codec=audio_stream.get('codec_name', 'none') if audio_stream else 'none',
|
|
95
|
+
audio_bitrate=int(audio_stream.get('bit_rate', 0)) if audio_stream else 0
|
|
96
|
+
)
|
|
97
|
+
|
|
98
|
+
except Exception as e:
|
|
99
|
+
print(f"Error getting video info: {e}", file=sys.stderr)
|
|
100
|
+
return None
|
|
101
|
+
|
|
102
|
+
def calculate_target_resolution(
|
|
103
|
+
self,
|
|
104
|
+
width: int,
|
|
105
|
+
height: int,
|
|
106
|
+
max_width: Optional[int],
|
|
107
|
+
max_height: Optional[int]
|
|
108
|
+
) -> Tuple[int, int]:
|
|
109
|
+
"""Calculate target resolution maintaining aspect ratio."""
|
|
110
|
+
if not max_width and not max_height:
|
|
111
|
+
return width, height
|
|
112
|
+
|
|
113
|
+
aspect_ratio = width / height
|
|
114
|
+
|
|
115
|
+
if max_width and max_height:
|
|
116
|
+
# Fit within both constraints
|
|
117
|
+
if width > max_width or height > max_height:
|
|
118
|
+
if width / max_width > height / max_height:
|
|
119
|
+
new_width = max_width
|
|
120
|
+
new_height = int(max_width / aspect_ratio)
|
|
121
|
+
else:
|
|
122
|
+
new_height = max_height
|
|
123
|
+
new_width = int(max_height * aspect_ratio)
|
|
124
|
+
else:
|
|
125
|
+
new_width, new_height = width, height
|
|
126
|
+
elif max_width:
|
|
127
|
+
new_width = min(width, max_width)
|
|
128
|
+
new_height = int(new_width / aspect_ratio)
|
|
129
|
+
else:
|
|
130
|
+
new_height = min(height, max_height)
|
|
131
|
+
new_width = int(new_height * aspect_ratio)
|
|
132
|
+
|
|
133
|
+
# Ensure dimensions are even (required by some codecs)
|
|
134
|
+
new_width = new_width - (new_width % 2)
|
|
135
|
+
new_height = new_height - (new_height % 2)
|
|
136
|
+
|
|
137
|
+
return new_width, new_height
|
|
138
|
+
|
|
139
|
+
def optimize_video(
|
|
140
|
+
self,
|
|
141
|
+
input_path: Path,
|
|
142
|
+
output_path: Path,
|
|
143
|
+
max_width: Optional[int] = None,
|
|
144
|
+
max_height: Optional[int] = None,
|
|
145
|
+
target_fps: Optional[float] = None,
|
|
146
|
+
crf: int = 23,
|
|
147
|
+
audio_bitrate: str = '128k',
|
|
148
|
+
preset: str = 'medium',
|
|
149
|
+
two_pass: bool = False
|
|
150
|
+
) -> bool:
|
|
151
|
+
"""Optimize a video file."""
|
|
152
|
+
# Get input video info
|
|
153
|
+
info = self.get_video_info(input_path)
|
|
154
|
+
if not info:
|
|
155
|
+
print(f"Error: Could not read video info for {input_path}", file=sys.stderr)
|
|
156
|
+
return False
|
|
157
|
+
|
|
158
|
+
if self.verbose:
|
|
159
|
+
print(f"\nInput video info:")
|
|
160
|
+
print(f" Resolution: {info.width}x{info.height}")
|
|
161
|
+
print(f" FPS: {info.fps:.2f}")
|
|
162
|
+
print(f" Bitrate: {info.bitrate // 1000} kbps")
|
|
163
|
+
print(f" Size: {info.size / (1024*1024):.2f} MB")
|
|
164
|
+
|
|
165
|
+
# Calculate target resolution
|
|
166
|
+
target_width, target_height = self.calculate_target_resolution(
|
|
167
|
+
info.width, info.height, max_width, max_height
|
|
168
|
+
)
|
|
169
|
+
|
|
170
|
+
# Build FFmpeg command
|
|
171
|
+
cmd = ['ffmpeg', '-i', str(input_path)]
|
|
172
|
+
|
|
173
|
+
# Video filters
|
|
174
|
+
filters = []
|
|
175
|
+
if target_width != info.width or target_height != info.height:
|
|
176
|
+
filters.append(f'scale={target_width}:{target_height}')
|
|
177
|
+
|
|
178
|
+
if filters:
|
|
179
|
+
cmd.extend(['-vf', ','.join(filters)])
|
|
180
|
+
|
|
181
|
+
# Frame rate adjustment
|
|
182
|
+
if target_fps and target_fps < info.fps:
|
|
183
|
+
cmd.extend(['-r', str(target_fps)])
|
|
184
|
+
|
|
185
|
+
# Video encoding
|
|
186
|
+
if two_pass:
|
|
187
|
+
# Two-pass encoding for better quality
|
|
188
|
+
target_bitrate = int(info.bitrate * 0.7) # 30% reduction
|
|
189
|
+
|
|
190
|
+
# Pass 1
|
|
191
|
+
pass1_cmd = cmd + [
|
|
192
|
+
'-c:v', 'libx264',
|
|
193
|
+
'-preset', preset,
|
|
194
|
+
'-b:v', str(target_bitrate),
|
|
195
|
+
'-pass', '1',
|
|
196
|
+
'-an',
|
|
197
|
+
'-f', 'null',
|
|
198
|
+
'/dev/null' if sys.platform != 'win32' else 'NUL'
|
|
199
|
+
]
|
|
200
|
+
|
|
201
|
+
if self.verbose or self.dry_run:
|
|
202
|
+
print(f"Pass 1: {' '.join(pass1_cmd)}")
|
|
203
|
+
|
|
204
|
+
if not self.dry_run:
|
|
205
|
+
try:
|
|
206
|
+
subprocess.run(pass1_cmd, check=True, capture_output=not self.verbose)
|
|
207
|
+
except subprocess.CalledProcessError as e:
|
|
208
|
+
print(f"Error in pass 1: {e}", file=sys.stderr)
|
|
209
|
+
return False
|
|
210
|
+
|
|
211
|
+
# Pass 2
|
|
212
|
+
cmd.extend([
|
|
213
|
+
'-c:v', 'libx264',
|
|
214
|
+
'-preset', preset,
|
|
215
|
+
'-b:v', str(target_bitrate),
|
|
216
|
+
'-pass', '2'
|
|
217
|
+
])
|
|
218
|
+
else:
|
|
219
|
+
# Single-pass CRF encoding
|
|
220
|
+
cmd.extend([
|
|
221
|
+
'-c:v', 'libx264',
|
|
222
|
+
'-preset', preset,
|
|
223
|
+
'-crf', str(crf)
|
|
224
|
+
])
|
|
225
|
+
|
|
226
|
+
# Audio encoding
|
|
227
|
+
cmd.extend([
|
|
228
|
+
'-c:a', 'aac',
|
|
229
|
+
'-b:a', audio_bitrate
|
|
230
|
+
])
|
|
231
|
+
|
|
232
|
+
# Output
|
|
233
|
+
cmd.extend(['-movflags', '+faststart', '-y', str(output_path)])
|
|
234
|
+
|
|
235
|
+
if self.verbose or self.dry_run:
|
|
236
|
+
print(f"Command: {' '.join(cmd)}")
|
|
237
|
+
|
|
238
|
+
if self.dry_run:
|
|
239
|
+
return True
|
|
240
|
+
|
|
241
|
+
# Execute
|
|
242
|
+
try:
|
|
243
|
+
subprocess.run(cmd, check=True, capture_output=not self.verbose)
|
|
244
|
+
|
|
245
|
+
# Get output info
|
|
246
|
+
output_info = self.get_video_info(output_path)
|
|
247
|
+
if output_info and self.verbose:
|
|
248
|
+
print(f"\nOutput video info:")
|
|
249
|
+
print(f" Resolution: {output_info.width}x{output_info.height}")
|
|
250
|
+
print(f" FPS: {output_info.fps:.2f}")
|
|
251
|
+
print(f" Bitrate: {output_info.bitrate // 1000} kbps")
|
|
252
|
+
print(f" Size: {output_info.size / (1024*1024):.2f} MB")
|
|
253
|
+
reduction = (1 - output_info.size / info.size) * 100
|
|
254
|
+
print(f" Size reduction: {reduction:.1f}%")
|
|
255
|
+
|
|
256
|
+
return True
|
|
257
|
+
|
|
258
|
+
except subprocess.CalledProcessError as e:
|
|
259
|
+
print(f"Error optimizing video: {e}", file=sys.stderr)
|
|
260
|
+
return False
|
|
261
|
+
except Exception as e:
|
|
262
|
+
print(f"Error optimizing video: {e}", file=sys.stderr)
|
|
263
|
+
return False
|
|
264
|
+
finally:
|
|
265
|
+
# Clean up two-pass log files
|
|
266
|
+
if two_pass and not self.dry_run:
|
|
267
|
+
for log_file in Path('.').glob('ffmpeg2pass-*.log*'):
|
|
268
|
+
log_file.unlink(missing_ok=True)
|
|
269
|
+
|
|
270
|
+
def compare_videos(self, original: Path, optimized: Path) -> None:
|
|
271
|
+
"""Compare original and optimized videos."""
|
|
272
|
+
orig_info = self.get_video_info(original)
|
|
273
|
+
opt_info = self.get_video_info(optimized)
|
|
274
|
+
|
|
275
|
+
if not orig_info or not opt_info:
|
|
276
|
+
print("Error: Could not compare videos", file=sys.stderr)
|
|
277
|
+
return
|
|
278
|
+
|
|
279
|
+
print(f"\n{'Metric':<20} {'Original':<20} {'Optimized':<20} {'Change':<15}")
|
|
280
|
+
print("-" * 75)
|
|
281
|
+
|
|
282
|
+
# Resolution
|
|
283
|
+
orig_res = f"{orig_info.width}x{orig_info.height}"
|
|
284
|
+
opt_res = f"{opt_info.width}x{opt_info.height}"
|
|
285
|
+
print(f"{'Resolution':<20} {orig_res:<20} {opt_res:<20}")
|
|
286
|
+
|
|
287
|
+
# FPS
|
|
288
|
+
fps_change = opt_info.fps - orig_info.fps
|
|
289
|
+
print(f"{'FPS':<20} {orig_info.fps:<20.2f} {opt_info.fps:<20.2f} {fps_change:+.2f}")
|
|
290
|
+
|
|
291
|
+
# Bitrate
|
|
292
|
+
orig_br = f"{orig_info.bitrate // 1000} kbps"
|
|
293
|
+
opt_br = f"{opt_info.bitrate // 1000} kbps"
|
|
294
|
+
br_change = ((opt_info.bitrate / orig_info.bitrate) - 1) * 100
|
|
295
|
+
print(f"{'Bitrate':<20} {orig_br:<20} {opt_br:<20} {br_change:+.1f}%")
|
|
296
|
+
|
|
297
|
+
# Size
|
|
298
|
+
orig_size = f"{orig_info.size / (1024*1024):.2f} MB"
|
|
299
|
+
opt_size = f"{opt_info.size / (1024*1024):.2f} MB"
|
|
300
|
+
size_reduction = (1 - opt_info.size / orig_info.size) * 100
|
|
301
|
+
print(f"{'Size':<20} {orig_size:<20} {opt_size:<20} {-size_reduction:.1f}%")
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
def main():
|
|
305
|
+
"""Main entry point."""
|
|
306
|
+
parser = argparse.ArgumentParser(
|
|
307
|
+
description='Video size optimization with quality/size balance.'
|
|
308
|
+
)
|
|
309
|
+
parser.add_argument(
|
|
310
|
+
'input',
|
|
311
|
+
type=Path,
|
|
312
|
+
help='Input video file'
|
|
313
|
+
)
|
|
314
|
+
parser.add_argument(
|
|
315
|
+
'-o', '--output',
|
|
316
|
+
type=Path,
|
|
317
|
+
required=True,
|
|
318
|
+
help='Output video file'
|
|
319
|
+
)
|
|
320
|
+
parser.add_argument(
|
|
321
|
+
'-w', '--max-width',
|
|
322
|
+
type=int,
|
|
323
|
+
help='Maximum width in pixels'
|
|
324
|
+
)
|
|
325
|
+
parser.add_argument(
|
|
326
|
+
'-H', '--max-height',
|
|
327
|
+
type=int,
|
|
328
|
+
help='Maximum height in pixels'
|
|
329
|
+
)
|
|
330
|
+
parser.add_argument(
|
|
331
|
+
'--fps',
|
|
332
|
+
type=float,
|
|
333
|
+
help='Target frame rate'
|
|
334
|
+
)
|
|
335
|
+
parser.add_argument(
|
|
336
|
+
'--crf',
|
|
337
|
+
type=int,
|
|
338
|
+
default=23,
|
|
339
|
+
help='CRF quality (18-28, lower=better, default: 23)'
|
|
340
|
+
)
|
|
341
|
+
parser.add_argument(
|
|
342
|
+
'--audio-bitrate',
|
|
343
|
+
default='128k',
|
|
344
|
+
help='Audio bitrate (default: 128k)'
|
|
345
|
+
)
|
|
346
|
+
parser.add_argument(
|
|
347
|
+
'--preset',
|
|
348
|
+
choices=['ultrafast', 'superfast', 'veryfast', 'faster', 'fast',
|
|
349
|
+
'medium', 'slow', 'slower', 'veryslow'],
|
|
350
|
+
default='medium',
|
|
351
|
+
help='Encoding preset (default: medium)'
|
|
352
|
+
)
|
|
353
|
+
parser.add_argument(
|
|
354
|
+
'--two-pass',
|
|
355
|
+
action='store_true',
|
|
356
|
+
help='Use two-pass encoding (better quality)'
|
|
357
|
+
)
|
|
358
|
+
parser.add_argument(
|
|
359
|
+
'--compare',
|
|
360
|
+
action='store_true',
|
|
361
|
+
help='Compare original and optimized videos'
|
|
362
|
+
)
|
|
363
|
+
parser.add_argument(
|
|
364
|
+
'-n', '--dry-run',
|
|
365
|
+
action='store_true',
|
|
366
|
+
help='Show command without executing'
|
|
367
|
+
)
|
|
368
|
+
parser.add_argument(
|
|
369
|
+
'-v', '--verbose',
|
|
370
|
+
action='store_true',
|
|
371
|
+
help='Verbose output'
|
|
372
|
+
)
|
|
373
|
+
|
|
374
|
+
args = parser.parse_args()
|
|
375
|
+
|
|
376
|
+
# Validate input
|
|
377
|
+
if not args.input.exists():
|
|
378
|
+
print(f"Error: Input file not found: {args.input}", file=sys.stderr)
|
|
379
|
+
sys.exit(1)
|
|
380
|
+
|
|
381
|
+
# Initialize optimizer
|
|
382
|
+
optimizer = VideoOptimizer(verbose=args.verbose, dry_run=args.dry_run)
|
|
383
|
+
|
|
384
|
+
# Check dependencies
|
|
385
|
+
if not optimizer.check_ffmpeg():
|
|
386
|
+
print("Error: FFmpeg not found", file=sys.stderr)
|
|
387
|
+
sys.exit(1)
|
|
388
|
+
|
|
389
|
+
# Optimize video
|
|
390
|
+
print(f"Optimizing {args.input.name}...")
|
|
391
|
+
success = optimizer.optimize_video(
|
|
392
|
+
args.input,
|
|
393
|
+
args.output,
|
|
394
|
+
args.max_width,
|
|
395
|
+
args.max_height,
|
|
396
|
+
args.fps,
|
|
397
|
+
args.crf,
|
|
398
|
+
args.audio_bitrate,
|
|
399
|
+
args.preset,
|
|
400
|
+
args.two_pass
|
|
401
|
+
)
|
|
402
|
+
|
|
403
|
+
if not success:
|
|
404
|
+
sys.exit(1)
|
|
405
|
+
|
|
406
|
+
# Compare if requested
|
|
407
|
+
if args.compare and not args.dry_run:
|
|
408
|
+
optimizer.compare_videos(args.input, args.output)
|
|
409
|
+
|
|
410
|
+
print(f"\nOptimized video saved to: {args.output}")
|
|
411
|
+
|
|
412
|
+
|
|
413
|
+
if __name__ == '__main__':
|
|
414
|
+
main()
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: 'ck-mobile-development'
|
|
3
|
+
description: 'Build modern mobile applications with React Native, Flutter, Swift/SwiftUI, and Kotlin/Jetpack Compose. Covers mobile-first design principles, performance optimization (battery, memory, network), offline-first architecture, platform-specific guidelines (iOS HIG, Material Design), testing strategies, security best practices, accessibility, app store deployment, and mobile development mindset. Use when building mobile apps, implementing mobile UX patterns, optimizing for mobile constraints, or making native vs cross-platform decisions.'
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Mobile Development Skill
|
|
7
|
+
|
|
8
|
+
Production-ready mobile development with modern frameworks, best practices, and mobile-first thinking patterns.
|
|
9
|
+
|
|
10
|
+
## When to Use
|
|
11
|
+
|
|
12
|
+
- Building mobile applications (iOS, Android, or cross-platform)
|
|
13
|
+
- Implementing mobile-first design and UX patterns
|
|
14
|
+
- Optimizing for mobile constraints (battery, memory, network, small screens)
|
|
15
|
+
- Making native vs cross-platform technology decisions
|
|
16
|
+
- Implementing offline-first architecture and data sync
|
|
17
|
+
- Following platform-specific guidelines (iOS HIG, Material Design)
|
|
18
|
+
- Optimizing mobile app performance and user experience
|
|
19
|
+
- Implementing mobile security and authentication
|
|
20
|
+
- Testing mobile applications (unit, integration, E2E)
|
|
21
|
+
- Deploying to App Store and Google Play
|
|
22
|
+
|
|
23
|
+
## Technology Selection Guide
|
|
24
|
+
|
|
25
|
+
**Cross-Platform Frameworks:**
|
|
26
|
+
- **React Native**: JavaScript expertise, web code sharing, mature ecosystem (121K stars, 67% familiarity)
|
|
27
|
+
- **Flutter**: Performance-critical apps, complex animations, fastest-growing (170K stars, 46% adoption)
|
|
28
|
+
|
|
29
|
+
**Native Development:**
|
|
30
|
+
- **iOS (Swift/SwiftUI)**: Maximum iOS performance, latest features, Apple ecosystem integration
|
|
31
|
+
- **Android (Kotlin/Jetpack Compose)**: Maximum Android performance, Material Design 3, platform optimization
|
|
32
|
+
|
|
33
|
+
See: `references/mobile-frameworks.md` for detailed framework comparisons
|
|
34
|
+
|
|
35
|
+
## Mobile Development Mindset
|
|
36
|
+
|
|
37
|
+
**The 10 Commandments of Mobile Development:**
|
|
38
|
+
|
|
39
|
+
1. **Performance is Foundation, Not Feature** - 70% abandon apps >3s load time
|
|
40
|
+
2. **Every Kilobyte, Every Millisecond Matters** - Mobile constraints are real
|
|
41
|
+
3. **Offline-First by Default** - Network is unreliable, design for it
|
|
42
|
+
4. **User Context > Developer Environment** - Think real-world usage scenarios
|
|
43
|
+
5. **Platform Awareness Without Platform Lock-In** - Respect platform conventions
|
|
44
|
+
6. **Iterate, Don't Perfect** - Ship, measure, improve cycle is survival
|
|
45
|
+
7. **Security and Accessibility by Design** - Not afterthoughts
|
|
46
|
+
8. **Test on Real Devices** - Simulators lie about performance
|
|
47
|
+
9. **Architecture Scales with Complexity** - Don't over-engineer simple apps
|
|
48
|
+
10. **Continuous Learning is Survival** - Mobile landscape evolves rapidly
|
|
49
|
+
|
|
50
|
+
See: `references/mobile-mindset.md` for thinking patterns and decision frameworks
|
|
51
|
+
|
|
52
|
+
## Reference Navigation
|
|
53
|
+
|
|
54
|
+
**Core Technologies:**
|
|
55
|
+
- `mobile-frameworks.md` - React Native, Flutter, Swift, Kotlin, framework comparison matrices, when to use each
|
|
56
|
+
- `mobile-ios.md` - Swift 6, SwiftUI, iOS architecture patterns, HIG, App Store requirements, platform capabilities
|
|
57
|
+
- `mobile-android.md` - Kotlin, Jetpack Compose, Material Design 3, Play Store, Android-specific features
|
|
58
|
+
|
|
59
|
+
**Best Practices & Development Mindset:**
|
|
60
|
+
- `mobile-best-practices.md` - Mobile-first design, performance optimization, offline-first architecture, security, testing, accessibility, deployment, analytics
|
|
61
|
+
- `mobile-debugging.md` - Debugging tools, performance profiling, crash analysis, network debugging, platform-specific debugging
|
|
62
|
+
- `mobile-mindset.md` - Thinking patterns, decision frameworks, platform-specific thinking, common pitfalls, debugging strategies
|
|
63
|
+
|
|
64
|
+
## Key Best Practices (2024-2025)
|
|
65
|
+
|
|
66
|
+
**Performance Targets:**
|
|
67
|
+
- App launch: <2 seconds (70% abandon if >3s)
|
|
68
|
+
- Memory usage: <100MB for typical screens
|
|
69
|
+
- Network requests: Batch and cache aggressively
|
|
70
|
+
- Battery impact: Respect Doze Mode and background restrictions
|
|
71
|
+
- Animation: 60 FPS (16.67ms per frame)
|
|
72
|
+
|
|
73
|
+
**Architecture:**
|
|
74
|
+
- MVVM for small-medium apps (clean separation, testable)
|
|
75
|
+
- MVVM + Clean Architecture for large enterprise apps
|
|
76
|
+
- Offline-first with hybrid sync (push + pull)
|
|
77
|
+
- State management: Zustand (React Native), Riverpod 3 (Flutter), StateFlow (Android)
|
|
78
|
+
|
|
79
|
+
**Security (OWASP Mobile Top 10):**
|
|
80
|
+
- OAuth 2.0 + JWT + Biometrics for authentication
|
|
81
|
+
- Keychain (iOS) / KeyStore (Android) for sensitive data
|
|
82
|
+
- Certificate pinning for network security
|
|
83
|
+
- Never hardcode credentials or API keys
|
|
84
|
+
- Implement proper session management
|
|
85
|
+
|
|
86
|
+
**Testing Strategy:**
|
|
87
|
+
- Unit tests: 70%+ coverage for business logic
|
|
88
|
+
- Integration tests: Critical user flows
|
|
89
|
+
- E2E tests: Detox (React Native), Appium (cross-platform), XCUITest (iOS), Espresso (Android)
|
|
90
|
+
- Real device testing mandatory before release
|
|
91
|
+
|
|
92
|
+
**Deployment:**
|
|
93
|
+
- Fastlane for automation across platforms
|
|
94
|
+
- Staged rollouts: Internal → Closed → Open → Production
|
|
95
|
+
- Mandatory: iOS 17 SDK (2024), Android 15 API 35 (Aug 2025)
|
|
96
|
+
- CI/CD saves 20% development time
|
|
97
|
+
|
|
98
|
+
## Quick Decision Matrix
|
|
99
|
+
|
|
100
|
+
| Need | Choose |
|
|
101
|
+
|------|--------|
|
|
102
|
+
| JavaScript team, web code sharing | React Native |
|
|
103
|
+
| Performance-critical, complex animations | Flutter |
|
|
104
|
+
| Maximum iOS performance, latest features | Swift/SwiftUI native |
|
|
105
|
+
| Maximum Android performance, Material 3 | Kotlin/Compose native |
|
|
106
|
+
| Rapid prototyping | React Native + Expo |
|
|
107
|
+
| Desktop + mobile | Flutter |
|
|
108
|
+
| Enterprise with JavaScript skills | React Native |
|
|
109
|
+
| Startup with limited resources | Flutter or React Native |
|
|
110
|
+
| Gaming or heavy graphics | Native (Swift/Kotlin) or Unity |
|
|
111
|
+
|
|
112
|
+
## Framework Quick Comparison (2024-2025)
|
|
113
|
+
|
|
114
|
+
| Criterion | React Native | Flutter | Swift/SwiftUI | Kotlin/Compose |
|
|
115
|
+
|-----------|--------------|---------|---------------|----------------|
|
|
116
|
+
| **Stars** | 121K | 170K | N/A | N/A |
|
|
117
|
+
| **Adoption** | 35% | 46% | iOS only | Android only |
|
|
118
|
+
| **Performance** | 80-90% native | 85-95% native | 100% native | 100% native |
|
|
119
|
+
| **Dev Speed** | Fast (hot reload) | Very fast (hot reload) | Fast (Xcode Previews) | Fast (Live Edit) |
|
|
120
|
+
| **Learning Curve** | Easy (JavaScript) | Medium (Dart) | Medium (Swift) | Medium (Kotlin) |
|
|
121
|
+
| **UI Paradigm** | Component-based | Widget-based | Declarative | Declarative |
|
|
122
|
+
| **Community** | Huge (npm) | Growing | Apple ecosystem | Android ecosystem |
|
|
123
|
+
| **Best For** | JS teams, web sharing | Performance, animations | iOS-only apps | Android-only apps |
|
|
124
|
+
|
|
125
|
+
## Implementation Checklist
|
|
126
|
+
|
|
127
|
+
**Project Setup:**
|
|
128
|
+
- Choose framework → Initialize project → Configure dev environment → Setup version control → Configure CI/CD → Team standards
|
|
129
|
+
|
|
130
|
+
**Architecture:**
|
|
131
|
+
- Choose pattern (MVVM/Clean) → Setup folders → State management → Navigation → API layer → Error handling → Logging
|
|
132
|
+
|
|
133
|
+
**Core Features:**
|
|
134
|
+
- Authentication → Data persistence → API integration → Offline sync → Push notifications → Deep linking → Analytics
|
|
135
|
+
|
|
136
|
+
**UI/UX:**
|
|
137
|
+
- Design system → Platform guidelines → Accessibility → Responsive layouts → Dark mode → Localization → Animations
|
|
138
|
+
|
|
139
|
+
**Performance:**
|
|
140
|
+
- Image optimization → Lazy loading → Memory profiling → Network optimization → Battery testing → Launch time optimization
|
|
141
|
+
|
|
142
|
+
**Quality:**
|
|
143
|
+
- Unit tests (70%+) → Integration tests → E2E tests → Accessibility testing → Performance testing → Security audit
|
|
144
|
+
|
|
145
|
+
**Security:**
|
|
146
|
+
- Secure storage → Authentication flow → Network security → Input validation → Session management → Encryption
|
|
147
|
+
|
|
148
|
+
**Deployment:**
|
|
149
|
+
- App icons/splash → Screenshots → Store listings → Privacy policy → TestFlight/Internal testing → Staged rollout → Monitoring
|
|
150
|
+
|
|
151
|
+
## Platform-Specific Guidelines
|
|
152
|
+
|
|
153
|
+
**iOS (Human Interface Guidelines):**
|
|
154
|
+
- Native navigation patterns (tab bar, navigation bar)
|
|
155
|
+
- iOS design patterns (pull to refresh, swipe actions)
|
|
156
|
+
- San Francisco font, iOS color system
|
|
157
|
+
- Haptic feedback, 3D Touch/Haptic Touch
|
|
158
|
+
- Respect safe areas and notch
|
|
159
|
+
|
|
160
|
+
**Android (Material Design 3):**
|
|
161
|
+
- Material navigation (bottom nav, navigation drawer)
|
|
162
|
+
- Floating action buttons, material components
|
|
163
|
+
- Roboto font, Material You dynamic colors
|
|
164
|
+
- Touch feedback (ripple effects)
|
|
165
|
+
- Respect system bars and gestures
|
|
166
|
+
|
|
167
|
+
## Common Pitfalls to Avoid
|
|
168
|
+
|
|
169
|
+
1. **Testing only on simulators** - Real devices show true performance
|
|
170
|
+
2. **Ignoring platform conventions** - Users expect platform-specific patterns
|
|
171
|
+
3. **No offline handling** - Network failures will happen
|
|
172
|
+
4. **Poor memory management** - Leads to crashes and poor UX
|
|
173
|
+
5. **Hardcoded credentials** - Security vulnerability
|
|
174
|
+
6. **No accessibility** - Excludes 15%+ of users
|
|
175
|
+
7. **Premature optimization** - Optimize based on metrics, not assumptions
|
|
176
|
+
8. **Over-engineering** - Start simple, scale as needed
|
|
177
|
+
9. **Skipping real device testing** - Simulators don't show battery/network issues
|
|
178
|
+
10. **Not respecting battery** - Background processing must be justified
|
|
179
|
+
|
|
180
|
+
## Performance Budgets
|
|
181
|
+
|
|
182
|
+
**Recommended Targets:**
|
|
183
|
+
- **App size**: <50MB initial download, <200MB total
|
|
184
|
+
- **Launch time**: <2 seconds to interactive
|
|
185
|
+
- **Screen load**: <1 second for cached data
|
|
186
|
+
- **Network request**: <3 seconds for API calls
|
|
187
|
+
- **Memory**: <100MB for typical screens, <200MB peak
|
|
188
|
+
- **Battery**: <5% drain per hour of active use
|
|
189
|
+
- **Frame rate**: 60 FPS (16.67ms per frame)
|
|
190
|
+
|
|
191
|
+
## Resources
|
|
192
|
+
|
|
193
|
+
**Official Documentation:**
|
|
194
|
+
- React Native: https://reactnative.dev/
|
|
195
|
+
- Flutter: https://flutter.dev/
|
|
196
|
+
- iOS HIG: https://developer.apple.com/design/human-interface-guidelines/
|
|
197
|
+
- Material Design: https://m3.material.io/
|
|
198
|
+
- OWASP Mobile: https://owasp.org/www-project-mobile-top-10/
|
|
199
|
+
|
|
200
|
+
**Tools & Testing:**
|
|
201
|
+
- Detox E2E: https://wix.github.io/Detox/
|
|
202
|
+
- Appium: https://appium.io/
|
|
203
|
+
- Fastlane: https://fastlane.tools/
|
|
204
|
+
- Firebase: https://firebase.google.com/
|
|
205
|
+
|
|
206
|
+
**Community:**
|
|
207
|
+
- React Native Directory: https://reactnative.directory/
|
|
208
|
+
- Pub.dev (Flutter packages): https://pub.dev/
|
|
209
|
+
- Awesome React Native: https://github.com/jondot/awesome-react-native
|
|
210
|
+
- Awesome Flutter: https://github.com/Solido/awesome-flutter
|