convert

A command for converting data or code between supported formats, languages, and schemas.

In plain words
What is it for?
Converting JSON to TypeScript types, OpenAPI specifications to client SDKs, SQL to ORM models, CSV to JSON, and other listed format pairs.
Why use it?
It removes repetitive manual translation work and provides a defined way to turn one representation into another.

Command

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.

agentmods
npx agentmods add commands/gopherguides/gopher-ai/convert
Clone the repo
git clone --depth 1 https://github.com/gopherguides/gopher-ai
Per session 9 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 809 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 $0.00009 $0.00809
Opus 5 $0.00005 $0.00404
Sonnet 5 $0.00002 $0.00162
Haiku 4.5 $0.00001 $0.00081

Measured 2d ago against content hash 21aea8990e2f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

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

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.

plugins/llm-tools/commands/convert.md · 157 lines

How it starts

The opening of the file, as written. The whole thing — 157 lines — stays where its author put it; the contents beside it link to each section on GitHub.

If $ARGUMENTS is empty or not provided:

Show available conversion types and usage.

Usage: /convert <from> <to> [file]

Examples:

  • /convert json typescript - JSON to TypeScript types
  • /convert openapi sdk - OpenAPI spec to client SDK
  • /convert sql prisma - SQL schema to Prisma models
  • /convert csv json data.csv - CSV file to JSON
  • /convert yaml json config.yaml - YAML to JSON

Supported Conversions:

From To Description
json typescript JSON to TS interfaces
openapi sdk OpenAPI to client code
sql prisma/typeorm SQL to ORM models
protobuf typescript Proto to TS types
csv json CSV to JSON array
yaml json YAML to JSON
graphql typescript GraphQL to TS types

What would you like to convert?


If $ARGUMENTS is provided:

Parse arguments and perform the conversion.

Configuration

Parse arguments:

  • From: Source format (first argument)
  • To: Target format (second argument)
  • File: Optional input file (third argument)

Steps

1. Detect Conversion Type

Match the <from> <to> pair against the Supported Conversions table above. If the pair is unsupported, say so and list the supported pairs.

2. Read Input

If file provided:

cat <file>

If no file, look for common sources:

# OpenAPI
cat openapi.yaml swagger.json api.yaml 2>/dev/null | head -1

# SQL
cat schema.sql migrations/*.sql 2>/dev/null | head -1

# GraphQL
cat schema.graphql *.graphql 2>/dev/null | head -1

Or ask user to paste input.

3. Perform Conversion

Read the section for the requested conversion type in ${CLAUDE_PLUGIN_ROOT}/references/conversion-examples.md and match its input/output style: idiomatic target-language types, nested structures resolved into named types, comments preserved where possible.

4. Output Result

Write to file or display:

## Conversion Complete

**From**: JSON
**To**: TypeScript

### Output

[Generated code]

### File Created

`types/user.ts` (45 lines)

Read the full file on GitHub · 157 lines

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. 2d ago First seen · 157 lines · 9 tokens per session scan A 21aea8990e2f

Subscribe to this mod's changes

convert is a command published in the GitHub repository gopherguides/gopher-ai (21 stars, last pushed 2d ago), licensed MIT. It adds 9 tokens to every session and 809 once invoked, about $0.0000 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.