Install
$ agentstack add skill-maragudk-skills-sql ✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
About
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
stricttables - 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 thep_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/updatedcolumns 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 table_name_updated_timestamp after update on table_name begin update table_name set updated = strftime('%Y-%m-%dT%H:%M:%fZ') where id = old.id; end; ``
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: maragudk
- Source: maragudk/skills
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet — be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.