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 agentmods add commands/thebeardedbearsas/claude-craft/generate-hookgit clone --depth 1 https://github.com/TheBeardedBearSAS/claude-craftWrote 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/commands/thebeardedbearsas/claude-craft/generate-hook)<a href="https://agentmods.dev/commands/thebeardedbearsas/claude-craft/generate-hook"><img src="https://agentmods.dev/badge/commands/thebeardedbearsas/claude-craft/generate-hook.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.00006 | $0.04052 |
| Opus 5 | $0.00003 | $0.02026 |
| Sonnet 5 | $0.00001 | $0.00810 |
| Haiku 4.5 | $0.00001 | $0.00405 |
Grade A, and why
generate-hook scanned grade A with 1 finding 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 2d 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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
const response = await fetch(url, { How it starts
The opening of the file, as written. The whole thing — 678 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Génération Custom Hook React
Tu es un développeur React senior. Tu dois générer un custom hook React avec TypeScript, tests et documentation.
Arguments
$ARGUMENTS
Arguments :
- Nom du hook (ex:
useDebounce,useLocalStorage,useFetch) - (Optionnel) Description du comportement
Exemple : /react:generate-hook useDebounce ou /react:generate-hook useFetch "Hook pour fetch avec cache"
MISSION
Étape 1 : Structure du Hook
src/
└── hooks/
├── index.ts
└── {hookName}/
├── index.ts
├── {hookName}.ts
├── {hookName}.types.ts
└── {hookName}.test.ts
Étape 2 : Types
// src/hooks/{hookName}/{hookName}.types.ts
/**
* Options pour le hook {hookName}
*/
export interface {HookName}Options {
/**
* Délai en millisecondes
* @default 500
*/
delay?: number;
/**
* Activer/désactiver le hook
* @default true
*/
enabled?: boolean;
/**
* Callback appelé lors du changement
*/
onChange?: (value: unknown) => void;
}
/**
* Retour du hook {hookName}
*/
export interface {HookName}Return<T> {
/**
* La valeur actuelle
*/
value: T;
/**
* Fonction pour mettre à jour la valeur
*/
setValue: (value: T | ((prev: T) => T)) => void;
/**
* Indique si le hook est en cours de traitement
*/
isPending: boolean;
/**
* Réinitialiser à la valeur initiale
*/
reset: () => void;
}
Étape 3 : Implémentation - Exemples de Hooks Courants
useDebounce
// src/hooks/useDebounce/useDebounce.ts
import { useState, useEffect, useCallback, useRef } from 'react';
export interface UseDebounceOptions {
delay?: number;
leading?: boolean;
}
export interface UseDebounceReturn<T> {
debouncedValue: T;
isPending: boolean;
cancel: () => void;
flush: () => void;
}
export function useDebounce<T>(
value: T,
options: UseDebounceOptions = {}
): UseDebounceReturn<T> {
const { delay = 500, leading = false } = options;
const [debouncedValue, setDebouncedValue] = useState<T>(
leading ? value : (undefined as T)
);
const [isPending, setIsPending] = useState(false);
const timeoutRef = useRef<NodeJS.Timeout | null>(null);
const valueRef = useRef(value);
useEffect(() => {
valueRef.current = value;
}, [value]);
useEffect(() => {
setIsPending(true);
if (leading && timeoutRef.current === null) {
setDebouncedValue(value);
}
timeoutRef.current = setTimeout(() => {
setDebouncedValue(value);
setIsPending(false);
timeoutRef.current = null;
}, delay);
return () => {
if (timeoutRef.current) {
clearTimeout(timeoutRef.current);
}
};
}, [value, delay, leading]);
const cancel = useCallback(() => {
if (timeoutRef.current) {
clearTimeout(timeoutRef.current);
timeoutRef.current = null;
}
setIsPending(false);
}, []);
const flush = useCallback(() => {
if (timeoutRef.current) {
clearTimeout(timeoutRef.current);
timeoutRef.current = null;
}
setDebouncedValue(valueRef.current);
setIsPending(false);
}, []);
return { debouncedValue, isPending, cancel, flush };
}
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.
- 2d ago First seen · 678 lines · 6 tokens per session scan A e6424067e1c3
generate-hook is a command published in the GitHub repository TheBeardedBearSAS/claude-craft (105 stars, last pushed 3d ago), licensed MIT. It adds 6 tokens to every session and 4,052 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other commands, from other repositories
security-scan
Run security audit on codebase.
component-gen
Generate React or Vue components with prop types, styling, accessibility, and tests.
implement
You are in full autonomous implementation mode. Follow the VisionAgent agentic task approach from CLAUDE.md rigorously.
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
specify
Create or update the feature specification from a natural language feature description.