agent-tool-contracts

agent-tool-contracts is a skill for Claude Code from charlieviettq/awesome-agent-skill. It costs 46 tokens per session (389 once invoked), scanned A, original, MIT.

A set of rules for designing tools and command-line interfaces that AI agents can call safely and understand reliably. It covers names, inputs, errors, side effects, retries, and output limits.

In plain words
What is it for?
Use it to define agent tools, SDK interfaces, or AI-focused command-line commands, including their schemas, error messages, retry behavior, pagination, JSON output, and dry-run support.
Why use it?
Poorly described tools can be misunderstood, called with invalid data, or repeat an action accidentally. Clear contracts make tool behavior more predictable for both agents and developers.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it to define agent tools, SDK interfaces, or AI-focused command-line commands, including their schemas, error messages, retry behavior, pagination, JSON output, and dry-run support.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/charlieviettq/awesome-agent-skill/agent-tool-contracts
Install

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.

Any agent
npx skills add charlieviettq/awesome-agent-skill --skill agent-tool-contracts
Clone the repo
git clone --depth 1 https://github.com/charlieviettq/awesome-agent-skill

Made for: Claude Code.

Wrote 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.

agentmods badge for agent-tool-contracts

README.md
[![agentmods](https://agentmods.dev/badge/skills/charlieviettq/awesome-agent-skill/agent-tool-contracts/github.svg)](https://agentmods.dev/skills/charlieviettq/awesome-agent-skill/agent-tool-contracts)
Your own site
<a href="https://agentmods.dev/skills/charlieviettq/awesome-agent-skill/agent-tool-contracts"><img src="https://agentmods.dev/badge/skills/charlieviettq/awesome-agent-skill/agent-tool-contracts/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for agent-tool-contracts

Your own site · 80×15
<a href="https://agentmods.dev/skills/charlieviettq/awesome-agent-skill/agent-tool-contracts"><img src="https://agentmods.dev/badge/skills/charlieviettq/awesome-agent-skill/agent-tool-contracts.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 46 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 389 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00046 $0.00389
Opus 5 $0.00023 $0.00195
Sonnet 5 $0.00009 $0.00078
Haiku 4.5 $0.00005 $0.00039

Measured 11d ago against content hash b18e4542b4fc, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

agent-tool-contracts 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 11d 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.

.claude/skills/agent-tool-contracts/SKILL.md · 48 lines

What it actually says

Agent tool contracts

Tool design rules

  1. Verb-noun namessearch_issues, create_draft_pr (not doStuff).
  2. Minimal parameters — fewer required fields; sensible defaults in description.
  3. Explicit side effects — "Creates...", "Deletes...", "Read-only" in description.
  4. Bounded output — paginate or truncate; return summary + pointer for large data.
  5. Stable errors{ "code": "NOT_FOUND", "message": "..." }.

Schema quality

  • Types and enums for categorical fields.
  • Examples in parameter descriptions.
  • Reject unknown enums at validation layer.

Idempotency and safety

Operation Pattern
Read Safe to retry
Create Idempotency key or dedupe by natural key
Update Version or ETag when concurrent edits possible
Delete Soft delete or two-step confirm in description

AI-native CLI (when applicable)

  • --json for machine output; stable field names.
  • Exit codes: 0 success, non-zero with stderr message.
  • --dry-run for mutating commands.

Review checklist

  • Description tells the model when NOT to use the tool
  • Errors actionable (what to fix, not internal codes only)
  • No overlapping tools with ambiguous choice
  • Integration test with representative agent prompts

mcp-builder for MCP-specific packaging; agent-evaluation for measuring tool accuracy.

Changes

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.

  1. 11d ago First seen · 48 lines · 46 tokens per session scan A b18e4542b4fc

Subscribe to this mod's changes

agent-tool-contracts is a skill published in the GitHub repository charlieviettq/awesome-agent-skill (25 stars, last pushed 1mo ago), licensed MIT. It adds 46 tokens to every session and 389 once invoked, about $0.0002 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-08-30.

Related

Other skills, from other repositories

api-tester

A tool for creating and checking API tests from the real API contract and implementation. An API is the agreed way that software sends requests and receives responses.

laolaoshiren/claude-code-skills-zh · 86 tokens

ash-framework

Ash Framework — resources, actions, policies, aggregates, calculations, AshPhoenix.Form, LiveView, migrations. Use when generating resources via mix ash.codegen, editing changes, checks, types, validations, or domain code interfaces.

oliver-kriska/claude-elixir-phoenix · 48 tokens

deploy

Elixir/Phoenix deployment patterns — Dockerfile, fly.toml, runtime.exs, mix release, rel/ overlays. Use when configuring Fly.io, Docker, CI/CD, health checks, or production migrations.

oliver-kriska/claude-elixir-phoenix · 46 tokens

liveview-patterns

Build LiveView: async data (assignasync), PubSub (check connected?), phx-change events, form components/modals/uploads, streams for lists, livepatch. Use when handling interactions, debugging events, or tracking Presence.

oliver-kriska/claude-elixir-phoenix · 51 tokens

tidewave-integration

Tidewave MCP runtime tools — debugging, smoke testing, live state inspection, SQL queries, hex docs. Use when evaluating code in a running Phoenix app.

oliver-kriska/claude-elixir-phoenix · 38 tokens

oban

Oban job processing — workers, perform/1 (OSS) and process/1 (Pro), queues, cron, retries, unique jobs, idempotency, Oban Pro (Workflow, Batch, Chunk, Smart Engine), Testing. Use when writing Oban workers, queue config, or debugging jobs.

oliver-kriska/claude-elixir-phoenix · 64 tokens