Stored Procedure Generator Skill for PostgreSQL Inventory Checks
Define a parameterized procedure and test a valid change plus a failure with no lasting write.
中文Install in Claude Code
Use a disposable PostgreSQL database, psql, and synthetic stock data.
- Get the complete `plugins/database/stored-procedure-generator/skills/generating-stored-procedures` directory from the pinned GitHub commit.
- Copy it into the target project's `.claude/skills/`. Check `.claude/skills/generating-stored-procedures/SKILL.md`, start Claude Code at the project root, and call `/generating-stored-procedures`.
Example task
Start mug-01 at quantity 5. Call the test procedure to add 2, then attempt to subtract 9. Check the error and final stock.What to check
The valid call sets stock to 7. The invalid call fails clearly and stock remains 7.
Original SKILL.md on GitHub · Updated
Frequently asked question
Should procedure arguments be concatenated into SQL strings?
Use parameters and static SQL for ordinary updates. Follow the database's identifier quoting rules when dynamic identifiers are truly required.