utils/skills/create-module-file/SKILL.md
Create a new module file for fe-tools utilities. Scaffolds a single-purpose TypeScript module with bilingual JSDoc, exports, and tests. Use when a new focused file under packages/utils/src/, packages/web-utils/src/, packages/node-utils/src/, packages/canvas-utils/src/, or packages/ai-utils/src/ is needed (e.g., new validators module, new string helpers).
npx skillsauth add michealwayne/fe-tools create-module-fileInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
packages/utils, packages/web-utils, packages/node-utils, packages/canvas-utils, packages/ai-utils).packages/<pkg>/src/ (one module per file). Use a descriptive kebab-case name matching the module's domain (e.g., validators.ts, string-helpers.ts)./**
* 校验邮箱格式是否合法
* Validate whether an email address format is valid.
* @param email - 邮箱地址 / email address to validate
* @returns 是否合法 / whether the format is valid
* @example
* isValidEmail('[email protected]'); // true
* @example
* isValidEmail('not-an-email'); // false
*/
export function isValidEmail(email: string): boolean {
return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email);
}
packages/<pkg>/src/index.ts to export the new module (use update-index-exports skill if needed).packages/<pkg>/__tests__/. Verify tests pass: TEST_API=<package> npm run test.tools
Verify documentation and tests in fe-tools. Checks that exported functions have corresponding documentation and test coverage, validates JSDoc presence, and identifies missing tests. Use when the user asks to verify docs/tests, or ensure exports and docs are aligned across utils, web-utils, node-utils, canvas-utils, or ai-utils.
tools
Update barrel exports in fe-tools package index files. Adds, removes, or reorders export statements in src/index.ts to expose the public API. Use when a new function or module is added, exports need cleanup, the user mentions barrel file, re-export, expose module, or public API for any fe-tools package.
tools
Sync repository skills to local AI tool skill directories. Copies skill files from the source of truth to Claude, Cursor, Codex, Trae, and CodeBuddy directories. Use when new skills are added or updated, tool directories need refresh, or the user asks to copy skills, update agent skills, or install skills locally.
tools
Regenerate or verify documentation for fe-tools. Generates API reference from TypeDoc comments, checks for missing documentation, and validates code-doc alignment. Use when the user asks to update docs, generate TypeDoc output, or verify documentation alignment.