utils/skills/add-utils-function/SKILL.md
Add or modify utility functions in fe-tools. Use when the user asks to add a new utility/helper/validator (e.g., "新增utils函数", "add utility function", "新增SQL语句校验功能") or to extend existing utils in packages/utils, packages/web-utils, packages/node-utils, packages/canvas-utils, packages/env, or packages/ai-utils.
npx skillsauth add michealwayne/fe-tools add-utils-functionInstall 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 for general-purpose helpers. If unsure, use the select-package skill.
packages/utilspackages/web-utilspackages/node-utilspackages/canvas-utilspackages/ai-utilsrg <keyword> packages).array.ts, validators.ts) or create a new focused file. If creating a new file, use the create-module-file skill.any. Example:
/**
* 将字符串首字母大写
* Capitalize the first letter of a string.
* @param str - 输入字符串 / input string
* @returns 首字母大写的字符串 / string with first letter capitalized
* @example
* capitalize('hello'); // 'Hello'
* @example
* capitalize(''); // ''
*/
export function capitalize(str: string): string {
return str.charAt(0).toUpperCase() + str.slice(1);
}
bilingual-jsdoc skill if needed.src/index.ts. Use the update-index-exports skill if needed.__tests__ directory. Use the add-tests skill if needed.TEST_API=<package> npm run testnpm run buildtools
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.