From foldkit-skills
Provides context and conventions for building Foldkit apps with TypeScript and Effect. Guides architecture decisions toward unidirectional data flow and idiomatic patterns like Submodels vs render helpers.
How this skill is triggered — by the user, by Claude, or both
Slash command
/foldkit-skills:foldkitThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
You are working on a Foldkit app. Foldkit is a complete TypeScript frontend framework, built on Effect and architected like Elm. The architecture is solved: state, events, transitions, side effects, streams, routing, UI components, validation, testing, and devtools are all part of the framework, not third-party choices to make. Your job is to model the application's behavior, not to pick librar...
You are working on a Foldkit app. Foldkit is a complete TypeScript frontend framework, built on Effect and architected like Elm. The architecture is solved: state, events, transitions, side effects, streams, routing, UI components, validation, testing, and devtools are all part of the framework, not third-party choices to make. Your job is to model the application's behavior, not to pick libraries or invent architecture.
Foldkit is not incremental. There is no React interop, no escape hatch, no "just do it the React way for this one part." The framework gives you one shape, and there is one way to do most things.
examples/, the website (which is itself a Foldkit app), and the typing-game (a full real-time app). These are the canonical references. Higher fidelity than prose or anything reconstructed from memory.h.submodel. Stateless render helpers (Button, Input, Textarea, Select, Fieldset) are called directly with a ViewConfig and return Html. Do not migrate render helpers to Submodels for "consistency": Submodel semantics imply state, and these helpers have none. See the Foldkit UI overview page in the website for the canonical split.evo setters receive the field. If an evo setter only transforms the current value of that same field, pass the transformer directly (entries: Array.map(f), count: Number.increment, stepTabs: Tabs.reflectSelectedTab(value, options)). Use () => value for replacement values from Messages, child updates, Commands, or other Model fields.The foldkit repo is vendored as a git subtree at repos/foldkit/ from the project root. It is the source of truth for everything: conventions, framework source, examples, the quality bar. Browse it directly.
Stable top-level entry points:
repos/foldkit/examples/: runnable example apps spanning every complexity tier. Usually your first stop when looking for a precedent.repos/foldkit/CLAUDE.md: project conventions and the code-quality barrepos/foldkit/README.md: framework overview and entry pointersrepos/foldkit/skills/: task-oriented skills with the canonical architecture, conventions, and quality-bar referencesrepos/foldkit/packages/: framework source and production reference apps (the website, the typing-game, the framework itself)Names below the top level (subdirectories, individual filenames) can drift over time. List the directory contents to find what you need rather than relying on a path quoted from this skill.
If repos/foldkit/ is missing from the project, strongly recommend adding it. The subtree is the difference between working from memory and pattern-matching against canonical references. Assistance quality drops noticeably without it. Initialize git first if needed (subtree requires at least one commit):
git subtree add --prefix=repos/foldkit https://github.com/foldkit/foldkit.git main --squash
Refresh later with git subtree pull --prefix=repos/foldkit https://github.com/foldkit/foldkit.git main --squash.
When working inside the foldkit repo itself rather than a consumer project, drop the repos/foldkit/ prefix. The same paths exist at the project root.
npx claudepluginhub foldkit/foldkit --plugin foldkit-skillsGenerates a complete, idiomatic Foldkit program from a natural language description. Use when scaffolding a new project or building a program from scratch.
Framework-agnostic frontend architecture guidance on state management, component organization, and data fetching patterns. Useful when structuring UI code or choosing state boundaries.
Provides practical patterns for using fp-ts with React: Option for nullable state, Either for form validation, TaskEither for async data fetching, and RemoteData for loading/error/success states.