home / skills / bankkroll / skills-builder / sequelize
This skill provides Sequelize documentation guidance on advanced associations, eager loading, transactions, and core concepts to help answer complex questions.
npx playbooks add skill bankkroll/skills-builder --skill sequelizeReview the files below or copy the command above to add this skill to your agents.
---
name: "sequelize"
description: "Scraped from https://sequelize.org/docs/v6/ Source: https://sequelize.org/docs/v6/. Use when questions involve: advanced association concepts, category, core concepts, moved, other topics."
---
# Sequelize
> Official documentation: https://sequelize.org/docs/v6/
## Overview
This skill provides comprehensive documentation for sequelize.
**Total references:** 13 files (~63,274 tokens)
**Topics covered:**
Ordering eager loaded associations, Creating an instance, Eager loading with Many-to-Many relationships, Managed transactions, Limits and Pagination, Creating the standard relationships, findOne, Defining a model as paranoid, Enforcing a foreign key reference without constraints, findAll, New databases versus existing databases, Installation...
## Reference Files
Load only the reference files relevant to the user's question:
### Advanced Association Concepts
- **[Advanced M:N Associations and more](references/advanced-association-concepts-1.md)** (~4,743 tokens)
- Topics: Through tables versus normal tables and the Super Many-to-Many association, Aliases and custom key names, Self-references
- **[Eager Loading and more](references/advanced-association-concepts-2.md)** (~6,191 tokens)
- Topics: Basic example, Multiple eager loading, Eager loading with Many-to-Many relationships
### Category
- **[Advanced Association Concepts and more](references/category.md)** (~1,267 tokens)
### Core Concepts
- **[Associations and more](references/core-concepts-1.md)** (~7,504 tokens)
- Topics: Defining the Sequelize associations, Creating the standard relationships, One-To-One relationships
- **[Model Basics and more](references/core-concepts-2.md)** (~4,355 tokens)
- Topics: Concept, Model Definition, Table name inference
- **[Model Querying and more](references/core-concepts-3.md)** (~6,453 tokens)
- Topics: Simple INSERT queries, Simple SELECT queries, Specifying attributes for SELECT queries
- **[Validations & Constraints](references/core-concepts-4.md)** (~2,060 tokens)
- Topics: Difference between Validations and Constraints, Unique Constraint, Allowingdisallowing null values
### General
- **[Getting Started and more](references/general.md)** (~1,229 tokens)
- Topics: Installing, Connecting to a database, Terminology convention
### Moved
- **[Associations and more](references/moved.md)** (~722 tokens)
- Topics: Deprecatedsequelizeimport
### Other Topics
- **[Using sequelize in AWS Lambda and more](references/other-topics-1.md)** (~7,300 tokens)
- Topics: TLDR, The Nodejs event loop, AWS Lambda function handler types in Nodejs
- **[Extending Data Types and more](references/other-topics-2.md)** (~7,991 tokens)
- Topics: Example, PostgreSQL, Available hooks
- **[Naming Strategies and more](references/other-topics-3.md)** (~6,810 tokens)
- Topics: Theunderscoredoption, Singular vs Plural, Ranges PostgreSQL only
- **[Transactions and more](references/other-topics-4.md)** (~6,649 tokens)
- Topics: Unmanaged transactions, Managed transactions, ConcurrentPartial transactions
## Usage Guidelines
1. **Identify relevant sections** - Match the user's question to the appropriate reference file(s)
2. **Load minimally** - Only read files directly relevant to the question to conserve context
3. **Cite sources** - Reference specific sections when answering
4. **Combine knowledge** - For complex questions, you may need multiple reference files
### When to use each reference:
- **Advanced Association Concepts**: Advanced Association Concepts-related features and documentation
- **Category**: Category-related features and documentation
- **Core Concepts**: Core Concepts-related features and documentation
- **General**: General documentation, overview, and getting started
- **Moved**: Moved-related features and documentation
- **Other Topics**: Other Topics-related features and documentation
This skill provides concise, actionable documentation and examples from Sequelize v6. It helps developers find authoritative guidance on associations, model definitions, querying, transactions, and less common topics like paranoid models and custom naming strategies. Use it to quickly locate patterns, options, and best practices from the official docs.
The skill inspects the official Sequelize v6 documentation and surfaces relevant sections for a given question. It maps user queries to focused reference areas (advanced associations, core concepts, transactions, etc.) and returns distilled explanations, examples, and recommended options. It favors minimal, practical guidance and points to the appropriate doc topics for deeper reading.
When should I use a through table versus a normal join table?
Use a through table when you need to store attributes on the relationship or model the join as a first-class entity. For simple M:N without extra fields, a plain join table is sufficient.
How do I avoid attribute name collisions when eager loading multiple associations?
Use aliases (as) when defining associations and reference the same alias in include clauses. This keeps include outputs distinct and predictable.
Should I rely on Sequelize validations or database constraints?
Use validations for application-level checks and user feedback. Enforce critical integrity with database constraints so the database remains consistent even outside the app.