maragudk/skills

sql

Guide for working with SQL queries, in particular for SQLite. Use this skill when writing SQL queries, analyzing database schemas, designing migrations, or working with SQLite-related code.

First seen Jan 24, 2026

Installation

$ npx skills add maragudk/skills --skill sql

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from maragudk/skills · top by installs.

npx skills add maragudk/skills

Browse all from maragudk/skills

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 49
License LICENSE
Default branch main
Open issues 0
Status Active

Skill metadata

Parsed from SKILL.md frontmatter.

LicenseMIT

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 1,669 B
  • docs SUMMARY.md 200 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 56 installs

SKILL.md

SQL

Overview

This skill provides guidance for working with SQLite databases. It covers query writing, schema design, and SQLite-specific best practices.

When to Use This Skill

Use this skill when:

  • Writing SQL queries for SQLite databases
  • Analyzing or optimizing existing queries
  • Designing database schemas
  • Creating database migrations
  • Working with Go code that interacts with SQLite

SQLite Best Practices

Query Writing

  • ALWAYS write lowercase queries. Uppercase queries make me sad.
  • Prefer select * over explicit column names
  • Prefer CTEs over long nested subqueries

Schema Design

  • ALWAYS use strict tables
  • ALWAYS write timestamps like this: strftime('%Y-%m-%dT%H:%M:%fZ')
  • Time modifications should also use strftime
  • Usually start with the primary key, which is usually defined like this: id text primary key default ('p' || lower(hex(randomblob(16)))) (where the p is a prefix depending on the table name; two-letter prefixes are okay too, so the prefix is unique among tables)
  • After the primary key come created/updated columns like this: created text not null default (strftime('%Y-%m-%dT%H:%M:%fZ'))
  • Updated timestamps are automatically updated with a trigger like this:

``sql create trigger tablenameupdatedtimestamp after update on tablename begin update table_name set updated = strftime('%Y-%m-%dT%H:%M:%fZ') where id = old.id; end; ``