agentleFS
eugnmueller-87eugnmueller-87/claude-blueprint/.claude/skills/db-query/SKILL.md

db-query

Skill1 starsChanged 5 months agoMITView on GitHub

Safe read-only exploration of spend/supplier data via SQL or pandas — read-only by default, writes require explicit opt-in, and no destructive statement without a WHERE clause. Use to answer a data question against a spend/supplier dataset or database. Trigger phrases "query the spend data", "check this in SQL", "explore this dataset".

4 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

4 rules. 0 are common, 2 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Never run a destructive statement on a hunch, and never invent numbers — every figure comes from a query you actually ran.

    line 13
  2. Distinctive:

    Every exploratory query is non-mutating.

    line 28
  3. Very specific:

    Writes require explicit opt-in: If the task genuinely needs an INSERT/UPDATE/DELETE, STOP and confirm with Eugen first.

    line 30
  4. Very specific:

    Never DELETE/UPDATE without a WHERE clause (the block-dangerous-commands hook enforces this too).

    line 32

“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

db-query

Trigger: "query the spend data" / "check this in SQL" / "explore this dataset"

Standing rules: ../_conventions.md.

Answer the data question without risking the data. Read-only is the default. Never run a destructive statement on a hunch, and never invent numbers — every figure comes from a query you actually ran. Procurement domain: spend, suppliers, categories, savings, compliance.

Steps

  1. Locate the source. A .db/.sqlite, a connection configured via env vars (never hardcoded creds), or a CSV/Parquet for pandas. Confirm which. If it's a live DB, connect with a read-only credential where possible.
  2. Understand the shape first. For SQL: list tables and columns (.schema / information_schema). For pandas: df.head(), df.dtypes, df.shape. State the relevant columns before querying — don't guess column names.
  3. Read-only by default. SELECT / pandas filters and aggregations only. Every exploratory query is non-mutating. Show the query, then the result.
  4. Writes require explicit opt-in. If the task genuinely needs an INSERT/UPDATE/DELETE, STOP and confirm with Eugen first. Then:
    • Never DELETE/UPDATE without a WHERE clause (the block-dangerous-commands hook enforces this too).
    • Preview the affected rows with a SELECT using the same WHERE before running the mutation.
    • Wrap in a transaction where the engine supports it.
  5. Answer with the numbers. Give the actual result — top suppliers by spend, savings %, category totals, compliance gaps, whatever was asked. Show the query so it's reproducible and auditable. Round money sensibly; state the currency and time window.
  6. Report (terse): the answer first, then the query that produced it, then any caveat (nulls dropped, date range, dedupe applied). Never present a number you didn't compute from the data.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.