Agent skill
utility-implementer
Implements utility functions, helpers, and shared code. Use when implementing reusable functions, validation utilities, formatting functions, or helper modules. Creates clean, reusable utility code.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/utility-implementer
SKILL.md
Utility Implementer Skill
Instructions
- Analyze utility requirements from task
- Design utility function interface
- Implement utility function with proper error handling
- Add input validation
- Handle edge cases
- Write comprehensive tests
- Return implementation with:
- Utility function code
- Input validation
- Error handling
- Documentation
- Tests
Examples
Input: "Implement password hashing utility" Output:
// utils/password.js
const bcrypt = require('bcrypt');
/**
* Hash a password using bcrypt
* @param {string} password - Plain text password
* @param {number} rounds - Number of bcrypt rounds (default: 10)
* @returns {Promise<string>} Hashed password
* @throws {Error} If password is invalid
*/
async function hashPassword(password, rounds = 10) {
if (!password || typeof password !== 'string') {
throw new Error('Password must be a non-empty string');
}
if (password.length < 8) {
throw new Error('Password must be at least 8 characters');
}
return await bcrypt.hash(password, rounds);
}
/**
* Verify a password against a hash
* @param {string} password - Plain text password
* @param {string} hash - Hashed password
* @returns {Promise<boolean>} True if password matches
*/
async function verifyPassword(password, hash) {
if (!password || !hash) {
return false;
}
return await bcrypt.compare(password, hash);
}
module.exports = { hashPassword, verifyPassword };
Utility Types
- Validation Utilities: Input validation, data validation
- Formatting Utilities: Date formatting, number formatting, text formatting
- Transformation Utilities: Data transformation, conversion functions
- Security Utilities: Password hashing, token generation, encryption
- Helper Functions: Common operations, calculations, string manipulation
- Constants: Shared constants, configuration values
Best Practices
- Pure Functions: Prefer pure functions when possible
- Error Handling: Comprehensive error handling
- Input Validation: Validate all inputs
- Documentation: Document function purpose, parameters, return values
- Reusability: Make utilities reusable
- Testing: Comprehensive test coverage
- Performance: Consider performance implications
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?