sqlc-gen-moonbit-safety

Patch Int64 binds and verify sqlc-generated MoonBit files for D1 safety.

320|3|Updated Apr 24, 2026
One-click install
npx skills add https://github.com/mizchi/skills --skill sqlc-gen-moonbit-safety
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sqlc-gen-moonbit-safety
Source: https://github.com/mizchi/skills/tree/main/sql/sqlc-gen-moonbit-safety
Command: npx skills add https://github.com/mizchi/skills --skill sqlc-gen-moonbit-safety

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes assets (resource) components.

What problem does it solve?

Post-generation safety checks for sqlc-gen-moonbit + Cloudflare D1 projects, guarding against BigInt bind hangs and SQL placeholder mismatches by enforcing a patch-and-verify workflow.

Core Features & Use Cases

  • Post-generation safety scripts that patch Int64 binds to use int64_bind_safe, and a verify gate to fail CI if any unwrapped Int64 binds remain.
  • CI-friendly tooling to detect and block regressions related to D1 bind behavior and sqlc placeholder consistency in MoonBit projects.

Quick Start

Run the patch-int64-binds.mjs script after sqlc generate to patch binds and run db:verify to ensure no unwrapped binds remain.

Frequently Asked Questions about sqlc-gen-moonbit-safety

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why does my MoonBit D1 query hang on BigInt binds after sqlc generate?

MoonBit D1 query hangs occur when sqlc generate outputs unwrapped Int64 binds. Post-generation safety scripts patch these binds to use int64_bind_safe, preventing the hang.

How do I patch Int64 bind issues in sqlc-generated MoonBit files?

To patch Int64 bind issues, run the patch-int64-binds.mjs script after sqlc generate on sqlc_types.mbt and sqlc_queries.mbt, then run db:verify to ensure no unwrapped binds remain.

What is a post-generation safety check for sqlc-gen-moonbit?

A post-generation safety check is a verify gate that fails CI if unwrapped Int64 binds or SQL placeholder mismatches remain in sqlc-generated MoonBit files targeting Cloudflare D1.

Can I use CI to block sqlc placeholder regressions in MoonBit projects?

Yes, you can use CI-friendly verify tooling to block sqlc placeholder regressions by running db:verify to detect and fail builds if D1 bind behavior or placeholder consistency issues exist.

What files are required to patch sqlc D1 bind mismatches in MoonBit?

Patching sqlc D1 bind mismatches requires the sqlc-generated files sqlc_types.mbt and sqlc_queries.mbt, along with the patch and verify scripts located in assets/scripts.