visionagent: Command for Claude Code

.claude/commands/add-tool.md

add-tool is a command for Claude Code from sijeeshmiziha/visionagent. It costs 0 tokens per session (488 once invoked), scanned A, original, MIT.

A command that scaffolds and implements a new tool for VisionAgent, following the structure of an existing tool.

In plain words
What is it for?
Use it to add a named tool to an existing or new module, connect its exports, and create its test file.
Why use it?
It reduces the manual work of creating files, exports, input validation, and tests for a new tool.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution.

This is sijeeshmiziha/visionagent's own configuration. It tells Claude Code how to work on visionagent itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything visionagent configures →

Reuse

Borrowing it

Nothing to install: this file belongs to sijeeshmiziha/visionagent. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/sijeeshmiziha/visionagent/main/.claude/commands/add-tool.md
Clone the repo
git clone --depth 1 https://github.com/sijeeshmiziha/visionagent

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 add-tool

README.md
[![agentmods](https://agentmods.dev/badge/commands/sijeeshmiziha/visionagent/add-tool.svg)](https://agentmods.dev/commands/sijeeshmiziha/visionagent/add-tool)
Your own site
<a href="https://agentmods.dev/commands/sijeeshmiziha/visionagent/add-tool"><img src="https://agentmods.dev/badge/commands/sijeeshmiziha/visionagent/add-tool.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 488 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00000 $0.00488
Opus 5 $0.00000 $0.00244
Sonnet 5 $0.00000 $0.00098
Haiku 4.5 $0.00000 $0.00049

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

Security

Grade A, and why

add-tool 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 6d 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/commands/add-tool.md · 90 lines

What it actually says

Add New Tool

Scaffold and implement a new tool for VisionAgent.

Arguments

$ARGUMENTS (Format: " " e.g., "figma get-variables Retrieves all variables from a Figma file")

Steps

1. Parse Arguments

Extract:

  • module: figma | stitch | (new module name)
  • tool-name: kebab-case name
  • description: what this tool does

2. Read Existing Tool for Pattern

Read one existing tool from src/modules/<module>/tools/ to understand the exact pattern used.

3. Create Tool File

Create src/modules/<module>/tools/<tool-name>.ts:

import { z } from 'zod';
import type { ToolConfig } from '@/lib/types';

const <ToolName>InputSchema = z.object({
  // Define input parameters with .describe() on each field
});

export const <toolCamelCase>Tool: ToolConfig<typeof <ToolName>InputSchema> = {
  name: '<tool-name>',
  description: '<description>',
  input: <ToolName>InputSchema,
  handler: async (input) => {
    // Implementation
  },
};

4. Export the Tool

  • Add to src/modules/<module>/tools/index.ts
  • Add to src/modules/<module>/index.ts
  • Add to src/index.ts

5. Write Tests

Create tests/tools/<tool-name>.test.ts:

  • Test happy path with MSW mock
  • Test error handling (API errors, invalid input)
  • Test input validation (Zod schema)

Run: npm test

6. Add Example

Create examples/<module>/<tool-name>.ts:

import { createModel, <toolCamelCase>Tool, runAgent } from 'visionagent';

// Minimal working example

Register in examples/lib/registry.ts.

Test the example:

npm run example -- examples/<module>/<tool-name>.ts

7. Quality Gates

npm run typecheck
npm run lint:fix
npm run build
npm run ci

Report: tool created, tests written, example added, CI status.

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. 6d ago First seen · 90 lines · 0 tokens per session scan A 36856ac32494

Subscribe to this mod's changes

add-tool is a command published in the GitHub repository sijeeshmiziha/visionagent (2 stars, last pushed 5mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 488 tokens. 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-31.