| name | add-shared-utility |
| description | Add a new shared utility function or type, following project conventions for reusable logic and shared types. |
add-shared-utility Skill
Purpose:
Add a new utility function or type to the shared codebase, following project conventions.
When to Use:
- When creating reusable logic, helpers, or type definitions.
- When refactoring code to reduce duplication.
Instructions:
- Place new utilities or types in
src/shared/.
- Use descriptive, kebab-case filenames (e.g.,
util.time.ts).
- Export all functions/types for easy import.
- Write clear JSDoc comments for each exported item.
- Add tests or usage examples if the utility is non-trivial.
Code Example:
export function getCurrentIsoTime(): string {
return new Date().toISOString();
}
Related Files: