create-module-file

Create a module file under packages/<pkg>/src/ and export it from index.ts.

207|39|Updated Aug 29, 2017
One-click install
npx skills add https://github.com/MichealWayne/fe-tools --skill create-module-file
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: create-module-file
Source: https://github.com/MichealWayne/fe-tools/tree/main/utils/skills/create-module-file
Command: npx skills add https://github.com/MichealWayne/fe-tools --skill create-module-file

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill guides teams to create focused module files when a new utility needs to be added to fe-tools, ensuring maintainable structure and consistent exports.

Core Features & Use Cases

  • Create a single-purpose module file under packages/<pkg>/src/ (one file per module) to extend a utility set.
  • Update packages/<pkg>/src/index.ts to export the new module, preserving a clean public API.
  • Enforce documentation via bilingual JSDoc and explicit types within the new module for clarity and type safety.

Quick Start

Create a single-purpose module file under packages/<pkg>/src/ for the target utility and export it from the package index.

Frequently Asked Questions about create-module-file

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

FAQPage Schema
How do I add a new utility module to a TypeScript package and update index exports?

To add a new utility module, create a single-purpose file under packages/<pkg>/src/ and update the package's index.ts to export the new module, ensuring a clean public API is preserved.

What is the best way to maintain type safety when creating a new module file in a monorepo?

The best way to maintain type safety when creating a module file is to enforce explicit TypeScript types within the new module, ensuring clarity and strict type checking across the packages directory.

How do I generate bilingual JSDoc comments for utility package modules?

You generate bilingual JSDoc comments by enforcing documentation standards within the new module file, adding clear annotations directly in the source code under packages/<pkg>/src/ for utility sets.

Can I use this approach to add a validators module to an existing fe-tools package?

Yes, you can use this approach to add a validators module. It targets typical utility packages under packages and guides you to create the focused file and expose it via the index exports.

Does adding a focused module file require manually updating the package index?

Adding a focused module file requires updating packages/<pkg>/src/index.ts to export the new module, which is enforced to preserve a maintainable structure and consistent public API.