Repository inventory

tlabs-xyz/tbtc-v2-performance

Skills indexed from this repository, with install-style signals scoped to the repo.
18 skills0 GitHub stars0 weekly installsTypeScriptGitHubOwner profile

Overview

This skill guides writing efficient, secure database queries and data-access logic in TypeScript backends. It emphasizes parameterized queries, eager loading, transaction safety, and query performance optimizations to reduce latency and prevent common pitfalls like N+1 queries and SQL injection. Use it to standardize repository/DAO code and ORM usage across services.

How this skill works

The skill inspects query intent and suggests concrete query patterns: parameterized SQL, ORM query-builder calls, eager-loading or join strategies, and pagination/caching techniques. It recommends specific performance improvements such as indexing hints, selecting only needed columns, using transactions where required, and applying query timeouts or monitoring. Outputs include code snippets, refactor suggestions, and checklist-style validations tailored to TypeScript ORMs like Prisma, TypeORM, and Sequelize.

When to use it

  • Writing or refactoring SQL or ORM-based data retrieval logic
  • Implementing eager loading or joins to avoid N+1 problems
  • Adding filters, sorting, pagination, or search features
  • Protecting queries against SQL injection with parameterization
  • Optimizing slow queries, adding indexes, or caching results

Best practices

  • Always use parameterized queries or ORM parameter binding to prevent SQL injection
  • Load only required columns and prefer eager loading or explicit joins to prevent N+1 queries
  • Wrap multi-step updates in transactions and handle rollbacks on failure
  • Add pagination, limits, and sensible defaults for list endpoints
  • Measure query plans and add indexes based on real slow-query evidence, not guesses
  • Cache expensive, read-heavy queries and invalidate on writes

Example use cases

  • Refactor a REST endpoint from multiple per-record queries into a single eager-loaded ORM query to eliminate N+1
  • Implement cursor-based pagination for large result sets with stable sort keys
  • Convert string interpolation SQL into parameterized prepared statements to remove injection risk
  • Add a transactional update across multiple tables with rollback on any constraint failure
  • Instrument and optimize a slow JOIN by analyzing EXPLAIN output and adding an index

FAQ

Prefer eager loading when you know related data is required for the response to avoid N+1 queries. Use lazy loading only when related data is rarely needed to reduce unnecessary joins.

How do I choose pagination style?

Use offset/limit for simple UIs and small datasets. Use cursor-based pagination for large or frequently changing datasets to ensure stable and performant paging.

18 skills

backend-queries
Backend

This skill helps you write secure, efficient backend queries using parameterized queries, ORM builders, and proper optimization strategies.

DatabasePerformanceSecuritySql+1
testing--test-writing
Docs

This skill helps you write tests by applying the Agent OS standard for test-writing across unit and integration tests.

Integration TestsTestingUnit TestsWriting+1
global--conventions
Code Review

This skill enforces global conventions by applying the Agent OS standard across codebases, ensuring consistency and quality.

DevopsDocsFormattingLinting+2
backend-api
Api

This skill helps you design and implement consistent RESTful APIs across frameworks, enforcing naming, versioning, authentication, and documentation.

BackendDesignRefactorSecurity+2
frontend-css
Code Review

This skill guides you to write maintainable, performant CSS across frameworks using design tokens, methodologies like BEM, CSS modules, and utility classes.

DesignFormattingFrontendLinting+2
backend--models
Api

This skill helps implement backend models following the Agent OS standard, ensuring consistency and quality across TypeScript backend components.

BackendCode ReviewDocsRefactor+2
frontend-components
Accessibility

This skill helps you design and refactor reusable UI components across frameworks with clear interfaces and robust state management.

Code ReviewDesignFrontendProductivity+3
global--error-handling
Backend

This skill enforces global error handling standards across the codebase, ensuring consistent responses and reliable observability.

Code ReviewDebuggingObservabilityTesting+1
frontend--accessibility
Accessibility

This skill enforces frontend accessibility standards by applying agent-os guidelines to components, pages, and interactions for inclusive user interfaces.

FrontendTestingUxTypescript
backend--migrations
Automation

This skill helps you apply the Agent OS standard for backend migrations, ensuring consistent practices across databases and deployment environments.

BackendDatabaseDevopsMigration+1
backend--queries
Api

This skill helps you apply the Agent OS standard for backend queries across TypeScript projects, ensuring consistent patterns and reliable data access.

BackendCode ReviewDatabaseRefactor+2
frontend--css
Code Review

This skill helps enforce the Agent OS frontend CSS standard across projects, improving consistency, accessibility, and maintainability.

DesignDocsFormattingFrontend+2
global-error-handling
Api

This skill guides you to implement robust error handling across code, API boundaries, and user-facing messages with fail-fast and graceful degradation.

BackendDebuggingSecurityTesting+1
global-conventions
Ci Cd

This skill enforces global project conventions, guiding structure, docs, config, dependencies, and workflows to improve consistency and collaboration.

Code ReviewDevopsDocsGit+1
frontend--components
Code Review

This skill helps ensure frontend components follow the Agent OS standard, improving consistency, quality, and maintainability across projects.

FrontendTestingTypescript
global-tech-stack
Ci Cd

This skill helps maintain project-wide tech stack consistency by guiding dependency choices, tooling, and configurations across frontend, backend, and infra.

DevopsFormattingFullstackLinting+1
global--tech-stack
Backend

This skill applies the Agent OS global tech stack standard to ensure consistent architecture and tooling across projects.

Ci CdCode ReviewDevopsDocs+2
frontend-responsive
Accessibility

This skill guides frontend responsive practices to create mobile-first, fluid layouts with adaptive typography and accessible, performant UI across devices.

DesignFrontendPerformanceUx+1
More from this maintainer
Other repositories and skills published under the same GitHub owner.
Skills library
Jump back to the full directory or explore grouped topics.
Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational