midspiral/lemmafit/lemmafit-react-pattern
Claude Code and agent skill by midspiral/lemmafit
Trust tier 3
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Source check pending
Checking that the SKILL.md file is still in the repository.
React integration pattern for lemmafit verified apps. Use when building React components that consume the verified Dafny API, wiring up state with Api.Init/Dispatch/Present, or creating new UI for a lemmafit app.
Install
npx vskill@latest install midspiral/lemmafit/lemmafit-react-patternSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
React Pattern for Lemmafit
- Use the auto-generated TypeScript API from
src/dafny/app.ts(never editapp.tsdirectly) - For any code that touches logic, check if it has been written in Dafny already and is available in the API
- Do not re-write logic in React that already exists in Dafny/API
Modularity
Build modular React apps — never put everything in a single App.tsx. Organize src/ by the same layers used in SPEC.yaml:
Layer rules
- Logic (
dafny/) — All business logic lives in Dafny. The React side never re-implements or duplicates what the verified API provides. - State (
hooks/) — Custom hooks are the only place that callsApi.Init,Api.Dispatch, andApi.Present. Components never import fromdafny/directly. - Presentation (
components/) — Pure components that receive data and callbacks via props. No direct API calls, nouseStatefor domain state. - Utils (
utils/) — Display helpers like formatters and constants. No side effects, no state. - Root (
App.tsx) — Wires hooks to components. Should be short — if it's growing, extract a component or hook.
Why this matters
- Verified logic stays in one place (Dafny) — the React layer is just plumbing
- Components are testable and reusable without the verified API
- When the Dafny model changes, only
hooks/needs updating — components stay stable
Standard Pattern
Key Rules
- Always initialize state with
Api.Init() - Dispatch actions through
Api.Dispatch(state, action) - Read display values through
Api.Present(state) - Never modify state directly — all transitions go through the verified Step function
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/lemmafit-react-pattern/SKILL.md
Popularity
- Repository stars
- 52
- Repository forks
- 3
- 7-day trend score
- 20
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Extension points
hookPre/post lifecycle hooks
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/midspiral/lemmafit/lemmafit-react-pattern)