query-code-change-writer

query-code-change-writer is an agent for Claude Code from voro6yov/spec-driven-development. It costs 91 tokens per session (6,863 once invoked), scanned A, original, Apache-2.0.

A code-change agent for concrete SQLAlchemy query repositories. SQLAlchemy is a Python library for working with databases, and the agent applies repository method changes and stated query filters from a domain updates report.

In plain words
What is it for?
Use it to add or remove finder methods and update database query conditions after domain changes.
Why use it?
It keeps the concrete query repository in step with changed interfaces and rules such as excluding soft-deleted records.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

Part of the persistence-spec plugin — 2 skills, 23 agents shipped together

Good fit Use it to add or remove finder methods and update database query conditions after domain changes.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/voro6yov/spec-driven-development/query-code-change-writer
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/voro6yov/spec-driven-development

Made for: Claude Code.

Or install persistence-spec, the plugin that ships this one along with the rest of its 2 skills, 23 agents.

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 query-code-change-writer

README.md
[![agentmods](https://agentmods.dev/badge/agents/voro6yov/spec-driven-development/query-code-change-writer/github.svg)](https://agentmods.dev/agents/voro6yov/spec-driven-development/query-code-change-writer)
Your own site
<a href="https://agentmods.dev/agents/voro6yov/spec-driven-development/query-code-change-writer"><img src="https://agentmods.dev/badge/agents/voro6yov/spec-driven-development/query-code-change-writer/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 query-code-change-writer

Your own site · 80×15
<a href="https://agentmods.dev/agents/voro6yov/spec-driven-development/query-code-change-writer"><img src="https://agentmods.dev/badge/agents/voro6yov/spec-driven-development/query-code-change-writer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 91 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 6,863 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.00091 $0.06863
Opus 5.5 $0.00036 $0.02745
Sonnet 5.5 $0.00018 $0.01373
Haiku 4.5 $0.00009 $0.00686

Measured 12d ago against content hash 6029dfd4d63f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

query-code-change-writer 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 12d 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/persistence-spec/agents/query-code-change-writer.md · 328 lines

How it starts

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

You are the query-repository code-update agent — Phase 2's sibling to @code-change-writer, dedicated to query-side concerns that are not captured in the persistence (command-side) spec. You own two query-side jobs on the concrete SqlAlchemyQuery<X>Repository module:

  1. Structural method deltas. When a finder is added to / removed from the abstract Query<X>Repository, Wave A propagates it to the domain ABC — but nothing else in the cascade implements it on the concrete repository (the persistence command-side chain is driven by the command-repo spec only, and the application / REST layers only call the finder). You implement the new concrete method (or delete the gone one) so the class stays instantiable — every @abstractmethod has a concrete override — and the application service's call resolves instead of AttributeError-ing.
  2. Invariant clauses. Query-side behavior (default filters, soft-delete exclusion) is expressed as prose invariants in the domain diagram, not in any spec sibling. You bridge that invariant prose to surgical WHERE-clause edits.

Both signals live in the same ### \QueryRepository` `<>`block of.domain/updates.md: the Members:method bullets drive job 1; theProse — …:` invariant bullets drive job 2.

Pattern doc (umbrella resolution). Resolve <patterns_dir> as the directory containing the persistence-spec:patterns umbrella SKILL.md (auto-loaded via this agent's frontmatter; its loaded context reveals its location). Before any method synthesis, Read <patterns_dir>/query-repository/index.md in full. If the folder is missing, abort with Error: pattern 'query-repository' has no folder under the persistence-spec:patterns umbrella at <patterns_dir>.

Domain schema (umbrella resolution). Resolve <update_reports_dir> as the directory containing the spec-core:update-reports umbrella SKILL.md (auto-loaded via this agent's frontmatter; its loaded context reveals its location) and Read <update_reports_dir>/domain/index.md in full — the schema of the <stem>.domain/updates.md report this agent parses. If the folder is missing, abort with Error: 'domain/index.md' not found under the spec-core:update-reports umbrella at <update_reports_dir>.

You do not read the persistence updates report, do not read code-brief.md, do not load the command-repo-spec.md for dispatch (you do read its §1 block for the aggregate root name and the multi-tenancy flag). You do read <stem>.domain/updates.md — parsing both the **Members:** method deltas and the **Prose — …:** controlled phrasings under ### \QueryRepository` `<>`` blocks — plus, when a method delta is present, the working-tree domain diagram for the added finder's full signature and its return-DTO field list. You translate these into appended / removed concrete methods and per-method WHERE-clause edits.

Arguments

  • <domain_diagram>: path to the diagram at <dir>/<stem>.md. All sibling paths derive from this per spec-core:naming-conventions.
  • <locations_report_text>: verbatim Markdown output from @spec-core:target-locations-finder. The orchestrator runs the finder once and passes its report into every per-layer implement agent. You parse this to resolve the Repository row's absolute path (the directory holding <aggregate>/sql_alchemy_query_<aggregate>_repository.py). Never invoke the finder yourself.

Read the full file on GitHub · 328 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. 12d ago First seen · 328 lines · 91 tokens per session scan A 6029dfd4d63f

Subscribe to this mod's changes

query-code-change-writer is an agent published in the GitHub repository voro6yov/spec-driven-development (5 stars, last pushed 12d ago), licensed Apache-2.0. It adds 91 tokens to every session and 6,863 once invoked, about $0.0004 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-10-04.

Related

Other agents, from other repositories

cqrs-specialist

Use for event-driven and CQRS work: command/outbox writes, idempotent projectors, and read-model handlers. Domain-neutral; never catches errors inside a transaction boundary.

mnzralee/claude-multi-agent-architecture · 0 tokens

supabase-architect

Projeta schema + RLS + topologia realtime antes da primeira migration. Entrega plano arquitetural (schema, RLS, realtime, branching). Use ao iniciar app Supabase. Não escreve código. (pesado).

luanpdd/kit-mcp · 50 tokens

evolution-go-integrator

Gera tabelas orgwhatsappconfigs + whatsappmessages, webhook Edge Function e send queue pgmq para WhatsApp (Evolution Go ou Meta Cloud API) em Supabase B2B multi-tenant. (pesado — despacha.

luanpdd/kit-mcp · 53 tokens

Backend Architect

Senior backend architect specializing in scalable system design, database architecture, API development, and cloud infrastructure. Builds robust, secure, performant server-side applications and microservices.

criptogus/agent-evolve-network · 34 tokens

backend-architect

Design RESTful APIs, microservice boundaries, and database schemas. Reviews system architecture for scalability and performance bottlenecks. Use PROACTIVELY when creating new backend services or APIs.

einverne/dotfiles · 41 tokens

backend

A back-end development agent for the server-side parts of an application, including APIs, databases, authentication, and infrastructure. An API lets software exchange data, while authentication checks identity and authorization controls access.

workdd/my_claude_code_setting · 89 tokens