@jhm1909/ag-kit 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agent/ARCHITECTURE.md +189 -0
- package/.agent/known-registries.json +181 -0
- package/.agent/mcp_config.json +19 -0
- package/.agent/rules/clean-code.md +107 -0
- package/.agent/rules/documents.md +177 -0
- package/.agent/rules/git-workflow.md +68 -0
- package/.agent/rules/nano-banana.md +46 -0
- package/.agent/rules/research.md +35 -0
- package/.agent/rules/skill-loading.md +100 -0
- package/.agent/rules/skill-suggestion.md +47 -0
- package/.agent/rules/testing.md +52 -0
- package/.agent/rules/workflow-advisor.md +108 -0
- package/.agent/rules/workflow-skill-convention.md +127 -0
- package/.agent/skills/ai-engineer/SKILL.md +824 -0
- package/.agent/skills/ai-engineer/references/agentic-patterns.md +329 -0
- package/.agent/skills/ai-engineer/references/evaluation.md +493 -0
- package/.agent/skills/ai-engineer/references/llm.md +490 -0
- package/.agent/skills/ai-engineer/references/rag-advanced.md +444 -0
- package/.agent/skills/ai-engineer/references/serving-optimization.md +531 -0
- package/.agent/skills/ai-engineer/vector-db/README.md +137 -0
- package/.agent/skills/app-builder/SKILL.md +75 -0
- package/.agent/skills/app-builder/agent-coordination.md +71 -0
- package/.agent/skills/app-builder/feature-building.md +53 -0
- package/.agent/skills/app-builder/project-detection.md +34 -0
- package/.agent/skills/app-builder/scaffolding.md +118 -0
- package/.agent/skills/app-builder/tech-stack.md +41 -0
- package/.agent/skills/app-builder/templates/SKILL.md +39 -0
- package/.agent/skills/app-builder/templates/astro-static/TEMPLATE.md +76 -0
- package/.agent/skills/app-builder/templates/chrome-extension/TEMPLATE.md +92 -0
- package/.agent/skills/app-builder/templates/cli-tool/TEMPLATE.md +88 -0
- package/.agent/skills/app-builder/templates/electron-desktop/TEMPLATE.md +88 -0
- package/.agent/skills/app-builder/templates/express-api/TEMPLATE.md +83 -0
- package/.agent/skills/app-builder/templates/flutter-app/TEMPLATE.md +90 -0
- package/.agent/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +90 -0
- package/.agent/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +122 -0
- package/.agent/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +122 -0
- package/.agent/skills/app-builder/templates/nextjs-static/TEMPLATE.md +169 -0
- package/.agent/skills/app-builder/templates/nuxt-app/TEMPLATE.md +134 -0
- package/.agent/skills/app-builder/templates/python-fastapi/TEMPLATE.md +83 -0
- package/.agent/skills/app-builder/templates/react-native-app/TEMPLATE.md +119 -0
- package/.agent/skills/backend-developer/SKILL.md +763 -0
- package/.agent/skills/backend-developer/references/general-patterns.md +65 -0
- package/.agent/skills/backend-developer/references/go-echo.md +68 -0
- package/.agent/skills/backend-developer/references/go-gin.md +76 -0
- package/.agent/skills/backend-developer/references/java-springboot.md +83 -0
- package/.agent/skills/backend-developer/references/node-express.md +64 -0
- package/.agent/skills/backend-developer/references/node-nestjs.md +69 -0
- package/.agent/skills/backend-developer/references/python-django.md +67 -0
- package/.agent/skills/backend-developer/references/python-fastapi.md +80 -0
- package/.agent/skills/blockchain-engineer/SKILL.md +975 -0
- package/.agent/skills/blockchain-engineer/references/deployment.md +28 -0
- package/.agent/skills/blockchain-engineer/references/evm.md +14 -0
- package/.agent/skills/blockchain-engineer/references/mechanisms.md +32 -0
- package/.agent/skills/blockchain-engineer/references/solidity.md +32 -0
- package/.agent/skills/business-analysis/SKILL.md +85 -0
- package/.agent/skills/business-analysis/references/best-practices/diagrams.md +141 -0
- package/.agent/skills/business-analysis/references/domains/ai-agent.md +94 -0
- package/.agent/skills/business-analysis/references/domains/blockchain-dapp.md +86 -0
- package/.agent/skills/business-analysis/references/domains/ecommerce.md +77 -0
- package/.agent/skills/business-analysis/references/domains/education.md +42 -0
- package/.agent/skills/business-analysis/references/domains/fintech.md +44 -0
- package/.agent/skills/business-analysis/references/domains/fnb.md +82 -0
- package/.agent/skills/business-analysis/references/domains/healthtech.md +44 -0
- package/.agent/skills/business-analysis/references/domains/internal-tools.md +38 -0
- package/.agent/skills/business-analysis/references/domains/marketplace.md +52 -0
- package/.agent/skills/business-analysis/references/domains/saas.md +36 -0
- package/.agent/skills/business-analysis/references/workflows/collaboration.md +41 -0
- package/.agent/skills/business-analysis/scripts/verify_mermaid.py +86 -0
- package/.agent/skills/business-analysis/templates/brd.md +46 -0
- package/.agent/skills/business-analysis/templates/change-request.md +41 -0
- package/.agent/skills/business-analysis/templates/prd-functional.md +38 -0
- package/.agent/skills/business-analysis/templates/use-case.md +40 -0
- package/.agent/skills/business-analysis/templates/user-story-detailed.md +36 -0
- package/.agent/skills/code-review/SKILL.md +113 -0
- package/.agent/skills/code-review/references/code-review-reception.md +209 -0
- package/.agent/skills/code-review/references/differential_review.md +59 -0
- package/.agent/skills/code-review/references/requesting-code-review.md +105 -0
- package/.agent/skills/code-review/references/spec_compliance.md +43 -0
- package/.agent/skills/code-review/references/verification-before-completion.md +139 -0
- package/.agent/skills/context-engineering/SKILL.md +68 -0
- package/.agent/skills/context-engineering/references/context-compression.md +84 -0
- package/.agent/skills/context-engineering/references/context-degradation.md +93 -0
- package/.agent/skills/context-engineering/references/context-fundamentals.md +75 -0
- package/.agent/skills/context-engineering/references/context-optimization.md +82 -0
- package/.agent/skills/context-engineering/references/evaluation.md +89 -0
- package/.agent/skills/context-engineering/references/memory-systems.md +88 -0
- package/.agent/skills/context-engineering/references/multi-agent-patterns.md +90 -0
- package/.agent/skills/context-engineering/references/project-development.md +97 -0
- package/.agent/skills/context-engineering/references/tool-design.md +86 -0
- package/.agent/skills/debugging/SKILL.md +60 -0
- package/.agent/skills/debugging/references/defense-in-depth.md +130 -0
- package/.agent/skills/debugging/references/root-cause-tracing.md +177 -0
- package/.agent/skills/debugging/references/systematic-debugging.md +295 -0
- package/.agent/skills/debugging/references/verification-before-completion.md +142 -0
- package/.agent/skills/designer/SKILL.md +159 -0
- package/.agent/skills/designer/concepts/apple-glass.md +48 -0
- package/.agent/skills/designer/concepts/aurora-gradients.md +26 -0
- package/.agent/skills/designer/concepts/bento-grids.md +14 -0
- package/.agent/skills/designer/concepts/claymorphism.md +27 -0
- package/.agent/skills/designer/concepts/neo-brutalism.md +32 -0
- package/.agent/skills/designer/data/app-interface.csv +31 -0
- package/.agent/skills/designer/data/charts.csv +26 -0
- package/.agent/skills/designer/data/colors.csv +162 -0
- package/.agent/skills/designer/data/design.csv +1776 -0
- package/.agent/skills/designer/data/icons.csv +106 -0
- package/.agent/skills/designer/data/landing.csv +35 -0
- package/.agent/skills/designer/data/products.csv +162 -0
- package/.agent/skills/designer/data/react-performance.csv +45 -0
- package/.agent/skills/designer/data/styles.csv +85 -0
- package/.agent/skills/designer/data/typography.csv +74 -0
- package/.agent/skills/designer/data/ui-reasoning.csv +162 -0
- package/.agent/skills/designer/data/ux-guidelines.csv +100 -0
- package/.agent/skills/designer/references/accessibility.md +172 -0
- package/.agent/skills/designer/references/branding.md +88 -0
- package/.agent/skills/designer/references/color-theory.md +139 -0
- package/.agent/skills/designer/references/creation.md +118 -0
- package/.agent/skills/designer/references/design-systems.md +219 -0
- package/.agent/skills/designer/references/frontend_design_aesthetics.md +57 -0
- package/.agent/skills/designer/references/layout.md +200 -0
- package/.agent/skills/designer/references/motion.md +92 -0
- package/.agent/skills/designer/references/review.md +100 -0
- package/.agent/skills/designer/references/trends.md +209 -0
- package/.agent/skills/designer/references/typography.md +190 -0
- package/.agent/skills/designer/scripts/remove_background.py +135 -0
- package/.agent/skills/designer/scripts/ui-search/__pycache__/core.cpython-314.pyc +0 -0
- package/.agent/skills/designer/scripts/ui-search/__pycache__/design_system.cpython-314.pyc +0 -0
- package/.agent/skills/designer/scripts/ui-search/core.py +217 -0
- package/.agent/skills/designer/scripts/ui-search/design_system.py +1067 -0
- package/.agent/skills/designer/scripts/ui-search/search.py +114 -0
- package/.agent/skills/designer/templates/design-motion-spec.md +30 -0
- package/.agent/skills/devops-engineer/SKILL.md +90 -0
- package/.agent/skills/devops-engineer/docker-compose/README.md +47 -0
- package/.agent/skills/devops-engineer/references/ci-cd-pipelines.md +76 -0
- package/.agent/skills/devops-engineer/references/cloud-providers.md +57 -0
- package/.agent/skills/devops-engineer/references/codebase-normalization.md +104 -0
- package/.agent/skills/devops-engineer/references/container-orchestration.md +69 -0
- package/.agent/skills/devops-engineer/references/iac-tools.md +63 -0
- package/.agent/skills/devops-engineer/references/observability-security.md +45 -0
- package/.agent/skills/devops-engineer/references/vercel-supabase.md +17 -0
- package/.agent/skills/devops-engineer/templates/release-notes.md +8 -0
- package/.agent/skills/frontend-developer/SKILL.md +125 -0
- package/.agent/skills/frontend-developer/react-nextjs/README.md +90 -0
- package/.agent/skills/frontend-developer/references/angular.md +52 -0
- package/.agent/skills/frontend-developer/references/composition_patterns.md +60 -0
- package/.agent/skills/frontend-developer/references/core-performance.md +68 -0
- package/.agent/skills/frontend-developer/references/modern-signals.md +43 -0
- package/.agent/skills/frontend-developer/references/react_performance_rules.md +55 -0
- package/.agent/skills/frontend-developer/references/vue-nuxt.md +55 -0
- package/.agent/skills/frontend-developer/scripts/validate_compliance.py +65 -0
- package/.agent/skills/frontend-developer/threejs/README.md +89 -0
- package/.agent/skills/frontend-developer/threejs/animation.md +552 -0
- package/.agent/skills/frontend-developer/threejs/fundamentals.md +488 -0
- package/.agent/skills/frontend-developer/threejs/geometry.md +548 -0
- package/.agent/skills/frontend-developer/threejs/interaction.md +660 -0
- package/.agent/skills/frontend-developer/threejs/lighting.md +481 -0
- package/.agent/skills/frontend-developer/threejs/loaders.md +623 -0
- package/.agent/skills/frontend-developer/threejs/materials.md +520 -0
- package/.agent/skills/frontend-developer/threejs/postprocessing.md +602 -0
- package/.agent/skills/frontend-developer/threejs/router.json +181 -0
- package/.agent/skills/frontend-developer/threejs/shaders.md +642 -0
- package/.agent/skills/frontend-developer/threejs/textures.md +628 -0
- package/.agent/skills/game-development/2d-games/SKILL.md +119 -0
- package/.agent/skills/game-development/3d-games/SKILL.md +135 -0
- package/.agent/skills/game-development/SKILL.md +167 -0
- package/.agent/skills/game-development/game-art/SKILL.md +185 -0
- package/.agent/skills/game-development/game-audio/SKILL.md +190 -0
- package/.agent/skills/game-development/game-design/SKILL.md +129 -0
- package/.agent/skills/game-development/mobile-games/SKILL.md +108 -0
- package/.agent/skills/game-development/multiplayer/SKILL.md +132 -0
- package/.agent/skills/game-development/pc-games/SKILL.md +144 -0
- package/.agent/skills/game-development/vr-ar/SKILL.md +123 -0
- package/.agent/skills/game-development/web-games/SKILL.md +150 -0
- package/.agent/skills/lead-architect/SKILL.md +85 -0
- package/.agent/skills/lead-architect/references/application-architecture.md +70 -0
- package/.agent/skills/lead-architect/references/infrastructure.md +51 -0
- package/.agent/skills/lead-architect/references/process.md +42 -0
- package/.agent/skills/lead-architect/references/system-architecture.md +62 -0
- package/.agent/skills/lead-architect/references/web-fullstack.md +82 -0
- package/.agent/skills/lead-architect/templates/adr.md +62 -0
- package/.agent/skills/lead-architect/templates/rfc.md +46 -0
- package/.agent/skills/lead-architect/templates/sdd.md +62 -0
- package/.agent/skills/lead-architect/templates/technical-spec.md +61 -0
- package/.agent/skills/marketer/SKILL.md +66 -0
- package/.agent/skills/marketer/remotion-best-practices/SKILL.md +58 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/3d.md +86 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/animations.md +29 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/assets/charts-bar-chart.tsx +173 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/assets/text-animations-typewriter.tsx +100 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/assets/text-animations-word-highlight.tsx +108 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/assets.md +78 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/audio.md +172 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/calculate-metadata.md +104 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/can-decode.md +75 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/charts.md +58 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/compositions.md +146 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/display-captions.md +126 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/extract-frames.md +229 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/fonts.md +152 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/get-audio-duration.md +58 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/get-video-dimensions.md +68 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/get-video-duration.md +58 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/gifs.md +138 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/images.md +130 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/import-srt-captions.md +67 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/lottie.md +68 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/measuring-dom-nodes.md +35 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/measuring-text.md +143 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/sequencing.md +106 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/tailwind.md +11 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/text-animations.md +20 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/timing.md +179 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/transcribe-captions.md +19 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/transitions.md +122 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/trimming.md +53 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/videos.md +171 -0
- package/.agent/skills/mcp-builder/SKILL.md +76 -0
- package/.agent/skills/mcp-builder/references/evaluation.md +602 -0
- package/.agent/skills/mcp-builder/references/mcp_best_practices.md +249 -0
- package/.agent/skills/mcp-builder/references/node_mcp_server.md +970 -0
- package/.agent/skills/mcp-builder/references/python_mcp_server.md +719 -0
- package/.agent/skills/mobile-developer/SKILL.md +83 -0
- package/.agent/skills/mobile-developer/api-routes/SKILL.md +389 -0
- package/.agent/skills/mobile-developer/building-ui/SKILL.md +335 -0
- package/.agent/skills/mobile-developer/building-ui/references/animations.md +220 -0
- package/.agent/skills/mobile-developer/building-ui/references/controls.md +270 -0
- package/.agent/skills/mobile-developer/building-ui/references/form-sheet.md +227 -0
- package/.agent/skills/mobile-developer/building-ui/references/gradients.md +106 -0
- package/.agent/skills/mobile-developer/building-ui/references/icons.md +213 -0
- package/.agent/skills/mobile-developer/building-ui/references/media.md +198 -0
- package/.agent/skills/mobile-developer/building-ui/references/route-structure.md +229 -0
- package/.agent/skills/mobile-developer/building-ui/references/search.md +248 -0
- package/.agent/skills/mobile-developer/building-ui/references/storage.md +121 -0
- package/.agent/skills/mobile-developer/building-ui/references/tabs.md +368 -0
- package/.agent/skills/mobile-developer/building-ui/references/visual-effects.md +197 -0
- package/.agent/skills/mobile-developer/building-ui/references/webgpu-three.md +605 -0
- package/.agent/skills/mobile-developer/cicd-workflows/SKILL.md +107 -0
- package/.agent/skills/mobile-developer/cicd-workflows/scripts/fetch.js +109 -0
- package/.agent/skills/mobile-developer/cicd-workflows/scripts/package.json +11 -0
- package/.agent/skills/mobile-developer/cicd-workflows/scripts/validate.js +84 -0
- package/.agent/skills/mobile-developer/data-fetching/SKILL.md +508 -0
- package/.agent/skills/mobile-developer/deployment/SKILL.md +207 -0
- package/.agent/skills/mobile-developer/deployment/references/app-store-metadata.md +479 -0
- package/.agent/skills/mobile-developer/deployment/references/ios-app-store.md +355 -0
- package/.agent/skills/mobile-developer/deployment/references/play-store.md +246 -0
- package/.agent/skills/mobile-developer/deployment/references/testflight.md +58 -0
- package/.agent/skills/mobile-developer/deployment/references/workflows.md +200 -0
- package/.agent/skills/mobile-developer/dev-client/SKILL.md +181 -0
- package/.agent/skills/mobile-developer/tailwind-setup/SKILL.md +501 -0
- package/.agent/skills/mobile-developer/upgrading-expo/SKILL.md +116 -0
- package/.agent/skills/mobile-developer/upgrading-expo/references/new-architecture.md +79 -0
- package/.agent/skills/mobile-developer/upgrading-expo/references/react-19.md +79 -0
- package/.agent/skills/mobile-developer/upgrading-expo/references/react-compiler.md +59 -0
- package/.agent/skills/mobile-developer/use-dom/SKILL.md +434 -0
- package/.agent/skills/modern-python/SKILL.md +122 -0
- package/.agent/skills/project-manager/SKILL.md +110 -0
- package/.agent/skills/project-manager/references/ba-collaboration.md +62 -0
- package/.agent/skills/project-manager/references/discovery_process.md +52 -0
- package/.agent/skills/project-manager/references/jobs_to_be_done.md +51 -0
- package/.agent/skills/project-manager/references/prd_development.md +52 -0
- package/.agent/skills/project-manager/references/rules-guide.md +55 -0
- package/.agent/skills/project-manager/references/skill-creation.md +98 -0
- package/.agent/skills/project-manager/references/strategic-frameworks.md +62 -0
- package/.agent/skills/project-manager/references/task-decomposition.md +194 -0
- package/.agent/skills/project-manager/references/workflows-guide.md +44 -0
- package/.agent/skills/project-manager/router.json +160 -0
- package/.agent/skills/project-manager/scripts/compare_skill.py +177 -0
- package/.agent/skills/project-manager/scripts/encoding_utils.py +36 -0
- package/.agent/skills/project-manager/scripts/init_skill.py +190 -0
- package/.agent/skills/project-manager/scripts/quick_validate.py +123 -0
- package/.agent/skills/project-manager/templates/pm-strategy-one-pager.md +6 -0
- package/.agent/skills/project-manager/templates/prd-strategic.md +38 -0
- package/.agent/skills/project-manager/templates/skill-questionnaire.md +118 -0
- package/.agent/skills/project-manager/templates/user-story-simple.md +14 -0
- package/.agent/skills/prompt-engineer/SKILL.md +319 -0
- package/.agent/skills/prompt-engineer/skill-creator/README.md +47 -0
- package/.agent/skills/qa-tester/SKILL.md +142 -0
- package/.agent/skills/qa-tester/assets/README.md +8 -0
- package/.agent/skills/qa-tester/references/accessibility_testing.md +35 -0
- package/.agent/skills/qa-tester/references/agent_browser.md +38 -0
- package/.agent/skills/qa-tester/references/automation/api_testing.md +23 -0
- package/.agent/skills/qa-tester/references/automation/best_practices.md +14 -0
- package/.agent/skills/qa-tester/references/automation/jest_vitest.md +26 -0
- package/.agent/skills/qa-tester/references/automation/playwright.md +30 -0
- package/.agent/skills/qa-tester/references/e2e_testing.md +46 -0
- package/.agent/skills/qa-tester/references/integration_testing.md +39 -0
- package/.agent/skills/qa-tester/references/performance_testing.md +44 -0
- package/.agent/skills/qa-tester/references/property_based_testing.md +44 -0
- package/.agent/skills/qa-tester/references/security_audit.md +53 -0
- package/.agent/skills/qa-tester/references/security_testing.md +30 -0
- package/.agent/skills/qa-tester/references/sharp_edges.md +49 -0
- package/.agent/skills/qa-tester/references/static_analysis.md +52 -0
- package/.agent/skills/qa-tester/references/supply_chain_audit.md +54 -0
- package/.agent/skills/qa-tester/references/test_case_standards.md +96 -0
- package/.agent/skills/qa-tester/references/test_report_template.md +32 -0
- package/.agent/skills/qa-tester/references/unit_testing.md +50 -0
- package/.agent/skills/qa-tester/references/visual_testing.md +32 -0
- package/.agent/skills/qa-tester/templates/uat-plan.md +34 -0
- package/.agent/skills/research-first/SKILL.md +118 -0
- package/.agent/skills-manifest.json +264 -0
- package/.agent/workflows/absorb.md +176 -0
- package/.agent/workflows/bootstrap.md +91 -0
- package/.agent/workflows/brainstorm.md +168 -0
- package/.agent/workflows/break-tasks.md +77 -0
- package/.agent/workflows/commit.md +349 -0
- package/.agent/workflows/custom-behavior.md +64 -0
- package/.agent/workflows/debug.md +65 -0
- package/.agent/workflows/development.md +49 -0
- package/.agent/workflows/documentation.md +221 -0
- package/.agent/workflows/gen-tests.md +53 -0
- package/.agent/workflows/guide.md +196 -0
- package/.agent/workflows/implement-feature.md +182 -0
- package/.agent/workflows/install-skill.md +193 -0
- package/.agent/workflows/qa.md +54 -0
- package/.agent/workflows/ui-ux-design.md +108 -0
- package/LICENSE +21 -0
- package/README.md +258 -0
- package/cli/index.js +345 -0
- package/cli/migrate-skills.js +113 -0
- package/cli/verify.js +291 -0
- package/package.json +49 -0
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mobile-developer
|
|
3
|
+
description: >
|
|
4
|
+
React Native & Expo development. Use for iOS/Android apps, native features, mobile navigation, and app store deployment.
|
|
5
|
+
license: MIT
|
|
6
|
+
compatibility: Claude Code, Cursor, Gemini CLI, GitHub Copilot
|
|
7
|
+
metadata:
|
|
8
|
+
author: jhm1909
|
|
9
|
+
version: "2.0.0"
|
|
10
|
+
domain: mobile
|
|
11
|
+
estimated_tokens: 8000
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Mobile Developer
|
|
15
|
+
|
|
16
|
+
Expert guidelines for React Native and Expo development.
|
|
17
|
+
|
|
18
|
+
## Knowledge Graph
|
|
19
|
+
|
|
20
|
+
- **extends**: [[frontend-developer]]
|
|
21
|
+
- **requires**: []
|
|
22
|
+
- **suggests**: [[backend-developer]], [[devops-engineer]]
|
|
23
|
+
- **conflicts**: []
|
|
24
|
+
- **enhances**: [[frontend-developer]] (shared patterns via Expo Router)
|
|
25
|
+
- **moc**: [[mobile-development-moc]]
|
|
26
|
+
|
|
27
|
+
## Sub-Skills
|
|
28
|
+
|
|
29
|
+
| Sub-Skill | Path | Use For |
|
|
30
|
+
|-----------|------|---------|
|
|
31
|
+
| **api-routes** | [[mobile-developer/api-routes]] | Expo Router API routes |
|
|
32
|
+
| **building-ui** | [[mobile-developer/building-ui]] | UI, navigation, animations |
|
|
33
|
+
| **data-fetching** | [[mobile-developer/data-fetching]] | Networking, caching |
|
|
34
|
+
| **deployment** | [[mobile-developer/deployment]] | App Store/Play Store |
|
|
35
|
+
| **dev-client** | [[mobile-developer/dev-client]] | Development builds |
|
|
36
|
+
| **tailwind-setup** | [[mobile-developer/tailwind-setup]] | NativeWind config |
|
|
37
|
+
| **upgrading-expo** | [[mobile-developer/upgrading-expo]] | SDK upgrades |
|
|
38
|
+
| **use-dom** | [[mobile-developer/use-dom]] | WebView, DOM components |
|
|
39
|
+
| **cicd-workflows** | [[mobile-developer/cicd-workflows]] | EAS CI/CD |
|
|
40
|
+
|
|
41
|
+
## Core Philosophy
|
|
42
|
+
|
|
43
|
+
1. **Expo Go First** — Test in Expo Go before custom builds
|
|
44
|
+
2. **Native Performance** — Use native modules when critical
|
|
45
|
+
3. **Cross-Platform** — Write once, test on iOS and Android
|
|
46
|
+
4. **User Experience** — 60fps, instant feedback, offline-ready
|
|
47
|
+
|
|
48
|
+
## Quick Rules
|
|
49
|
+
|
|
50
|
+
- **File naming**: kebab-case (`comment-card.tsx`)
|
|
51
|
+
- **Routes**: Never co-locate components in `app/`
|
|
52
|
+
- **Imports**: Use path aliases, avoid relative imports
|
|
53
|
+
- **State**: TanStack Query (server), Zustand (client)
|
|
54
|
+
- **Images**: Use `expo-image`, not RN Image
|
|
55
|
+
|
|
56
|
+
## Library Preferences
|
|
57
|
+
|
|
58
|
+
| Use This | Not This |
|
|
59
|
+
|----------|----------|
|
|
60
|
+
| `expo-audio` | `expo-av` (deprecated) |
|
|
61
|
+
| `expo-video` | `expo-av` (deprecated) |
|
|
62
|
+
| `expo-symbols` | `@expo/vector-icons` (prefer SF Symbols) |
|
|
63
|
+
| `react-native-safe-area-context` | RN SafeAreaView |
|
|
64
|
+
| `expo-sqlite` / `AsyncStorage` | Deprecated storage |
|
|
65
|
+
|
|
66
|
+
## Triggers
|
|
67
|
+
|
|
68
|
+
- pattern: "expo"
|
|
69
|
+
- pattern: "react-native"
|
|
70
|
+
- pattern: "ios|android"
|
|
71
|
+
- file: "app/_layout.tsx" (Expo Router)
|
|
72
|
+
|
|
73
|
+
## Related Skills
|
|
74
|
+
|
|
75
|
+
- [[frontend-developer]] — Shared React patterns
|
|
76
|
+
- [[react-nextjs]] — Expo Router shares Next.js concepts
|
|
77
|
+
- [[backend-developer]] — API integration
|
|
78
|
+
- [[designer]] — UI/UX implementation
|
|
79
|
+
- [[devops-engineer]] — CI/CD with EAS
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
*Extends [[frontend-developer]] | Part of [[mobile-development-moc]]*
|
|
@@ -0,0 +1,389 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: api-routes
|
|
3
|
+
description: >
|
|
4
|
+
Guidelines for creating API routes in Expo Router with EAS Hosting
|
|
5
|
+
license: MIT
|
|
6
|
+
compatibility: Claude Code, Cursor, Gemini CLI, GitHub Copilot
|
|
7
|
+
metadata:
|
|
8
|
+
author: jhm1909
|
|
9
|
+
version: "2.0.0"
|
|
10
|
+
domain: mobile
|
|
11
|
+
estimated_tokens: 5000
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# API Routes for Expo
|
|
15
|
+
|
|
16
|
+
Server-side API routes in Expo Router with EAS Hosting.
|
|
17
|
+
|
|
18
|
+
## Knowledge Graph
|
|
19
|
+
|
|
20
|
+
- **extends**: [[mobile-developer]]
|
|
21
|
+
- **requires**: [[backend-developer]]
|
|
22
|
+
- **suggests**: [[deployment]]
|
|
23
|
+
- **conflicts**: []
|
|
24
|
+
- **enhances**: []
|
|
25
|
+
- **moc**: [[mobile-development-moc]]
|
|
26
|
+
|
|
27
|
+
## When to Use API Routes
|
|
28
|
+
|
|
29
|
+
## When to Use API Routes
|
|
30
|
+
|
|
31
|
+
Use API routes when you need:
|
|
32
|
+
|
|
33
|
+
- **Server-side secrets** — API keys, database credentials, or tokens that must never reach the client
|
|
34
|
+
- **Database operations** — Direct database queries that shouldn't be exposed
|
|
35
|
+
- **Third-party API proxies** — Hide API keys when calling external services (OpenAI, Stripe, etc.)
|
|
36
|
+
- **Server-side validation** — Validate data before database writes
|
|
37
|
+
- **Webhook endpoints** — Receive callbacks from services like Stripe or GitHub
|
|
38
|
+
- **Rate limiting** — Control access at the server level
|
|
39
|
+
- **Heavy computation** — Offload processing that would be slow on mobile
|
|
40
|
+
|
|
41
|
+
## When NOT to Use API Routes
|
|
42
|
+
|
|
43
|
+
Avoid API routes when:
|
|
44
|
+
|
|
45
|
+
- **Data is already public** — Use direct fetch to public APIs instead
|
|
46
|
+
- **No secrets required** — Static data or client-safe operations
|
|
47
|
+
- **Real-time updates needed** — Use WebSockets or services like Supabase Realtime
|
|
48
|
+
- **Simple CRUD** — Consider Firebase, Supabase, or Convex for managed backends
|
|
49
|
+
- **File uploads** — Use direct-to-storage uploads (S3 presigned URLs, Cloudflare R2)
|
|
50
|
+
- **Authentication only** — Use Clerk, Auth0, or Firebase Auth instead
|
|
51
|
+
|
|
52
|
+
## File Structure
|
|
53
|
+
|
|
54
|
+
API routes live in the `app` directory with `+api.ts` suffix:
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
app/
|
|
58
|
+
api/
|
|
59
|
+
hello+api.ts → GET /api/hello
|
|
60
|
+
users+api.ts → /api/users
|
|
61
|
+
users/[id]+api.ts → /api/users/:id
|
|
62
|
+
(tabs)/
|
|
63
|
+
index.tsx
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Basic API Route
|
|
67
|
+
|
|
68
|
+
```ts
|
|
69
|
+
// app/api/hello+api.ts
|
|
70
|
+
export function GET(request: Request) {
|
|
71
|
+
return Response.json({ message: "Hello from Expo!" });
|
|
72
|
+
}
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## HTTP Methods
|
|
76
|
+
|
|
77
|
+
Export named functions for each HTTP method:
|
|
78
|
+
|
|
79
|
+
```ts
|
|
80
|
+
// app/api/items+api.ts
|
|
81
|
+
export function GET(request: Request) {
|
|
82
|
+
return Response.json({ items: [] });
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export async function POST(request: Request) {
|
|
86
|
+
const body = await request.json();
|
|
87
|
+
return Response.json({ created: body }, { status: 201 });
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export async function PUT(request: Request) {
|
|
91
|
+
const body = await request.json();
|
|
92
|
+
return Response.json({ updated: body });
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export async function DELETE(request: Request) {
|
|
96
|
+
return new Response(null, { status: 204 });
|
|
97
|
+
}
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
## Dynamic Routes
|
|
101
|
+
|
|
102
|
+
```ts
|
|
103
|
+
// app/api/users/[id]+api.ts
|
|
104
|
+
export function GET(request: Request, { id }: { id: string }) {
|
|
105
|
+
return Response.json({ userId: id });
|
|
106
|
+
}
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## Request Handling
|
|
110
|
+
|
|
111
|
+
### Query Parameters
|
|
112
|
+
|
|
113
|
+
```ts
|
|
114
|
+
export function GET(request: Request) {
|
|
115
|
+
const url = new URL(request.url);
|
|
116
|
+
const page = url.searchParams.get("page") ?? "1";
|
|
117
|
+
const limit = url.searchParams.get("limit") ?? "10";
|
|
118
|
+
|
|
119
|
+
return Response.json({ page, limit });
|
|
120
|
+
}
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### Headers
|
|
124
|
+
|
|
125
|
+
```ts
|
|
126
|
+
export function GET(request: Request) {
|
|
127
|
+
const auth = request.headers.get("Authorization");
|
|
128
|
+
|
|
129
|
+
if (!auth) {
|
|
130
|
+
return Response.json({ error: "Unauthorized" }, { status: 401 });
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
return Response.json({ authenticated: true });
|
|
134
|
+
}
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### JSON Body
|
|
138
|
+
|
|
139
|
+
```ts
|
|
140
|
+
export async function POST(request: Request) {
|
|
141
|
+
const { email, password } = await request.json();
|
|
142
|
+
|
|
143
|
+
if (!email || !password) {
|
|
144
|
+
return Response.json({ error: "Missing fields" }, { status: 400 });
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
return Response.json({ success: true });
|
|
148
|
+
}
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
## Environment Variables
|
|
152
|
+
|
|
153
|
+
Use `process.env` for server-side secrets:
|
|
154
|
+
|
|
155
|
+
```ts
|
|
156
|
+
// app/api/ai+api.ts
|
|
157
|
+
export async function POST(request: Request) {
|
|
158
|
+
const { prompt } = await request.json();
|
|
159
|
+
|
|
160
|
+
const response = await fetch("https://api.openai.com/v1/chat/completions", {
|
|
161
|
+
method: "POST",
|
|
162
|
+
headers: {
|
|
163
|
+
"Content-Type": "application/json",
|
|
164
|
+
Authorization: `Bearer ${process.env.OPENAI_API_KEY}`,
|
|
165
|
+
},
|
|
166
|
+
body: JSON.stringify({
|
|
167
|
+
model: "gpt-4",
|
|
168
|
+
messages: [{ role: "user", content: prompt }],
|
|
169
|
+
}),
|
|
170
|
+
});
|
|
171
|
+
|
|
172
|
+
const data = await response.json();
|
|
173
|
+
return Response.json(data);
|
|
174
|
+
}
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
Set environment variables:
|
|
178
|
+
|
|
179
|
+
- **Local**: Create `.env` file (never commit)
|
|
180
|
+
- **EAS Hosting**: Use `eas env:create` or Expo dashboard
|
|
181
|
+
|
|
182
|
+
## CORS Headers
|
|
183
|
+
|
|
184
|
+
Add CORS for web clients:
|
|
185
|
+
|
|
186
|
+
```ts
|
|
187
|
+
const corsHeaders = {
|
|
188
|
+
"Access-Control-Allow-Origin": "*",
|
|
189
|
+
"Access-Control-Allow-Methods": "GET, POST, PUT, DELETE, OPTIONS",
|
|
190
|
+
"Access-Control-Allow-Headers": "Content-Type, Authorization",
|
|
191
|
+
};
|
|
192
|
+
|
|
193
|
+
export function OPTIONS() {
|
|
194
|
+
return new Response(null, { headers: corsHeaders });
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
export function GET() {
|
|
198
|
+
return Response.json({ data: "value" }, { headers: corsHeaders });
|
|
199
|
+
}
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
## Error Handling
|
|
203
|
+
|
|
204
|
+
```ts
|
|
205
|
+
export async function POST(request: Request) {
|
|
206
|
+
try {
|
|
207
|
+
const body = await request.json();
|
|
208
|
+
// Process...
|
|
209
|
+
return Response.json({ success: true });
|
|
210
|
+
} catch (error) {
|
|
211
|
+
console.error("API error:", error);
|
|
212
|
+
return Response.json({ error: "Internal server error" }, { status: 500 });
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
## Testing Locally
|
|
218
|
+
|
|
219
|
+
Start the development server with API routes:
|
|
220
|
+
|
|
221
|
+
```bash
|
|
222
|
+
npx expo serve
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
This starts a local server at `http://localhost:8081` with full API route support.
|
|
226
|
+
|
|
227
|
+
Test with curl:
|
|
228
|
+
|
|
229
|
+
```bash
|
|
230
|
+
curl http://localhost:8081/api/hello
|
|
231
|
+
curl -X POST http://localhost:8081/api/users -H "Content-Type: application/json" -d '{"name":"Test"}'
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
## Deployment to EAS Hosting
|
|
235
|
+
|
|
236
|
+
### Prerequisites
|
|
237
|
+
|
|
238
|
+
```bash
|
|
239
|
+
npm install -g eas-cli
|
|
240
|
+
eas login
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
### Deploy
|
|
244
|
+
|
|
245
|
+
```bash
|
|
246
|
+
eas deploy
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
This builds and deploys your API routes to EAS Hosting (Cloudflare Workers).
|
|
250
|
+
|
|
251
|
+
### Environment Variables for Production
|
|
252
|
+
|
|
253
|
+
```bash
|
|
254
|
+
# Create a secret
|
|
255
|
+
eas env:create --name OPENAI_API_KEY --value sk-xxx --environment production
|
|
256
|
+
|
|
257
|
+
# Or use the Expo dashboard
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
### Custom Domain
|
|
261
|
+
|
|
262
|
+
Configure in `eas.json` or Expo dashboard.
|
|
263
|
+
|
|
264
|
+
## EAS Hosting Runtime (Cloudflare Workers)
|
|
265
|
+
|
|
266
|
+
API routes run on Cloudflare Workers. Key limitations:
|
|
267
|
+
|
|
268
|
+
### Missing/Limited APIs
|
|
269
|
+
|
|
270
|
+
- **No Node.js filesystem** — `fs` module unavailable
|
|
271
|
+
- **No native Node modules** — Use Web APIs or polyfills
|
|
272
|
+
- **Limited execution time** — 30 second timeout for CPU-intensive tasks
|
|
273
|
+
- **No persistent connections** — WebSockets require Durable Objects
|
|
274
|
+
- **fetch is available** — Use standard fetch for HTTP requests
|
|
275
|
+
|
|
276
|
+
### Use Web APIs Instead
|
|
277
|
+
|
|
278
|
+
```ts
|
|
279
|
+
// Use Web Crypto instead of Node crypto
|
|
280
|
+
const hash = await crypto.subtle.digest(
|
|
281
|
+
"SHA-256",
|
|
282
|
+
new TextEncoder().encode("data")
|
|
283
|
+
);
|
|
284
|
+
|
|
285
|
+
// Use fetch instead of node-fetch
|
|
286
|
+
const response = await fetch("https://api.example.com");
|
|
287
|
+
|
|
288
|
+
// Use Response/Request (already available)
|
|
289
|
+
return new Response(JSON.stringify(data), {
|
|
290
|
+
headers: { "Content-Type": "application/json" },
|
|
291
|
+
});
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
### Database Options
|
|
295
|
+
|
|
296
|
+
Since filesystem is unavailable, use cloud databases:
|
|
297
|
+
|
|
298
|
+
- **Cloudflare D1** — SQLite at the edge
|
|
299
|
+
- **Turso** — Distributed SQLite
|
|
300
|
+
- **PlanetScale** — Serverless MySQL
|
|
301
|
+
- **Supabase** — Postgres with REST API
|
|
302
|
+
- **Neon** — Serverless Postgres
|
|
303
|
+
|
|
304
|
+
Example with Turso:
|
|
305
|
+
|
|
306
|
+
```ts
|
|
307
|
+
// app/api/users+api.ts
|
|
308
|
+
import { createClient } from "@libsql/client/web";
|
|
309
|
+
|
|
310
|
+
const db = createClient({
|
|
311
|
+
url: process.env.TURSO_URL!,
|
|
312
|
+
authToken: process.env.TURSO_AUTH_TOKEN!,
|
|
313
|
+
});
|
|
314
|
+
|
|
315
|
+
export async function GET() {
|
|
316
|
+
const result = await db.execute("SELECT * FROM users");
|
|
317
|
+
return Response.json(result.rows);
|
|
318
|
+
}
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
## Calling API Routes from Client
|
|
322
|
+
|
|
323
|
+
```ts
|
|
324
|
+
// From React Native components
|
|
325
|
+
const response = await fetch("/api/hello");
|
|
326
|
+
const data = await response.json();
|
|
327
|
+
|
|
328
|
+
// With body
|
|
329
|
+
const response = await fetch("/api/users", {
|
|
330
|
+
method: "POST",
|
|
331
|
+
headers: { "Content-Type": "application/json" },
|
|
332
|
+
body: JSON.stringify({ name: "John" }),
|
|
333
|
+
});
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
## Common Patterns
|
|
337
|
+
|
|
338
|
+
### Authentication Middleware
|
|
339
|
+
|
|
340
|
+
```ts
|
|
341
|
+
// utils/auth.ts
|
|
342
|
+
export async function requireAuth(request: Request) {
|
|
343
|
+
const token = request.headers.get("Authorization")?.replace("Bearer ", "");
|
|
344
|
+
|
|
345
|
+
if (!token) {
|
|
346
|
+
throw new Response(JSON.stringify({ error: "Unauthorized" }), {
|
|
347
|
+
status: 401,
|
|
348
|
+
headers: { "Content-Type": "application/json" },
|
|
349
|
+
});
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
// Verify token...
|
|
353
|
+
return { userId: "123" };
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
// app/api/protected+api.ts
|
|
357
|
+
import { requireAuth } from "../../utils/auth";
|
|
358
|
+
|
|
359
|
+
export async function GET(request: Request) {
|
|
360
|
+
const { userId } = await requireAuth(request);
|
|
361
|
+
return Response.json({ userId });
|
|
362
|
+
}
|
|
363
|
+
```
|
|
364
|
+
|
|
365
|
+
### Proxy External API
|
|
366
|
+
|
|
367
|
+
```ts
|
|
368
|
+
// app/api/weather+api.ts
|
|
369
|
+
export async function GET(request: Request) {
|
|
370
|
+
const url = new URL(request.url);
|
|
371
|
+
const city = url.searchParams.get("city");
|
|
372
|
+
|
|
373
|
+
const response = await fetch(
|
|
374
|
+
`https://api.weather.com/v1/current?city=${city}&key=${process.env.WEATHER_API_KEY}`
|
|
375
|
+
);
|
|
376
|
+
|
|
377
|
+
return Response.json(await response.json());
|
|
378
|
+
}
|
|
379
|
+
```
|
|
380
|
+
|
|
381
|
+
## Rules
|
|
382
|
+
|
|
383
|
+
- NEVER expose API keys or secrets in client code
|
|
384
|
+
- ALWAYS validate and sanitize user input
|
|
385
|
+
- Use proper HTTP status codes (200, 201, 400, 401, 404, 500)
|
|
386
|
+
- Handle errors gracefully with try/catch
|
|
387
|
+
- Keep API routes focused — one responsibility per endpoint
|
|
388
|
+
- Use TypeScript for type safety
|
|
389
|
+
- Log errors server-side for debugging
|