Writing SQL
Apply the project’s vertical SQL formatting when authoring or reviewing actual SQL, including migrations and embedded queries. No exception for short queries; generic database discussion does not activate it.
Install
/plugin marketplace add borkweb/skillsThe repo is a Claude Code plugin marketplace. Run /plugin afterwards to pick the plugin that includes this skill.
npx skills add borkweb/skills --skill writing-sqlgit clone --depth 1 https://github.com/borkweb/skills.git /tmp/skills
mkdir -p ~/.claude/skills
cp -r /tmp/skills/skills/core/writing-sql ~/.claude/skills/writing-sqlPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# Writing SQL ## Overview All SQL in this project follows a strict vertical formatting style: every top-level keyword on its own line, everything beneath it indented. **No exceptions for short queries.** A one-column, one-table, one-condition query gets the same formatting as a 10-join monster. ## Rules ### Keyword Casing All SQL keywords UPPERCASE: `SELECT`, `FROM`, `WHERE`, `JOIN`, `LEFT JOIN`, `RIGHT JOIN`, `CROSS JOIN`, `ON`, `AND`, `OR`, `NOT`, `IN`, `EXISTS`, `BETWEEN`, `LIKE`, `IS NULL`, `IS NOT NULL`, `INSERT INTO`, `VALUES`, `UPDATE`, `SET`, `DELETE FROM`, `ORDER BY`, `GROUP BY`, `HAVING`, `LIMIT`, `OFFSET`, `AS`, `CASE`, `WHEN`, `THEN`, `ELSE`, `END`, `UNION`, `UNION ALL`, `EXCEPT`, `INTERSECT`, `WITH`, `RECURSIVE`, `OVER`, `PARTITION BY`, `ROWS`, `RANGE`, `ON DUPLICATE KEY UPDATE`, `CREATE TABLE`, `ALTER TABLE`, `DROP TABLE`, `ADD COLUMN`, `DROP COLUMN`, `MODIFY COLUMN`, `DEFAULT`, `NOT NULL`, `PRIMARY KEY`, `FOREIGN KEY`, `REFERENCES`, `AUTO_INCREMENT`, `ENGINE`, `CHARSET`, `COLLATE`, `INDEX`, `UNIQUE KEY`, `IF EXISTS`, `IF NOT EXISTS`, `CASCADE`. ### Vertical Layout Every top-level clause keyword sits **alone on its own line, flush left**. Everything belonging to that clause is indented one level (4 spaces) below it. Top-level clause keywords: `SELECT`, `FROM`, `WHERE`, `ORDER BY`, `GROUP BY`, `HAVING`, `LIMIT`, `SET`, `VALUES`, `ON DUPLICATE KEY UPDATE`. ### Columns One column per line, indented, trailing commas:
Details
- Skill name
writing-sql- Repository
- borkweb/skills
- Path
skills/core/writing-sql/SKILL.md- License
- MIT
- Repo updated
- 18 November 2026
FAQ
What does the Writing SQL skill do?
Apply the project’s vertical SQL formatting when authoring or reviewing actual SQL, including migrations and embedded queries. No exception for short queries; generic database discussion does not activate it.
How do I install the Writing SQL skill?
Claude Code plugin: /plugin marketplace add borkweb/skills. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Writing SQL popular?
It lives in borkweb/skills, which has 9 GitHub stars and 0 forks.
Related skills
Prototype
9borkweb/skills
Build a throwaway prototype to flesh out a design before committing to it. Routes between two branches — a runnable terminal app for state/business-logic questions, or several radically different UI variations toggleable from one route. Use when the user wants to prototype, sanity-check a data model or state machine, mock up a UI, explore design options, or says "prototype this", "let me play with it", "try a few designs".
Agents Md Lint
9borkweb/skills
Audit and trim AI agent instruction files (AGENTS.md, CLAUDE.md, CONVENTIONS.md, .cursorrules, etc.) by testing which facts an AI agent can discover from code alone. Use when asked to lint, audit, optimize, prune, or trim any agent instruction file in a repository. Removes redundant documentation that wastes context tokens. Supports a dry-run mode that reports findings without modifying files.
Auto Scope
9borkweb/skills
Scopes a coding task before implementation — names the handful of files actually relevant (read/edit these), the areas to leave alone, and any open scope questions, so work doesn't start by reading the whole repo. Fires proactively at the start of substantive, multi-file, or unfamiliar-area work; stays silent on single-file edits, one-line fixes, questions, and continued work in an area already scoped this session. Use when beginning a feature, bug fix, or refactor that could plausibly touch several files or an area not yet seen this session.
SQL Analysis Workflow
5ruhedanghaoyigexuesheng/claude-skills-portfolio
按八步工作流对 SQL 做结构化第一轮性能风险识别,输出 P0/P1/P2 风险等级与可验证优化建议。 证据不足时输出待补充信息清单,禁止无依据断言「必须加索引」。 当用户要求分析 SQL、慢查询、索引、explain、数据库性能风险时使用。 触发词:分析 SQL、慢查询、索引、explain、SQL 风险、全表扫描、深分页。
Wp Migrate
9morrealev/wordpress-manager
This skill should be used when the user asks to "migrate a site", "move WordPress", "transfer my site", "clone site", "copy site to new hosting", or mentions any WordPress migration between hosts or platforms. Covers full site, content-only, and database migrations.
SQL Queries
9tarunccet/pm-skills
Generate SQL queries from natural language descriptions. Supports BigQuery, PostgreSQL, MySQL, and other dialects. Reads database schemas from uploaded diagrams or documentation. Use when writing SQL, building data reports, exploring databases, or translating business questions into queries.
Browse the most popular Claude skills, all databases skills, or write your own with the skills generator.