Agent skill
writing-utility-helpers
Standardizes frequent utility functions for currency, dates, and strings. Use to maintain consistency in formatting.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/writing-utility-helpers
SKILL.md
Utility Helper Functions
When to use this skill
- Formatting prices in PKR or USD.
- Truncating long descriptions in cards.
- Pretty-printing dates for travel itineraries.
Recommended Helpers
Currency
export const formatCurrency = (amount: number, currency = 'PKR') => {
return new Intl.NumberFormat('en-PK', {
style: 'currency',
currency,
maximumFractionDigits: 0,
}).format(amount);
};
String Truncation
export const truncate = (str: string, length: number) => {
return str.length > length ? str.substring(0, length) + '...' : str;
};
Instructions
- Location: Store all helpers in
lib/utils.tsorutils/index.ts. - DRY: Check for existing helpers before writing new logic.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?