Automated summary
This skill enforces strict rules for writing performant and safe Sequelize queries across large production schemas (employees, attendance, reports, JSON fields and encrypted columns).
Strengths
- Concrete, checkable rules: explicit attributes, mandatory pagination, raw: true for reads
- Covers advanced cases often overlooked: include trees, encrypted fields, JSON columns, SQL aggregation
- Ships a final validation checklist and asks for clarification when optimization intent is unclear
Limitations
- Tied to Sequelize (Node.js) and not applicable to Prisma, TypeORM or raw SQL
- Some guidance stays high-level without bundled code examples
- Skill name and description are somewhat redundant with the title
Use when writing or reviewing Sequelize queries over large schemas, list APIs, dashboards or aggregation reports.
Avoid it for other ORMs or raw SQL without a Sequelize layer, and for small apps where these constraints are overkill.
Security analysis
SafeThe SKILL.md is purely advisory guidance for writing Sequelize ORM queries. It declares no allowed-tools and contains no executable code, shell commands, network calls, credential handling, or obfuscated payloads. The only security-adjacent content (encrypted-field handling) is defensive, instructing against decrypting in loops or leaking encrypted IDs. Nothing here can perform destructive or exfiltrating actions.
No concerns found
How this analysis is madeExamples
Refactor this Sequelize query for our Employee list endpoint: it currently fetches every column and runs a query per row to get attendance. Add pagination and explicit attributes.Our report endpoint computes attendance stats in JavaScript after loading all rows. Rewrite it as a Sequelize aggregate with GROUP BY and COUNT at the database level.Review this Sequelize code for encryption issues: it decrypts employee IDs inside a loop and includes them in the response. Fix it following the encrypted-field rules.name: sequelize-optimized-enterprise-patterns description: A brief description of what this skill does
sequelize-optimized-enterprise-patterns
This skill enforces high-performance, predictable, and safe Sequelize usage for large production schemas (Employee, Attendance, Reports, JSON fields, encryption).
When to use
Use this skill when:
- Writing or refactoring Sequelize queries
- Optimizing slow APIs or reports
- Working with association-heavy schemas
- Handling encrypted columns or JSON fields
- Building list, dashboard, or analytics APIs
- Reviewing Sequelize code for performance issues
Instructions
1. Query Construction (MANDATORY)
- ALWAYS specify
attributesin queries - NEVER fetch all columns using default behavior
- Use pagination (
limit+offset) for all list APIs - Prefer
raw: truefor read-only queries - Use
subQuery: falsefor large include trees
2. Association Handling
- Always define
attributesinsideinclude - Avoid nested includes deeper than 2 levels
- Use
required: falsefor optional associations - Do NOT include associations unless required for response
- Avoid
throughattributes unless explicitly needed
3. Encrypted Field Rules
- NEVER decrypt fields inside loops
- NEVER fetch encrypted IDs unless required in response
- Prefer DB-level filtering on encrypted values
- Decrypt only at controller/service boundary if needed
4. Performance & Safety Rules
- Avoid N+1 queries at all costs
- Do NOT use
awaitinside loops - Prefer DB-level aggregation over JS computation
- Use indexed columns for filtering
- Avoid synchronous operations in request lifecycle
5. JSON / Metadata Columns
- Do NOT fetch full JSON blobs if only one key is needed
- Prefer DB JSON operators where supported
- Cache computed JSON values if reused
- Avoid parsing large JSON repeatedly in loops
6. Counts & Reports
- Use
Model.count()withdistinct: true - Avoid
includein count queries unless necessary - Prefer
GROUP BY,SUM,COUNT,CASEat DB level - Attendance/report stats MUST be computed in SQL
7. Validation Before Final Output
Before returning Sequelize code, ensure:
- No unnecessary columns are fetched
- Pagination is applied where needed
- No encrypted data is leaked
- No N+1 query patterns exist
- Query intent is clear and readable
If optimization intent is unclear, ASK for clarification instead of guessing.
Expected Outcome
When this skill is active, the agent should:
- Generate efficient, production-ready Sequelize queries
- Avoid common ORM performance pitfalls
- Minimize payload size and DB load
- Respect encryption and data-safety boundaries
- Produce readable and maintainable code
From the file to a first result
The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.
View the source and supporting filesThis download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.
1. Download the file
Download SKILL.mdFrom the root of a test project, save the file as .skill-downloads/optimized-sequelize-enterprise-patterns-ms1aw4uk/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.
Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.
mkdir -p '.skill-downloads/optimized-sequelize-enterprise-patterns-ms1aw4uk' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/optimized-sequelize-enterprise-patterns-ms1aw4uk/download' --output '.skill-downloads/optimized-sequelize-enterprise-patterns-ms1aw4uk/SKILL.md.part' && mv '.skill-downloads/optimized-sequelize-enterprise-patterns-ms1aw4uk/SKILL.md.part' '.skill-downloads/optimized-sequelize-enterprise-patterns-ms1aw4uk/SKILL.md'2. Check prerequisites
Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.
No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.
The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.
3. Load the skill
After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.
Claude Code
test -f '.skill-downloads/optimized-sequelize-enterprise-patterns-ms1aw4uk/SKILL.md' && test -s '.skill-downloads/optimized-sequelize-enterprise-patterns-ms1aw4uk/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/sequelize-optimized-enterprise-patterns' && cp -R '.skill-downloads/optimized-sequelize-enterprise-patterns-ms1aw4uk' '.claude/skills/sequelize-optimized-enterprise-patterns'Cursor
test -f '.skill-downloads/optimized-sequelize-enterprise-patterns-ms1aw4uk/SKILL.md' && test -s '.skill-downloads/optimized-sequelize-enterprise-patterns-ms1aw4uk/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/sequelize-optimized-enterprise-patterns' && cp -R '.skill-downloads/optimized-sequelize-enterprise-patterns-ms1aw4uk' '.cursor/skills/sequelize-optimized-enterprise-patterns'Codex
test -f '.skill-downloads/optimized-sequelize-enterprise-patterns-ms1aw4uk/SKILL.md' && test -s '.skill-downloads/optimized-sequelize-enterprise-patterns-ms1aw4uk/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/sequelize-optimized-enterprise-patterns' && cp -R '.skill-downloads/optimized-sequelize-enterprise-patterns-ms1aw4uk' '.agents/skills/sequelize-optimized-enterprise-patterns'OpenSkills
OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.
Official OpenSkills installationopenskills install './.skill-downloads/optimized-sequelize-enterprise-patterns-ms1aw4uk'openskills read 'optimized-sequelize-enterprise-patterns-ms1aw4uk'Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.
For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.
openskills syncManual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.
4. Try a first task
Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:
Read .skill-downloads/optimized-sequelize-enterprise-patterns-ms1aw4uk/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.
Create Interactive Maps with kepler.gl
Data & AI
Create interactive map visualizations and export standalone HTML using the keplergl Python package. Use to plot geospatial data from DataFrames, GeoJSON, or CSV.
Agent-Driven Parameter Optimization
Data & AI
Guide for optimizing configurable systems with a measurable objective, using bounded trials and evidence-based recommendations.
ICP Visitor Outreach
Data & AI
Identify signed-up users matching the ideal customer profile but stalled, and draft personalized outreach to re-engage them.