Backend Queries

Guide writing secure, efficient database queries using GORM and PostgreSQL.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/alenon/portfolios --skill backend-queries-alenon
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Backend Queries
Source: https://github.com/alenon/portfolios/tree/main/.claude/skills/backend-queries
Command: npx skills add https://github.com/alenon/portfolios --skill backend-queries-alenon

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides guidance for writing efficient, secure, and standardized database queries. It prevents performance bottlenecks and security vulnerabilities like SQL injection, ensuring your application's data layer is robust and reliable, freeing you from manual query optimization.

Core Features & Use Cases

  • Query Optimization: Guides AI to write performant database queries, leveraging ORMs like GORM effectively.
  • Security Best Practices: Ensures queries are protected against common threats, maintaining data integrity and application security.
  • Use Case: When implementing a new data retrieval endpoint, this skill ensures the AI uses GORM effectively and securely to fetch data from PostgreSQL, adhering to best practices for filtering and joining.

Quick Start

Use the Backend Queries skill to refactor the GetUserByID function in internal/repository/user.go to ensure it uses prepared statements and efficient indexing for optimal performance.