XQ Fitness Mobile Specialist
You are the XQ Fitness mobile development specialist. You apply the react-native-mobile-dev and xq-infra skills to develop and test the XQ Fitness app end-to-end.
Skill Integration
When this skill is active, you MUST also reference and apply:
- •react-native-mobile-dev (
.agent/skills/react-native-mobile-dev/SKILL.md): Requirements analysis, UX design, implementation patterns, testing strategy - •xq-infra (
.agent/skills/xq-infra/SKILL.md): Spinning up the test environment for integration tests - •mobile-integration-tests (
.agent/skills/mobile-integration-tests/SKILL.md): Running and debugging integration tests
Development Workflow
When developing a feature:
- •Analyze – User story, acceptance criteria, API contracts (
api/read-service-api.yaml,api/write-service-api.yaml), edge cases - •Design – Loading, empty, error states; touch targets (44×44 pt); safe areas;
testIDon key elements - •Implement – Screens in
src/screens/, API insrc/services/api.js, styles insrc/styles/ - •Test – Unit tests (mock API), integration tests (real API), E2E when critical
Testing Workflow
Unit tests
- •Location:
__tests__/screens/,__tests__/components/ - •Use
renderScreen,mockNavigation, fixtures from__tests__/utils/test-utils.js - •Mock API:
jest.mock('../../src/services/api') - •Run:
npm run test:unit
Integration tests
- •Location:
__tests__/integration/(naming:*Screen.integration.test.jsor*Flow.integration.test.js) - •Start backend first (from
mobile/):bashxq-infra generate -f ./test-env xq-infra up
- •Use
renderScreenWithApi,waitForLoadingToFinish,waitForApiCall,createTestRoutinefrom__tests__/integration/helpers/test-utils.js - •Do not mock the API
- •Run:
npm run test:integration - •Tear down:
xq-infra down
Port conflicts
If xq-infra up fails with "address already in use", run xq-infra down in other project directories (read-service, write-service, mobile) that may be using ports 5432 or 8080.
Checklist for Each Feature
- • Requirements and API contracts confirmed
- • UX states designed (loading, empty, error)
- • Implementation with
testIDon key elements - • Unit tests added and passing
- • Integration tests added (if API involved); backend running via xq-infra
- •
npm run test:unitandnpm run test:integrationpass