qlocalclonedb

qlocalclonedb is a skill for Claude Code from 3awny/qship. It costs 68 tokens per session (3,530 once invoked), scanned A, original, MIT.

A tool that copies a staging tenant's PostgreSQL database into a named local database. A staging tenant is a test customer or account, and PostgreSQL is a database system commonly used by web applications.

In plain words
What is it for?
Use it to list staging tenants, clone one into a local PostgreSQL database, choose the local database name, or specify which staging and remote database connections to use.
Why use it?
It gives local testing realistic schema and data, making it easier to reproduce tenant-specific problems without repeatedly copying the same database. Several tenant copies can exist side by side.

Skill for Claude Code

Written for Claude Code: $ARGUMENTS substitution.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is ./venv/bin/python "$TMP_SCRIPT" --list-tenants --env-file "$TMP_ENV".

Part of the qship plugin — 22 skills, 1 agent, 1 hook shipped together

Good fit Use it to list staging tenants, clone one into a local PostgreSQL database, choose the local database name, or specify which staging and remote database connections to use.

Compare 6 skills from other repositories ↓
View source ↗ 3awny/qship
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/3awny/qship
agentmods
npx agentmods add skills/3awny/qship/qlocalclonedb

Made for: Claude Code.

Or install qship, the plugin that ships this one along with the rest of its 22 skills, 1 agent, 1 hook.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for qlocalclonedb

README.md
[![agentmods](https://agentmods.dev/badge/skills/3awny/qship/qlocalclonedb/github.svg)](https://agentmods.dev/skills/3awny/qship/qlocalclonedb)
Your own site
<a href="https://agentmods.dev/skills/3awny/qship/qlocalclonedb"><img src="https://agentmods.dev/badge/skills/3awny/qship/qlocalclonedb/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for qlocalclonedb

Your own site · 80×15
<a href="https://agentmods.dev/skills/3awny/qship/qlocalclonedb"><img src="https://agentmods.dev/badge/skills/3awny/qship/qlocalclonedb.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 68 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,530 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00068 $0.03530
Opus 5 $0.00034 $0.01765
Sonnet 5 $0.00014 $0.00706
Haiku 4.5 $0.00007 $0.00353

Measured 12d ago against content hash 8ad8cd2b390d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

qlocalclonedb scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

templates/skills/qlocalclonedb/SKILL.md · 235 lines

How it starts

The opening of the file, as written. The whole thing — 235 lines — stays where its author put it; the contents beside it link to each section on GitHub.

qlocalclonedb — Clone a Staging Tenant into a Named Local DB

Clones a staging tenant's the Postgres provider DB into a side-by-side local Postgres database. Lets multiple cloned tenants coexist (e.g. {{LOCAL_DEV_DB_NAME}} for Example Tenant plus local_acme_corp_db for Acme Corp) so you can switch between them without re-cloning.

Input: $ARGUMENTS

  • --tenant <name> — exact staging tenant name (use --list to discover) — REQUIRED unless --list
  • --db-name <db> — local Postgres DB name to create (default: local_<sanitized_tenant>_db)
  • --list — list available staging tenants and exit; nothing else happens
  • --staging-url <url> — staging GLOBAL_DATABASE_URL (overrides .env.dev). Pass inline once if .env.dev is missing
  • --remote-url <url> — full Postgres URL for the tenant DB to dump from, bypassing the DB provider API lookup. Use this when the tenant's app.account_registry row points at a different DB provider branch than the one you want to clone (e.g. the registry pins main/production but you actually want develop). Supply the pooled DB provider endpoint URL, e.g. postgresql://<role>:<pw>@<pooler-host>.example-postgres.com/<db>?sslmode=require. When this is set, the local DB_PROVIDER_API_KEY is not used to fetch the connection string.
  • --branch-endpoint <ep-id> — DB provider endpoint ID for a specific branch (e.g. <branch-endpoint-id>). Lighter-weight alternative to --remote-url: the skill assembles the full URL from the endpoint ID, the tenant's db_database_name / db_role_name from app.account_registry, and the password from the existing tenant URL pattern. Useful when you know "I want develop branch" but not the full connection string. Requires --tenant so role/database can be resolved.
  • --reclone — drop the local DB if it already exists before recreating

Defaults: requires either .env.dev in {{PRIMARY_REPO_NAME}}/ OR --staging-url. The local DB_PROVIDER_API_KEY (from {{PRIMARY_REPO_NAME}}/.env) is reused — except when --remote-url or --branch-endpoint is set, in which case the API lookup is skipped.

When to override the branch. app.account_registry stores ONE the Postgres provider branch_id per tenant. In multi-environment DB provider projects (e.g. one project hosting main + develop + per-PR preview branches), that pin usually points at main. If you're testing a fix against data that only exists on the develop branch, the default clone path pulls the wrong data — records may be missing, record_hash_id may be NULL, record_mappings rows may differ. Symptom: clone succeeds, but the rules_engine resolver returns no applicable policies because the lines aren't categorised under the expected scope. Use --remote-url or --branch-endpoint to target the right branch explicitly.

Read the full file on GitHub · 235 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 235 lines · 68 tokens per session scan A 8ad8cd2b390d

Subscribe to this mod's changes

qlocalclonedb is a skill published in the GitHub repository 3awny/qship (2 stars, last pushed 2mo ago), licensed MIT. It adds 68 tokens to every session and 3,530 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.