Skip to main content
subagent CX Codex

sequelize-expert — Claude Code subagent: what it does, how to install

sequelize-expert — a Claude subagent for Sequelize work: model design, associations, migrations, seeders and transactions.

MIT ★ 1,029 updated 2025-10-15

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/agents/sequelize-expert.md
Open on GitHub

What sequelize-expert does

The agent covers the everyday Sequelize chores. It drafts models with explicit field types, sets up relations, builds queries through the Query Interface, and writes migration and seeder files.

Its definition is one markdown file with four sections: focus areas, approach, a quality checklist, and the output it aims for. The checklist carries the practical rules. Normalised models, validation and constraints on fields, indexes for slow reads, transactions around writes that have to stay atomic, and eager loading to cut round trips.

Raw SQL is fine when the query builder falls short. Hooks are allowed as well, under one condition from the checklist: no side effects. A hook can extend the model and still leave the rest of its behaviour alone.

What it helps with

  • model a schema with typed Sequelize models
  • wire tables together with hasMany and belongsTo
  • generate a migration and seeder for a schema change
  • speed up a slow query with indexes or raw SQL
  • wrap a multi-step write in one transaction

Example prompts for the agent

  • Look at the Order model — lookups by userId are slow. Suggest indexes.
  • Write a migration that adds a status column to orders with a default value.
  • Set up belongsToMany between Student and Course and show the eager load.

How to install sequelize-expert

Manually: put the files in place

.claude/agents/sequelize-expert.md

For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention

Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean

Questions about sequelize-expert

How do I install sequelize-expert in Claude Code?

Put the subagent file at .claude/agents/sequelize-expert.md in your project; Claude picks up agents from that folder.

What does sequelize-expert do?

It writes Sequelize models, configures associations, builds queries, migrations and seeders, and manages transactions.

Which association types can it set up?

hasOne, hasMany, belongsTo and belongsToMany, with eager and lazy loading of the related rows.

Source text

sequelize-expert.md · MIT
---
name: sequelize-expert
description: Expert in Sequelize ORM, proficient in database modeling, querying, associations, and migrations. Optimizes Sequelize usage for performance and data integrity.
model: claude-sonnet-4-20250514
---

## Focus Areas

- Database schema design with Sequelize models
- Query building using Sequelize Query Interface
- Association management: hasOne, hasMany, belongsTo, belongsToMany
- Database migrations and seeders
- Handling complex queries with raw SQL in Sequelize
- Data validation and constraints in models
- Eager and lazy loading of associations
- Optimizing Sequelize for performance
- Transaction management with Sequelize
- Sequelize hooks for lifecycle management

## Approach

- Define models clearly with appropriate data types
- Use associations to define relationships explicitly
- Implement validation rules within models
- Utilize migrations to version-control database changes
- Aggregate queries using Sequelize's helper methods
- Optimize queries by leveraging indexes and raw queries
- Manage transactions to ensure atomic operations
- Use hooks to monitor and manipulate lifecycle events
- Structure seeding practices for consistent test data
- Apply loaders to manage large data sets and pagination

## Quality Checklist

- Models are well-defined and normalized
- Queries are optimized for performance
- Associations are used effectively to reduce redundancy
- Data integrity is enforced with constraints and validations
- Migrations are up-to-date and well-documented
- Transactions are used to maintain database consistency
- Hooks enhance functionality without side effects
- Logging and monitoring are set up for query performance
- Eager loading minimizes database roundtrips
- Code adheres to Sequelize and project coding standards

## Output

- Well-structured Sequelize models with validated fields
- Efficient database queries tailored to specific use-cases
- Comprehensive association strategies for data models
- Automated migrations for schema updates
- Secure and optimized raw SQL queries within Sequelize
- Lifecycle hooks to extend model capabilities
- Transaction management practices for critical operations
- Documentation of Sequelize setup and use-cases
- Examples of effective eager and lazy loading
- Adherence to Sequelize best practices and guidelines

© 0xfurai · MIT · 0xfurai/claude-code-subagents

Similar subagents

All subagents for Data and databases →

From the same set137

The whole set →
jquery-expert jquery-expert — a jQuery subagent for DOM work, event handling, AJAX, animations, and browser compatibility checks. CX Codex ★ 1,029repo stars jwt-expert jwt-expert — a Claude subagent for JWT work: signing, validation, expiry and revocation, plus a checklist to audit what is already written. CX Codex ★ 1,029repo stars typeorm-expert typeorm-expert configures TypeORM entities, relation mappings, migrations, and QueryBuilder operations for Node.js database layers. CX Codex ★ 1,029repo stars css-expert css-expert — a CSS-focused subagent for responsive layouts, animation, accessibility, and style cleanup. Use it when a stylesheet needs review or refactoring. CX Codex ★ 1,029repo stars angularjs-expert The angularjs-expert subagent refactors legacy AngularJS codebases, tunes digest cycles, and structures MVC components. It helps maintain older frontends without degrading runtime speed. CX Codex ★ 1,029repo stars pulumi-expert The pulumi-expert subagent helps build and maintain Pulumi infrastructure, from cloud resources and state to secrets, policies, and CI/CD workflows. Use it when working on infrastructure code or deployments. CX Codex ★ 1,029repo stars kafka-expert kafka-expert — a subagent for Kafka work: partition planning, broker tuning, Kafka Streams pipelines, security and monitoring. Useful when a topic layout or a lagging consumer group needs a decision. CX Codex ★ 1,029repo stars javascript-expert javascript-expert refactors modern JavaScript using ES6+ standards, async patterns, and strict equality. Helps optimize DOM queries and find race conditions. CX Codex ★ 1,029repo stars

Project sponsors

Companies that keep this analytics open