lunora-setup-hyperdrive-global
Skill by anolilab
Stores a Lunora app's own global tables in Postgres or MySQL through Cloudflare Hyperdrive instead of D1. It also covers copying existing D1 global data over. Aimed at developers moving global tables to PlanetScale or Postgres.
Install lunora-setup-hyperdrive-global
Built from the published package, never by AI.
git clone --depth 1 https://github.com/anolilab/lunora /tmp/lunora && mkdir -p ~/.claude/skills && cp -r /tmp/lunora/packages/cli/skills/lunora-setup-hyperdrive-global ~/.claude/skills/lunora-setup-hyperdrive-globalRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
Step-by-step: install lunora-setup-hyperdrive-global in Claude Code
git clone --depth 1 https://github.com/anolilab/lunora /tmp/lunora && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/lunora/packages/cli/skills/lunora-setup-hyperdrive-global ~/.gemini/antigravity-cli/skills/lunora-setup-hyperdrive-globalAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install lunora-setup-hyperdrive-global in Antigravity CLI
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill sets up a Lunora app so its own .global() tables are stored in a Postgres or MySQL database reached through Cloudflare Hyperdrive instead of D1. Lunora owns the schema, with one column per field, and every write goes through its store core, so live queries re-run as they do with D1. It covers the .global({ backend: "hyperdrive" }) setting, the @lunora/hyperdrive/global helpers, and the app builder's .hyperdriveGlobal() method.
It also explains the HYPERDRIVE binding and the required settings, such as turning query caching off and using the FOUND_ROWS flag for MySQL. It describes moving existing D1 data with lunora migrate d1-to-hyperdrive, including the rollback command. It is for developers who want to move global tables to PlanetScale or Postgres, or migrate off D1. For querying an external database from an action, the source points to a different skill.
Written from the project's SKILL.md and checked against it.
What it can do
- Hyperdrive global tablesStores .global() tables in Postgres or MySQL through Cloudflare Hyperdrive instead of D1.
- App builder wiringAdds a .hyperdriveGlobal({ engine, exec }) step to the Lunora app builder.
- Driver helpersUses buildPgExec, buildMysqlExec and createHyperdriveGlobalCtxDb from @lunora/hyperdrive/global.
- D1 data migrationCopies existing D1 global rows to Hyperdrive with lunora migrate d1-to-hyperdrive.
- Rollback to D1Moves rows back to D1 with lunora migrate hyperdrive-to-d1, with an optional --replace mode.
- pgvector searchServes ctx.vectors from pgvector on Postgres using createPgVectorIndex.
What you need
- Cloudflare account with Hyperdrive
- A Postgres or MySQL 8.0+ database
- Node.js and pnpm
- postgres or mysql2 driver
- wrangler CLI
Try asking
- Move my global settings table from D1 to Postgres through Hyperdrive
- Set up hyperdriveGlobal with buildPgExec in my Lunora app
- Migrate my D1 global tables to Hyperdrive and keep a dump file
Good to know
- Query caching must be disabled on the Hyperdrive config, or live queries can show stale data.
- MySQL needs the FOUND_ROWS flag, and NO_BACKSLASH_ESCAPES in sql_mode is unsupported.
- Rows written directly to the database are not seen by live queries; writes must go through ctx.db.
- An app can use only one global backend, so D1 and Hyperdrive global tables cannot be mixed.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: packages/cli/skills/lunora-setup-hyperdrive-global/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to lunora-setup-hyperdrive-global
All alternatives →Creates, configures and manages datasets on the Hugging Face Hub, including SQL-based querying and transformation. Built for people who edit dataset content and metadata directly, alongside the HF MCP server.
Diagnoses and repairs gbrain's Postgres access when a command or MCP result shows a GBRAIN_DB_ACCESS marker, or when the operator reports the brain database is down. It runs the hardcoded gbrain db-repair ladder and verifies the result with a re-probe.
Manages clusters, instances, and backups for AlloyDB for PostgreSQL. Built for creating, configuring, and administering AlloyDB databases, not general PostgreSQL or Cloud SQL instances.
Writes, reviews and migrates Supabase logs queries against the ClickHouse logs table served by the logs.all.otel endpoint. Built for developers who write Logs Explorer SQL or convert older BigQuery logs queries.
Diagnoses and fixes slow Paperclip PostgreSQL queries using Cloud and Neon evidence, local benchmarks, regression tests, and a pull request with passing checks. Built for engineers working on Paperclip.
Guides AI assistants through Prisma 8 projects built on @prisma/orm-postgres, @prisma/orm-sqlite, or @prisma/orm-mongo. It covers data contracts, migrations, typed queries and runtime setup for developers on Prisma 8.
Compare with hugging-face-datasets, db-repair or alloydb-basics
lunora-setup-hyperdrive-global: common questions
Does moving global tables to Hyperdrive keep live queries working?
Yes. Subscriptions re-run as they do with D1, but only for writes made through Lunora's ctx.db.
Can I move back to D1 if I change my mind?
Yes. The source describes lunora migrate hyperdrive-to-d1 for rollback. Without --replace it restores only rows missing from D1, and deletions are not carried over.
Do I need to write SQL migrations myself?
No. Tables are provisioned automatically on first use, though changes to existing table columns may need a manual ALTER statement.
How do I install lunora-setup-hyperdrive-global?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is lunora-setup-hyperdrive-global free?
The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.
Is lunora-setup-hyperdrive-global safe to use?
It scores 71 of 100. Grades: maintenance A, licence A, quality B. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to lunora-setup-hyperdrive-global?
Similar skills: hugging-face-datasets, db-repair, alloydb-basics, clickhouse-logs-queries.
