carloscape/octorato/idempotent-sql-design
Claude Code and agent skill by carloscape/octorato
- community
Checking that the SKILL.md file is still in the repository.
Idempotent SQL Design
Install
npx vskill@latest install carloscape/octorato/idempotent-sql-designSKILL.md
Idempotent SQL Design
What
Scripts that check the current state before acting, so they can be safely re-run without causing errors or duplicate changes. Running the script once or ten times produces the same final state.
Why
Deployments fail. Networks drop. Operators re-run scripts "just to be sure." An idempotent script handles all of these gracefully -- it skips work that's already done and only applies what's missing.
How
Column renames
Index creation
FK constraints
Key Principle
The pattern is always:
- Query current state (does the old column exist? does the index exist?)
- Act only if needed (IF EXISTS / IF NOT EXISTS)
- Report what happened (RAISE NOTICE with [OK] or [--] prefix)
When to Use
- Every DDL script. Always.
- Especially critical for scripts deployed to multiple environments where
some may already have partial changes applied
Where We Used It
- ****: Column renames + procedure updates (check old/new state first)
- /: FK constraint creation (check constraint existence)
- /: Index creation (check index existence)
Category: Reliability | Origin:
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/idempotent-sql-design/SKILL.md
Popularity
- Repository stars
- 17
- Repository forks
- 7
- 7-day trend score
- 14
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/carloscape/octorato/idempotent-sql-design)