core/file-structure

Organizes Themis slice directories, naming conventions, reducer registration, and saga startup.

6|6|Updated Jun 29, 2026
One-click install
npx skills add https://github.com/intent-hq/cloudlands-fe --skill core-file-structure-intent-hq
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: core/file-structure
Source: https://github.com/intent-hq/cloudlands-fe/tree/main/.agents/skills/themis/core/file-structure
Command: npx skills add https://github.com/intent-hq/cloudlands-fe --skill core-file-structure-intent-hq

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Redux + redux-saga codebases often drift into inconsistent slice layouts, ambiguous reducer keys, and misplaced state types, making ownership and cross-process imports fragile. This Skill enforces a single, predictable file structure and registration pattern for every Themis slice. ## Core Features & Use Cases - Standard slice layout: Defines the canonical src/slices/{slice-name}/ directory with -types.ts, -slice.ts, -selectors.ts, tests, and a sagas/ subtree. - Registration rules: Covers Store construction with reducer maps, StoreState typing, store.init() lifecycle, and explicit store.runSaga() startup for app sagas. - Saga-only slices: Shows how to define trigger actions and sagas without registering an empty reducer. - Use Case: When scaffolding a new user-preferences feature, use this Skill to create the correctly named files, register the reducer under the camelCase userPreferences key, and start its saga from the root lifecycle. ## Quick Start Ask the AI to scaffold a new Themis slice for a feature, including its types, reducer, selectors, saga, and store registration following the file-structure conventions.

Frequently Asked Questions about core/file-structure

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure a Redux slice directory with redux-saga?▼

Create `src/slices/{slice-name}/` containing `{slice-name}-types.ts`, `{slice-name}-slice.ts`, `{slice-name}-selectors.ts`, reducer tests, and a `sagas/` folder with the saga and its tests. Each directory owns exactly one slice module and one selectors module.

How do I register a saga-only slice without a reducer?▼

Define trigger actions with createAction and write the saga, but omit any reducer from the Store constructor map. Start the saga explicitly with `store.runSaga(sagaFn)` from the root lifecycle instead of registering an empty reducer.

Should Redux reducer keys be camelCase or kebab-case?▼

Reducer-map keys and action namespaces must be camelCase, such as `userPreferences` and `"userPreferences/updateTheme"`. Physical file and directory names stay kebab-case, but the logical slice identity is always camelCase.

Why should state types live in a separate types file?▼

Cross-process imports, such as Electron preload code, would otherwise pull in reducer and action-creator factories just to access types. Defining types in `{slice-name}-types.ts` keeps them safe to import from any process.

Does store.init() start application sagas automatically?▼

No, `store.init()` combines reducers, creates the Redux store with middleware, and starts the package saga manager only. Each app saga must be started explicitly with `store.runSaga(sagaFn)` from the family-appropriate root lifecycle.