Command Palette

Search for a command to run...

UnylyUnyly
Back to skills

python-database

FreeNo executable scriptsNot checked

Implement Python database access with parameterized SQL, transaction scope, connection helpers, and repository seams. Use when editing Postgres queries…

HoangNguyen0403by HoangNguyen0403★ 598 GitHub stars

About this skill

Python Database

Priority: P1 (HIGH)

Rules

  • Parameterize every query; never interpolate user or runtime data into SQL strings.
  • Keep connection and transaction ownership explicit.
  • Hide storage shape behind repository or query helpers when business logic depends on it.
  • Normalize JSON and null handling at the persistence boundary.

Recipe

  1. Open connections through one helper or pool abstraction.
  2. Use context managers for connection and transaction lifetime.
  3. Keep one business action in one transaction.
  4. Return typed rows or normalized dicts, not raw cursor tuples leaking everywhere.
  5. Test malformed/null metadata paths when patching JSON payloads.

Anti-Patterns

  • No f-string SQL.
  • No transaction split-brain across handler, service, and repo.
  • No unbounded connection churn in loops.
  • No DB truth hidden behind report formatting code.

References

Install python-database in Claude Code & Claude Desktop

Sign up to install this skill

Create a free account to reveal the install command and save the skill to your library.

  • Reveal the one-line install command
  • Save skills to your synced library
  • Get notified when skills update
Sign up freeI already have an account

Allowed tools

Tools this skill is permitted to call.

No restriction — this skill can use any tool.

Bundled files

evals/evals.jsonreferences/db-boundaries.md

FAQ

What does the python-database skill do?

Implement Python database access with parameterized SQL, transaction scope, connection helpers, and repository seams. Use when editing Postgres queries, repositories, transactions, pooling, or persistence boundaries in Python.

How do I install the python-database skill?

Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.

Does the python-database skill run scripts?

No, this skill is instructions only (SKILL.md) with no executable scripts.

Related skills

Compare python-database with