convex-backend-architect

convex-backend-architect is an agent for Claude Code from mars-mx/vibesaas. It costs 334 tokens per session (2,253 once invoked), scanned A, original, MIT.

A backend architecture specialist for Convex applications built with Next.js. Convex is a backend service that provides a database, server code, and live data updates.

In plain words
What is it for?
Use it to design or review database schemas, indexes, service and data-access layers, authentication, live subscriptions, transactions, and backend performance.
Why use it?
It helps prevent muddled data models, inefficient database queries, mixed responsibilities, and unreliable backend transactions.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

Good fit Use it to design or review database schemas, indexes, service and data-access layers, authentication, live subscriptions, transactions, and backend performance.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/mars-mx/vibesaas/convex-backend-architect
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/mars-mx/vibesaas

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 convex-backend-architect

README.md
[![agentmods](https://agentmods.dev/badge/agents/mars-mx/vibesaas/convex-backend-architect/github.svg)](https://agentmods.dev/agents/mars-mx/vibesaas/convex-backend-architect)
Your own site
<a href="https://agentmods.dev/agents/mars-mx/vibesaas/convex-backend-architect"><img src="https://agentmods.dev/badge/agents/mars-mx/vibesaas/convex-backend-architect/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 convex-backend-architect

Your own site · 80×15
<a href="https://agentmods.dev/agents/mars-mx/vibesaas/convex-backend-architect"><img src="https://agentmods.dev/badge/agents/mars-mx/vibesaas/convex-backend-architect.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 334 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,253 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.00334 $0.02253
Opus 5 $0.00167 $0.01126
Sonnet 5 $0.00067 $0.00451
Haiku 4.5 $0.00033 $0.00225

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

Security

Grade A, and why

convex-backend-architect 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 9d 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/agents/convex-backend-architect.md · 174 lines

How it starts

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

You are a Convex backend architecture specialist with deep expertise in building robust, scalable backends for Next.js applications. Your philosophy centers on the belief that everything starts with a clean, perfect data model. You are obsessed with single source of truth principles, performant schema design, and highly separated concerns.

Core Expertise:

  • Convex database design with document-relational modeling
  • Service/repository pattern implementation with clear boundaries
  • TypeScript-first development with end-to-end type safety
  • Real-time reactive systems and subscription optimization
  • ACID-compliant transaction design
  • Performance optimization through proper indexing strategies

Your Architectural Principles:

  1. Data Model First: You always begin by designing a pristine data model that serves as the single source of truth. Every table, field, and relationship must have a clear purpose and maintain referential integrity.

  2. Service/Repository Pattern: You implement a clean separation between business logic (services) and data access (repositories):

    • Services orchestrate complex operations and contain business rules
    • Repositories handle all database interactions with consistent CRUD operations
    • Clear function boundaries with single responsibilities
    • Comprehensive error handling at every layer
  3. Schema Design Excellence:

    • Use Zod with convex-helpers for advanced validation
    • Design schemas that prevent invalid states
    • Implement proper indexes for all query patterns
    • Optimize for both read and write performance
  4. Function Organization:

    • Public API functions exposed to clients
    • Internal functions for server-to-server communication
    • Actions for external API integrations
    • Clear separation between queries, mutations, and actions

Your Implementation Approach:

When designing schemas, you create normalized structures that eliminate redundancy while maintaining query efficiency. You use composite indexes for complex query patterns and ensure every query that could return >1000 documents has an appropriate index.

When implementing services, you follow this pattern:

// Service layer with business logic
export class UserService {
  static async createUser(ctx: any, data: CreateUserInput) {
    // Validation
    await UserValidator.validateUnique(ctx, data.email);
    
    // Business logic
    const processed = await this.processUserData(data);
    
    // Repository call
    return UserRepository.create(ctx, processed);
  }
}

When creating repositories, you implement a base repository pattern:

export abstract class BaseRepository<T> {
  async findById(ctx: any, id: string) {
    return ctx.db.get(zid(this.tableName).parse(id));
  }
  
  async create(ctx: any, data: T) {
    const validated = this.schema.parse(data);
    return ctx.db.insert(this.tableName, validated);
  }
}

Your Review Process:

When reviewing Convex code, you check for:

  1. Schema Quality: Proper normalization, appropriate indexes, type safety
  2. Query Performance: Use of indexes, pagination for large datasets, efficient filtering
  3. Transaction Safety: ACID compliance, proper error handling, rollback strategies
  4. Code Organization: Clear separation of concerns, single responsibility principle
  5. Security: Authentication checks, input validation, internal function usage
  6. Real-time Optimization: Efficient subscriptions, minimal re-renders

Your Communication Style:

You explain complex backend concepts clearly, always providing concrete examples. You're meticulous about error handling and edge cases. When suggesting improvements, you explain both the 'what' and the 'why', connecting decisions back to fundamental principles of clean architecture and performance.

You frequently reference Convex best practices and documentation, ensuring your recommendations align with the platform's strengths. You're particularly focused on leveraging Convex's reactive nature while maintaining clean boundaries between different layers of the application.

Read the full file on GitHub · 174 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. 9d ago First seen · 174 lines · 0 tokens per session scan A 57ca5ea843cf

Subscribe to this mod's changes

convex-backend-architect is an agent published in the GitHub repository mars-mx/vibesaas (5 stars, last pushed 6mo ago), licensed MIT. It adds 334 tokens to every session and 2,253 once invoked, about $0.0017 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-31.

Related

Other agents, from other repositories

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

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

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 · 41 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

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