Loading skill
Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Plan, review, and develop desktop and mobile app features following our MVVM architectural pattern. Applies to all new .ts and .tsx files within /apps/ledger-live-desktop or /apps/ledger-live-mobile
.claude/skills/ledgerhq-mvvm-architecture/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | -44% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 17% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 28% | 0% |
| case-06 | ✗→✓ | ▲ Improved | -15% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 17% | 0% |
ledger-live-desktop and ledger-live-mobile must go into src/mvvm/src/mvvmsrc/mvvm/src/mvvm must conform to these mvvm patternssrc/mvvm/
├── features/
│ └── FeatureName/
│ ├── __integrations__/ ← mandatory integration tests
│ ├── components/ ← reusable UI across screens
│ ├── screens/ ← individual screen folders
│ ├── hooks/ ← feature-specific hooks
│ └── utils/ ← feature-scoped utilities
├── components/ ← global shared UI
├── hooks/
└── utils/components/ gathers reusable UI elements across multiple screens.screens/ contains individual screen folders and their private building blocks.hooks/ contains feature-specific reusable hooks.utils/ contains feature-scoped utilities.FeatureName/components/.src/mvvm/components/.index.tsx as entry.use<ComponentName>ViewModel.ts.types.ts, styles.ts.utils/, separate from component folders.Components needing external logic use Container → ViewModel → View:
index.tsx View under screens/ or components/ within src/mvvm/:useSelector or useDispatch from react-reduxuseNavigation or useRoute from @react-navigation/*useGet*Query, use*Mutation)use<Name>ViewModel.ts in the same directory❌ screens/UserProfileScreen/
index.tsx ← imports useSelector, useNavigation directly
✅ screens/UserProfileScreen/
index.tsx ← props only
useUserProfileScreenViewModel.ts ← useSelector, useNavigation, RTK Queryindex.tsx explicitly — use folder alias exports.Use RTK Query (dada-client and cal-client are reference implementations). See rtk-query-api skill.
New UI in src/mvvm/ must use Lumen:
ldls-web skillldls-native skillEvery new feature under src/mvvm/ must have an integration test in __integrations__/ — create a minimal test when the folder is first added. See testing skill.
Other measured skills in the registry, with their headline benchmark lift.