Contribute
Help shape the codebase, report defects, join technical architectural discussions, or claim your first open issue.
DDLGate reads your migration files and flags supported statements that may block writes or take strong locks, then shows the safer pattern. Your agent can run it before each deploy.
ERROR LS-02 examples/unsafe/2026_01_02_000001_raw_index.php:9 [orders] CREATE INDEX CONCURRENTLY inside the migration transaction fails. Fix: Set public $withinTransaction = false; on the migration class. ERROR LS-03 examples/unsafe/2026_01_02_000001_raw_index.php:10 [orders] CREATE INDEX on 'orders' without CONCURRENTLY blocks writes. Fix: Use CREATE INDEX CONCURRENTLY and set public $withinTransaction = false; WARN LS-13 examples/unsafe/2026_01_02_000001_raw_index.php:10 This migration takes a strong lock but never sets lock_timeout. Fix: Run SET LOCAL lock_timeout = '5s' first so the migration fails fast instead of queueing. ERROR LS-07 examples/unsafe/2026_01_02_000001_raw_index.php:11 [orders] SET NOT NULL on 'orders' scans the table under ACCESS EXCLUSIVE. Fix: ADD CONSTRAINT ... CHECK (col IS NOT NULL) NOT VALID; VALIDATE CONSTRAINT; then SET NOT NULL. ddlgate: 1 file(s) scanned, 3 error(s), 1 warning(s)
Break nothing in production. Play Lock Watch: spot the migration lines that would lock a busy table.
Simulated training exercise, not a real scan result.
DDLGate is a single script that uses the Python 3 standard library. The skill tells your agent when to run it and how to read the result.
Your agent drafts or edits a Laravel migration or a plain PostgreSQL SQL file as usual.
Run DDLGate on changed files. Findings include the rule, file and line, plus the table when identified.
Every finding carries a concrete fix, so the agent rewrites the statement and checks again.
See vendors/README.md for documented setup by tool. Live installation and skill discovery are unverified.
Install with skills CLI
npx skills add QidarSarhan/ddlgate
Follow the documented steps for your tool. Registry commands require a published repository. For Antigravity, copy the skill to .agents/skills/ddlgate/ or ~/.gemini/config/skills/ddlgate/.
/plugin marketplace add QidarSarhan/ddlgate /plugin install ddlgate@ddlgate
Copy the skill folder to .agents/skills/ddlgate/ or ~/.agents/skills/ddlgate/. You can also extract ddlgate-skill.zip into .agents/skills/ or ~/.agents/skills/.
Install the local extension or copy extension/skills/ddlgate to .gemini/skills/ddlgate/ or ~/.gemini/skills/ddlgate/. gemini extensions install https://github.com/QidarSarhan/ddlgate
Copy the skill folder to .opencode/skills/ddlgate/. You can also extract ddlgate-skill.zip into .opencode/skills/.
Copy the skill folder to .github/skills/ddlgate/ or ~/.copilot/skills/ddlgate/. You can also extract ddlgate-skill.zip into .github/skills/ or ~/.copilot/skills/.
Copy the skill folder to .cursor/skills/ddlgate/.
The terminal above is the real output on the bundled unsafe example.
The project includes unit tests that exercise rule behavior. See CI for unit test results.
The bundled PostgreSQL reference summarizes typical lock modes, what they can block, and version-specific behavior.
Whether you are submitting pull requests, or helping others debug, your participation powers this project.
Help shape the codebase, report defects, join technical architectural discussions, or claim your first open issue.