Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add berkcangumusisik/claude-code-practices --skill util-functiongit clone --depth 1 https://github.com/berkcangumusisik/claude-code-practicesWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/berkcangumusisik/claude-code-practices/util-function)<a href="https://agentmods.dev/skills/berkcangumusisik/claude-code-practices/util-function"><img src="https://agentmods.dev/badge/skills/berkcangumusisik/claude-code-practices/util-function.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00015 | $0.00352 |
| Opus 5 | $0.00008 | $0.00176 |
| Sonnet 5 | $0.00003 | $0.00070 |
| Haiku 4.5 | $0.00002 | $0.00035 |
Grade A, and why
util-function scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
What it actually says
Generate Utility Function
Description: $ARGUMENTS
- Check if a similar utility already exists:
grep -rn "export.*function\|export const" src/utils/ src/lib/ src/helpers/ 2>/dev/null | head -20
-
If a similar one exists, consider extending it instead of creating a new one.
-
Implement the function:
- Pure function (no side effects) where possible
- Full TypeScript generics/types
- Handle edge cases: null, undefined, empty arrays/strings, negative numbers
- Performance-conscious for likely large inputs
-
Write unit tests covering:
- Normal usage
- Edge cases
- Type narrowing behavior
-
Place in the appropriate utils file or create
src/utils/<name>.ts. -
Add a usage example in JSDoc.
Example output:
/**
* Chunks an array into smaller arrays of the specified size.
* @example chunk([1,2,3,4,5], 2) // [[1,2],[3,4],[5]]
*/
export function chunk<T>(arr: T[], size: number): T[][] {
if (size <= 0) return []
return Array.from({ length: Math.ceil(arr.length / size) }, (_, i) =>
arr.slice(i * size, i * size + size)
)
}
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 4d ago First seen · 49 lines · 15 tokens per session scan A 5c888c86a5d3
util-function is a skill published in the GitHub repository berkcangumusisik/claude-code-practices (10 stars, last pushed 4mo ago), licensed MIT. It adds 15 tokens to every session and 352 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other skills, from other repositories
rspec
This skill should be used when the user asks to "write specs", "create spec", "add RSpec tests", "fix failing spec", or mentions RSpec, describe blocks, it blocks, expect syntax, test doubles, or matchers. Should also be used when editing spec.rb files, working in spec/ directory, planning implementation phases that…
jest-patterns
Jest and Vitest testing patterns including describe/it blocks, expect matchers, mocking, and async test strategies for JavaScript and TypeScript.
javascript-typescript-jest
Best practices for writing JavaScript/TypeScript tests using Jest, including mocking strategies, test structure, and common patterns.
vitest
Provides comprehensive guidance for Vitest testing framework including fast test execution, Vite integration, component testing, mocking, and configuration. Use when the user asks about Vitest, needs to write fast unit tests, test Vue/React components, or configure Vitest with Vite projects.
typescript
TypeScript strict mode with eslint and jest.
jest-unit
Unit testing skill using Jest for TypeScript and JavaScript, covering mocking, spies, snapshots, coverage, async testing, and custom matchers.