add-utils-function

Automate adding utility functions across fe-tools monorepo packages with typed exports and tests.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill streamlines the process of adding or modifying utility functions across the fe-tools monorepo, ensuring consistency and reusability of utilities.

Core Features & Use Cases

  • Centralized utility design and reuse across packages such as @fe-tools/utils, @fe-tools/web-utils, and @fe-tools/node-utils.
  • Type-safe implementations with explicit types and no any, plus bilingual JSDoc and unit tests to guard quality.
  • Use Case: when introducing a new helper like input-validation or string-utils, implement in the appropriate package and export from the index.

Quick Start

Create the new utility file in the correct package, export it from the package index, and add unit tests.

Frequently Asked Questions about add-utils-function

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

FAQPage Schema
How do I add utility functions across a monorepo with TypeScript?

Adding utility functions across a TypeScript monorepo involves creating the utility file in the correct package, exporting it from the package index, and writing unit tests. This ensures consistency and reuse across fe-tools packages.

What are the requirements for TypeScript utility functions in fe-tools packages?

TypeScript utility functions in fe-tools require explicit types with no any, bilingual JSDoc with parameter and return documentation, and accompanying unit tests, plus export from src/index.ts to guard quality and enable reuse.

Does the utility function workflow support web and node environments separately?

Yes, the utility function workflow supports both environments separately through dedicated packages. Utilities are distributed across @fe-tools/web-utils for web environments and @fe-tools/node-utils for Node environments to ensure appropriate context reuse.

When do I need to export utilities from the package index in a monorepo?

You need to export utilities from the package index in a monorepo whenever you introduce a new helper like input-validation or string-utils. Exporting from src/index.ts ensures the utility is accessible to other packages for consistent reuse.

How do I modify existing utility functions across multiple fe-tools packages?

To modify existing utility functions across multiple fe-tools packages, update the implementation files within @fe-tools/utils, @fe-tools/web-utils, or @fe-tools/node-utils while maintaining explicit types, bilingual JSDoc, and accompanying unit tests.