본문으로 건너뛰기
cccskills
무료GitHub에 공개

db-clone

Copy one Cloudflare D1 database into another of the same app's environments — refresh STAGING from prod, seed a PREVIEW from staging, or (guarded) push staging up to prod. Full mirror via scripts/db-clone.mjs. Use when asked to "clone a db", "refresh staging from prod", "copy prod data to staging", "seed a preview db", or to reconstitute a wiped staging DB. NOT for per-collection seeding (use the app's seedData/seed endpoints) or for schema migrations (use db-migrations).

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

연동 도구Cloudflare
설치 방법 보기

포함된 파일(1)

  • SKILL.md4.0 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

db-clone — mirror one D1 database into another

Wraps scripts/db-clone.mjs (pnpm db:clone): exports a source Cloudflare D1 database and imports it into a target, making the target an exact mirror (every target table dropped, then re-imported). Database names are discovered from each app's wrangler.jsonc, so it works for any app + any pair of its environments.

node scripts/db-clone.mjs --app <app> --from <env> --to <env> [--dry-run] [--yes]
# or: pnpm db:clone --app <app> --from <env> --to <env>

<env> is prod (the wrangler.jsonc top level) or any key under env.* (staging, preview, …).

Mobile / no-laptop: there's also a db-clone GitHub Action (.github/workflows/db-clone.yml) — Actions → Run workflow → app/from/to from the GitHub app. It reuses the repo's CLOUDFLARE_* secrets (no Cloudflare site needed); a prod target requires the confirm_target_db input (passed as --confirm), and the pre-clone backup is uploaded as an artifact. For non-interactive runs the script takes --confirm <db> in place of the typed prompt.

When to use this — and when NOT to

SituationUse
"Is the data still there?" / "how many rows / bookings / users" — check before cloningpnpm db:counts --app <app> --env <env> (read-only) or the db-counts Action
"Make staging look exactly like prod" / "refresh staging" / "seed a preview from staging"this skill
"Reconstitute the wiped staging DB" (and prod still has the data)this skill (--from prod --to staging)
Load a specific org / CSV import into a fresh DBthe app's seedData/ + seed endpoints — NOT this
The source/target data is gone everywherere-seed from seedData/, don't clone
Add/alter a table (schema change)the db-migrations skill

A clone copies all data as-is; it is not a substitute for seeding curated fixtures or for migrations.

Hard rules (the judgment this skill encodes)

  1. Always --dry-run first. Read back the resolved names (e.g. velo-db → velo-staging-db) and the ordered plan before doing anything real. The dry run needs no Cloudflare credentials.
  2. Cloning OVERWRITES the target. Confirm the direction out loud (--from = the keeper, --to = the one wiped). Source == target is refused.
  3. Prod-as-target is the dangerous path — treat it like the "never deploy to prod casually" rule. The script forces a typed confirmation (retype the target db name) and takes a timestamped backup to .db-backups/ first. Don't pass --yes to a prod target unless the human explicitly asked for an unattended run. The default direction is prod → staging, never the reverse.
  4. A real run needs creds in the env: CLOUDFLARE_ACCOUNT_ID + CLOUDFLARE_API_TOKEN (account → D1 Edit). Without them, only --dry-run works. wrangler whoami should resolve before a real run.
  5. Verify after. Once imported, confirm with a row count, e.g. npx wrangler d1 execute <target> --remote --command "SELECT (SELECT COUNT(*) FROM user) users, (SELECT COUNT(*) FROM organization) orgs".

Flow

  1. --dry-run to confirm names + direction.
  2. (prod target only) typed confirmation + automatic backup to .db-backups/.
  3. Export source → drop all target tables → import dump.
  4. Row-count check on the target.

See writeups/guides/db-clone-guide.md for the full reference.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

a11y

무료

Accessibility review for Vue surfaces — the code-cleaning analog of /code-review and /simplify, pointed at WCAG/ARIA. Reviews just your diff (or a package/file), rates findings by severity, and either comments inline on the PR (--comment) or applies the safe fixes for you (--fix). Steers the depth-aware `a11y` subagent. Use when asked to "check accessibility", "a11y this", "audit ARIA/keyboard", or run /a11y.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

FriendlyInternet/nuxt-crouton102026년 10월 20일 업데이트

ask-human

무료

Emit a blocking question the owner can read in ~10 seconds and answer in one reply — the scannable, recommendation-first handoff every agent posts when it hits a fork it can't own. Leads with the one decision + a recommendation, carries the 🤖 provenance header, doubles as the

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

FriendlyInternet/nuxt-crouton102026년 10월 20일 업데이트

audit

무료

Audit packages for documentation completeness, detect drift between code and docs, and maintain documentation quality across the monorepo. Use when checking package docs, running audits, or reviewing documentation health.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

FriendlyInternet/nuxt-crouton102026년 10월 20일 업데이트

Author a placeable layout block that looks right at ANY pane size. The one hard rule — size to the PANE with container queries (@container), never the viewport — plus list/form playbooks and the sizing contract (minWidth etc.) the viability metric reads. Use when adding/converting a croutonLayoutBlocks block, or when a block overflows/breaks in a narrow pane.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

FriendlyInternet/nuxt-crouton102026년 10월 20일 업데이트

When a bug or regression is reported, the FIRST step — before fixing — is to research how and when it was introduced (git archaeology), then record that finding on the tracking issue/PR. Use the moment a bug, error, broken build, or "this used to work" is reported, before writing a fix. Produces a first-bad-commit (or "not a code regression") note you paste onto the issue.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

FriendlyInternet/nuxt-crouton102026년 10월 20일 업데이트

commit

무료

Smart, granular git commits following monorepo conventions. Analyzes changes, filters to session-relevant files, groups by intent, and uses conventional commit format. Use when committing code changes.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

FriendlyInternet/nuxt-crouton102026년 10월 20일 업데이트

FriendlyInternet의 스킬 모두 보기

이 스킬의 문제 신고