agent-schema-refactorer

agent-schema-refactorer is an agent for Claude Code from yaleh/meta-cc. It costs 35 tokens per session (2,186 once invoked), scanned A, original, MIT.

An API schema refactoring guide for safely reordering parameters and improving schema structure. An API schema describes the inputs that software services accept.

In plain words
What is it for?
It helps inspect JSON, OpenAPI, Swagger, and GraphQL schemas, identify parameters to reorder, plan changes, run tests, check compilation, and document the result.
Why use it?
It helps improve readability without changing how existing clients work, while checking that the format supports safe reordering.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md).

Good fit It helps inspect JSON, OpenAPI, Swagger, and GraphQL schemas, identify parameters to reorder, plan changes, run tests, check compilation, and document the result.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/yaleh/meta-cc/agent-schema-refactorer
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.

Clone the repo
git clone --depth 1 https://github.com/yaleh/meta-cc

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-schema-refactorer

README.md
[![agentmods](https://agentmods.dev/badge/agents/yaleh/meta-cc/agent-schema-refactorer/github.svg)](https://agentmods.dev/agents/yaleh/meta-cc/agent-schema-refactorer)
Your own site
<a href="https://agentmods.dev/agents/yaleh/meta-cc/agent-schema-refactorer"><img src="https://agentmods.dev/badge/agents/yaleh/meta-cc/agent-schema-refactorer/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-schema-refactorer

Your own site · 80×15
<a href="https://agentmods.dev/agents/yaleh/meta-cc/agent-schema-refactorer"><img src="https://agentmods.dev/badge/agents/yaleh/meta-cc/agent-schema-refactorer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 35 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,186 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.00035 $0.02186
Opus 5.5 $0.00014 $0.00874
Sonnet 5.5 $0.00007 $0.00437
Haiku 4.5 $0.00003 $0.00219

Measured 3mo ago against content hash 195f69ac33d1, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

agent-schema-refactorer 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 3mo 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.

_experiments/bootstrap-006-api-design/agents/agent-schema-refactorer.md · 316 lines

How it starts

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

λ(schema, convention) → refactoring | ∀param ∈ parameters:

refactor :: (Schema, Convention) → Refactoring_Result refactor(S, C) = verify_json_property(S) → identify_targets(S, C) → plan_changes() → make_changes() → run_tests() → verify_compilation() → confirm_backward_compat() → document() → update_docs()

verify_json_property :: Schema → JSON_Verification verify_json_property(S) = { format_check: { is_json: S.format ∈ {"json_schema", "openapi", "graphql"}, spec: "RFC 8259", guarantee: "Object properties are unordered", implication: "Reordering parameters is safe" },

valid_for: ["JSON", "OpenAPI/Swagger", "GraphQL arguments"], invalid_for: ["Positional arguments", "Array ordering", "CSV"],

decision: if format_check.is_json then {safe_to_reorder: true, reason: "JSON property order irrelevant"} else {safe_to_reorder: false, reason: "Order matters for format"},

return { format: S.format, safe_to_reorder: decision.safe_to_reorder, guarantee: format_check.guarantee, verification: ∀call → call(old_order) = call(new_order) } }

identify_targets :: (Schema, Convention) → Reordering_Targets identify_targets(S, C) = { targets: [],

∀tool ∈ S.tools → current: extract_parameter_order(tool), expected: apply_convention(tool, C),

if current ≠ expected then
  compliance: count(i | current[i] = expected[i]) / |expected|,
  changes: calculate_changes(current, expected),

  targets += {
    tool: tool.name,
    compliance_before: compliance,
    changes: changes
  },

return targets }

calculate_changes :: (Current, Expected) → Changes calculate_changes(current, expected) = { changes: [ { param: p, from: find_index(p, current), to: find_index(p, expected), tier: get_tier(p, expected) } | ∀p ∈ current where find_index(p, current) ≠ find_index(p, expected) ],

return changes }

plan_changes :: Targets → Change_Plan plan_changes(T) = { plans: [ { tool: t.tool, current_order: t.current, target_order: t.expected, changes: t.changes, tier_comments: identify_tier_comments(t.expected) } | ∀t ∈ T ],

total_lines: sum(|p.changes| | p ∈ plans),

return plans }

make_changes :: Change_Plan → Modified_Schema make_changes(P) = { modified: [],

∀plan ∈ P → tool: plan.tool,

reordered: [
  {tier_comment: tier.comment} + tier.parameters
  | ∀tier ∈ group_by_tier(plan.target_order)
],

modified += {
  tool: tool,
  before: plan.current_order,
  after: reordered,
  lines_changed: |plan.changes|
},

return modified }

run_tests :: () → Test_Results run_tests() = { unit_tests: { command: "go test ./...", result: execute(command), expected: "PASS" },

integration_tests: { command: "go test -tags=integration ./...", result: execute(command), expected: "PASS" },

api_tests: { command: "./test-api-calls.sh", result: execute(command), expected: "All calls successful" },

all_passed: unit_tests.result = "PASS" ∧ integration_tests.result = "PASS" ∧ api_tests.result = "SUCCESS",

decision: if all_passed then "Backward compatibility confirmed" else "Rollback changes, investigate failures",

return { unit: unit_tests.result, integration: integration_tests.result, api: api_tests.result, all_passed: all_passed } }

verify_compilation :: () → Build_Verification verify_compilation() = { compile: { command: "go build ./...", expected: exit_code = 0 },

lint: { command: "staticcheck ./...", expected: "no errors" },

type_check: { command: "go vet ./...", expected: exit_code = 0 },

all_passed: compile.result = 0 ∧ lint.result = "no errors" ∧ type_check.result = 0,

return { compile_success: compile.result = 0, lint_clean: lint.result = "no errors", type_check_pass: type_check.result = 0, all_passed: all_passed } }

Read the full file on GitHub · 316 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. 3mo ago First seen · 316 lines · 35 tokens per session scan A 195f69ac33d1

Subscribe to this mod's changes

agent-schema-refactorer is an agent published in the GitHub repository yaleh/meta-cc (22 stars, last pushed 7d ago), licensed MIT. It adds 35 tokens to every session and 2,186 once invoked, about $0.0001 per session on Opus 5.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

agent-schema-refactorer compared with agents from other repositories

agent-schema-refactorer next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
agent-schema-refactoreryaleh/meta-ccAgent227d agoMITA35Claude Code
php-developerdavepoon/buildwithclaudeAgent3.8ktodayMITA51Claude Code
backend-reviewerjeremylongshore/tons-of-skills-marketplaceAgent3.0k2d agoMITA36Claude Code
openai-api-expert0xfurai/claude-code-subagentsAgent1.0k26d agoMITA23Claude Code
integrations-engineeravelikiy/great_ctoAgent11717d agoMITA106Claude Code
gatetonone-ai/tononeAgent85yesterdayMITA19Claude Code
broadcasting-agentSofttor/nestjs-hexagonalAgent518d agoMITA58Claude Code