feature-folder-generator

Generate four-layer React Native feature folders with index.ts barrels.

1|Updated Apr 27, 2026
One-click install
npx skills add https://github.com/Saurav-snapwork/NewAppTemplate --skill feature-folder-generator
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: feature-folder-generator
Source: https://github.com/Saurav-snapwork/NewAppTemplate/tree/main/.github/skills/feature-folder-generator
Command: npx skills add https://github.com/Saurav-snapwork/NewAppTemplate --skill feature-folder-generator

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automates the creation of a clean, isolated feature folder structure in React Native projects using a four-layer architecture (presentation, domain, data, state). It ensures consistent naming, nesting rules, and the presence of required index barrel files, reducing setup time and preventing architectural drift.

Core Features & Use Cases

  • Enforces a four-layer feature scaffold (presentation, domain, data, state) with standardized subfolders for components, screens, hooks, models, usecases, repositories, datasources, and mappers.
  • Validates input, naming conventions, and cross-feature isolation to prevent conflicts with shared modules and existing features.
  • Generates empty index.ts barrels per layer and supports optional new-project scaffolding for shared infrastructure placeholders.

Quick Start

Run this skill to scaffold a complete feature folder structure for a new React Native feature and review the resulting paths.

Frequently Asked Questions about feature-folder-generator

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

FAQPage Schema
How do I scaffold a React Native feature folder with presentation, domain, data, and state layers?

To scaffold React Native feature folders, this automation enforces a four-layer architecture containing presentation, domain, data, and state layers. It generates standardized subfolders for components, hooks, and repositories while creating mandatory index.ts barrels.

What naming conventions are enforced when creating React Native feature folders?

React Native feature folder creation enforces kebab-case for folder names and PascalCase for file prefixes. It validates input against nesting rules and existing features to prevent architectural drift and cross-feature isolation conflicts.

Can I use this feature folder generator for an existing React Native project?

Yes, the feature folder generator works when adding new features under src/features in existing React Native projects. It validates against existing features and cross-feature isolation rules, while also supporting optional scaffolding for new project shared infrastructure placeholders.

Does the React Native feature scaffolding generate index barrel files automatically?

Yes, React Native feature scaffolding generates empty index.ts barrel files for each of the four mandatory layers. This ensures clean exports and isolation across presentation, domain, data, and state layers within the feature folder structure.

Why does feature folder generation fail when nesting validation detects an existing feature?

Feature folder generation fails during nesting validation to prevent architectural drift and cross-feature isolation conflicts. It checks the src/features directory structure to ensure new features do not improperly nest within or override existing React Native feature modules.