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 skills/pchalasani/claude-code-tools/patternsnpx skills add pchalasani/claude-code-tools --skill patternsgit clone --depth 1 https://github.com/pchalasani/claude-code-toolsWhat 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 | $0.00026 | $0.01089 |
| Opus 5 | $0.00013 | $0.00544 |
| Sonnet 5 | $0.00005 | $0.00218 |
| Haiku 4.5 | $0.00003 | $0.00109 |
Grade B, and why
patterns scanned grade B 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.
Unrestricted tool accessmediumExcessive agency
A wildcard tool grant or "run any command" leaves no least-privilege boundary at all.
to enable ALL tools from an MCP server or just SPECIFIC tools selectively, This is a copy
100% identical to patterns — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 119 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Langroid Patterns
Instructions
Below is an INDEX of design patterns organized by category. Each item describes WHAT you might want to implement, followed by a REFERENCE to a document with a complete code example.
Scan this index to find patterns matching your needs, then consult the corresponding document.
Agent & Task Basics
-
Task Returns Tool Directly
Create a Langroid Agent equipped with a single Tool (a ToolMessage), and wrap it in a Task so that running the task returns that ToolMessage directly. Use this pattern when you want a simple LLM agent that returns a structured response.
- Reference:
./task-return-tool.md
- Reference:
Tool Handlers
-
Stateful Handler on Agent
Define a STATEFUL tool handler as a METHOD on the agent (not inside the ToolMessage). Use this pattern when: (a) the tool handler needs to execute external operations (API calls, database queries, file I/O), (b) you need to track state across retries (e.g., failure counter), (c) the handler needs access to agent-level resources (connections, configs), or (d) you want Langroid to automatically loop errors back to the LLM for self-correction. The method name must match the
requestfield of the ToolMessage. Return a string for errors (LLM sees it and can retry), or DoneTool(content=result) to terminate successfully.- Reference:
./agent-tool-handler-with-state.md
- Reference:
-
Handler with Validation
Validate tool output against agent state before accepting it. Use this pattern when: (a) the LLM's tool output must preserve certain content from the input (e.g., placeholders, required fields), (b) you want automatic retry if validation fails, (c) you need to compare tool output against context the LLM received. Define a handler method on a custom agent class that stores the input context as state, validates the tool output, and returns an error string for retry or AgentDoneTool for success (note: use AgentDoneTool, NOT DoneTool). Use
done_sequences=["T[ToolName], A"]so the handler runs before task termination.
What ships with it
7 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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 · 119 lines · 26 tokens per session scan B a5f10e981edf
patterns is a skill published in the GitHub repository pchalasani/claude-code-tools (1,989 stars, last pushed 2d ago), licensed MIT. It adds 26 tokens to every session and 1,089 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 1 finding (unrestricted tool access). It is 100% identical to patterns, differing in 0 lines, and is treated as a copy.
Other skills, from other repositories
verify-behavior
Verify or reproduce visible product behavior by driving the real UI with pi-computer-use's checked tools, requiring verified expect postconditions and durable state evidence for meaningful UI flows. Use when triage needs visual reproduction, implementation needs behavioral proof, review needs interactive confirmation…
bro
Restate the last message in plain human language, with no jargon.
database-engineer
SQLite database expertise for migrations, multi-tenant patterns, transactional safety, FTS5 virtual tables, and schema evolution. Use this skill for ANY work involving schema changes, data migrations, INSERT/UPSERT semantics, FTS5 rebuilds, transaction rollback design, multi-tenant data isolation, or SQLite…
monitoring-specialist
System monitoring, alerting, and observability implementation.
panel
Multi-provider deliberation panel for COMPLEX, multi-view questions — architecture, strategy, market research, and codebase sweeps. Runs a 4-stage deliberation across the provider fleet (diverge → contrarian red-team → adversarial verify → cited synthesis), the same multi-perspective rigour the plan-gate already…
t0-orchestrator
Master orchestration for the VNX multi-terminal system. Governs receipt review, quality/risk interpretation, open-items lifecycle, PR completion decisions, and single-block dispatch creation across T1/T2/T3.