feature-module-architect_skill

This skill scaffolds feature modules using feature-based architecture and colocation with a 500 LOC limit to boost maintainability and scalability.
  • TypeScript

0

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill d-oit/do-novelist-ai --skill feature-module-architect

  • SKILL.md7.9 KB

Overview

This skill scaffolds feature modules following a feature-based architecture with strong colocation and a strict 500 LOC file limit. It generates a standard directory layout (components, hooks, services, types, utils) and a single public API export to keep features encapsulated and easy to consume. Use it when creating new features or refactoring large, scattered code into cohesive modules.

How this skill works

The skill creates a feature folder under src/features/{feature-name} with subfolders for components, hooks, services, types, and utils plus an index.ts that exposes only the public API. It enforces a hard 500 lines-of-code limit per file and provides a refactoring pattern to split large files into hooks, handlers, and small components. It also adds test file placeholders beside implementations and recommends import practices to avoid leaking internals between features.

When to use it

  • When creating a new feature module from scratch
  • When a TypeScript/React file exceeds the 500 LOC limit
  • When feature-related code is scattered across global directories
  • When you need a consistent public API for a feature
  • When preparing a large feature for easier testing and reuse

Best practices

  • Colocate components, hooks, services, types, and utils inside the feature folder
  • Keep each file under 500 LOC; split by responsibility (hooks, handlers, view)
  • Export only what other features need from src/features/{feature}/index.ts
  • Place test files next to the implementation files
  • Prefer small presentational components and pull logic into hooks/services

Example use cases

  • Scaffold an ai-generation feature with GenerationForm, useGeneration, and generationService
  • Refactor a 600 LOC dashboard into useDashboard, dashboardHandlers, and a small Dashboard component
  • Create a project-management feature with ProjectCard, useProjects, projectService, and project.types
  • Organize a world-building feature so all maps, hooks, and types live under src/features/world-building/

FAQ

The skill includes guidance and examples for counting lines (wc/find) and a hard rule to split files by responsibility; CI checks can be added to fail on files exceeding 500 LOC.

What should I export from a feature index.ts?

Export only components, hooks, and types that other features will consume. Keep internal utilities and private helpers unexported to preserve encapsulation.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational