create-feature
Skill0 starsChanged 56 days agoMITView on GitHub
Scaffold a new feature module in lib/features/ with the correct directory shape, store, state, page, use-case placement, DI registration, route, localization and tests. Use when adding any new screen-owning feature or promoting a sub-module to a peer feature.
7 other projects use a version of this.
Adopted by
Most recently taken up by
- LongJohnSilver1504/claude-skillstheir own version, first seen Nov 8, 2026
- seungmanchoi/react-native-fsd-agent-templatetheir own version, first seen Oct 25, 2026
- buildpad-ai/skillstheir own version, first seen Oct 16, 2026
- zacharyfmarion/openscad-studiotheir own version, first seen Oct 8, 2026
- quocnt59/claude_skilltheir own version, first seen Aug 6, 2026
- ThisIsSadeghi/KMPilottheir own version, first seen Aug 4, 2026
Used with
Projects with it also use modify-feature.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
ThisIsSadeghiSkillmodify-feature
Modify existing KMP features with spec-first workflow. Invoke with /modify-feature.
Also in 3 projects that use this
Other versions7 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 7
- zacharyfmarion/openscad-studio★ 238same name
- ThisIsSadeghi/KMPilot★ 56same name
- seungmanchoi/react-native-fsd-agent-template★ 52same name
- buildpad-ai/skills★ 1same name
- LongJohnSilver1504/claude-skills★ 1same name
- ThisIsSadeghi/Loupe★ 1same name
- quocnt59/claude_skill★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository18 other files it gives its agents.
- payload/AGENTS.mdAGENTS.md
- add-design-tokenSkill
- add-localizationSkill
- add-platform-channelSkill
- add-routeSkill
- create-adrSkill
- create-api-providerSkill
- create-ds-componentSkill
- create-dtoSkill
- create-pageSkill
- create-storeSkill
- create-use-caseSkill
- handle-errorsSkill
- plan-featureSkill
- qa-featureSkill
- triage-bug-reportSkill
- write-maestro-flowSkill
- write-testsSkill
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 0 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 5 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 24
Never create anything under lib/shared/ — it is deprecated.
- Very specific: line 28
Create only the directories the feature actually needs.
- Very specific: line 49
Every folder below view/ and mobx/ is optional.
- Very specific: line 96
Never navigate from the page.
“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Create a feature module
Governed by ADR-0001 (layers), ADR-0005 (flat tree), ADR-0006 (feature-owned stores).
Concepts behind this playbook: architecture, project-structure.
Decide the location first
Features are peers under a domain grouping. A feature must never contain a features/ subdirectory.
❌ lib/features/meetings/meeting_details/features/ai_chat/
✅ lib/features/meetings/ai_chat/
✅ lib/features/meetings/meeting_details/A pure view-layer sub-page with no store of its own may stay under the parent's view/, even with its own page state (e.g. meeting_details/view/share_meeting/; in this repo, challenges/view/challenge_joined/). The moment it gains its own store, promote it to a sibling (ADR-0005).
Never create anything under lib/shared/ — it is deprecated.
Directory shape
Create only the directories the feature actually needs. A feature with no modals does not get a modals/ folder.
lib/features/{feature}/
view/
{feature}_page.dart @RoutePage widget — Provider root
{feature}_page_state.dart @injectable, MobX, no API access
{feature}_keys.dart widget keys used by Maestro flows
widgets/ private widgets for this page
use_cases/ UCs consumed only by view/state
mobx/
{feature}_store.dart @injectable or @singleton, owns DioService
use_cases/ UCs consumed only by the store
core/use_cases/ UCs consumed by 2+ layers of THIS feature
models/ feature-local models (not DTOs): {name}_model.dart, enums
constants/ feature-local constants: {feature}_constants.dart
modals/{modal}/ view/ + mobx/ + use_cases/ per modal
overlays/{overlay}/ overlay entries, tooltips, coach marks; same inner shape as modals/
components/ widgets reused across this feature's pagesEvery folder below view/ and mobx/ is optional. There is no per-feature shared/: the name collides with the deprecated lib/shared/ and invites the same dumping ground. Code reused inside the feature goes in components/, models/, constants/ or core/use_cases/; code reused across features goes in lib/core/.
Mirror it in tests and flows:
test/features/{feature}/... each test at its source file's path: a store test in mobx/,
a page state's unit test next to the page's widget test in view/
.maestro/flows/{feature}/ {feature}_happy.yaml | _failure.yaml | _edge.yamlWhat belongs in lib/core/ instead
lib/core/ holds what more than one feature uses: configs/, constants/, extensions/, guards/, navigation/, services/ (with interceptors/), state/, ui/, use_cases/, utils/. These are added when the app first needs them:
exceptions/— typed domain exceptions shared across features ({name}_exception.dart), thrown by use cases and interceptors and caught by type (ADR-0020 pattern 3). An exception only one feature throws and catches can stay in that feature'smodels/.platform_channels/— one Dart wrapper per native capability ({capability}_channel.dart). Seeadd-platform-channel.hooks/— custom hooks used by widgets in more than one feature (use_{name}.dart). See ADR-0019.
Naming
| Kind | Suffix | Example |
| Feature-local model | *_model.dart; an enum is named for its type | todo_filter.dart (the TodoFilter enum) |
| Pure helpers | *_utils.dart | date_range_utils.dart |
| Constants | *_constants.dart | todos_constants.dart |
| Typed exception | *_exception.dart | todo_already_exists_exception.dart |
The page, state, store, use case, DTO and keys suffixes are in AGENTS.md. Directories and file names are snake_case, always: todo_details/, never todoDetails/ or TodoDetails/.
Build order
Bottom-up, so each layer compiles against something real:
- DTOs + API provider — only if the endpoint is new.
create-dto,create-api-provider. - Store —
create-store. OwnsDioService, exposes@readonlyobservables. - Use cases —
create-use-case. Place next to the consumer layer. - Page state —
@injectable, injects the store,AppNavigator, use cases. NoDioService. - Page + widgets —
create-page.Providerat the root,context.read<T>()below. - Localization —
add-localization. Every visible string. - Route — register the
@RoutePageinlib/core/navigation/, thenmelos run build. - Codegen —
melos run buildregenerates*.g.dartandinjectable.config.dart. - Tests + flows —
write-tests,write-maestro-flow.
Route registration
The page carries @RoutePage(). After adding it, run melos run build so *.gr.dart picks it up, then add the route to the router config in lib/core/navigation/. Guards go in lib/core/guards/.
Never navigate from the page. The state class injects AppNavigator and the page calls a state method (ADR-0008).
Definition of done
- Feature is a peer, not nested; nothing added to
lib/shared/, no per-featureshared/ - Only the folders the feature needs; files and folders
snake_casewith the documented suffixes - Store lives under
{feature}/mobx/even if@singleton - State has no
DioService; page has no store and nocontext.router - Every string via
LocaleKeys; every colour/style via design-system tokens - Interactive widgets carry keys from
{feature}_keys.dart+Semanticslabels melos run buildrun after annotation changes; no generated file edited by hand- Unit + widget tests exist; Maestro happy / failure / edge flows exist
melos run verifypasses
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

