Skip to content
Back to skills

Sql House Style

ASecurity

Write SQL in the analytics house style. Use for any SQL query.

  • 3 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 1, 2026
ai-agentssql

Security analysis

A100/100

Scanned December 1, 2026

npx -y skills add danielrispler/skill-truce --skill sql-house-style --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Sql House Style?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Sql House Style
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/danielrispler-sql-house-style/badge)](https://www.skillsdirectory.com/skills/danielrispler-sql-house-style)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: sql-house-style
description: Write SQL in the analytics house style. Use for any SQL query.
---

# sql-house-style

Queries are reviewed by analysts who rely on a consistent style and on safety defaults.

## Rules

- Always exclude soft-deleted rows with the filter `deleted_at IS NULL`.
- Write all SQL keywords in UPPERCASE (`SELECT`, `FROM`, `WHERE`, `JOIN`, `GROUP BY`, `ORDER BY`).
- Give every aggregate an alias that ends in `_cnt`, `_sum` or `_avg`.
- The first line must be a comment that states the purpose: `-- Purpose: <one sentence>`.
- Wrap every monetary or averaged aggregate in `ROUND(..., 2)`.
- Always end the query with a `LIMIT` clause.

## Example

Request: Write the SQL query: revenue per country for orders created in January 2026, top 20 countries. Table orders(id, country, amount, created_at, deleted_at). Owning team: growth-analytics.

Output:

```
-- Purpose: revenue per country for January 2026
SELECT
    o.country,
    ROUND(SUM(o.amount), 2) AS revenue_sum
FROM orders AS o
WHERE o.deleted_at IS NULL
  AND o.created_at >= '2026-01-01'
  AND o.created_at <= '2026-01-31'
GROUP BY o.country
ORDER BY revenue_sum DESC
LIMIT 20;
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.