Generating Stored Procedures
关于
This skill generates production-ready stored procedures, functions, and triggers for PostgreSQL, MySQL, and SQL Server. Use it when you need to create database logic, optimize performance, or ensure transaction safety. It helps implement complex business rules and data integrity directly within your database.
快速安装
Claude Code
推荐/plugin add https://github.com/jeremylongshore/claude-code-plugins-plus-skillsgit clone https://github.com/jeremylongshore/claude-code-plugins-plus-skills.git ~/.claude/skills/Generating Stored Procedures在 Claude Code 中复制并粘贴此命令以安装该技能
技能文档
Overview
This skill empowers Claude to generate efficient, production-ready stored procedures, functions, and triggers for various database systems. It helps implement complex business logic, enforce data integrity, and optimize database performance directly within the database.
How It Works
- Identify Requirements: Claude analyzes the user's request to understand the desired functionality, database system, and any specific constraints.
- Generate Code: Claude uses the stored-procedure-generator plugin to create the appropriate SQL code for the stored procedure, function, or trigger.
- Present Code: Claude presents the generated SQL code to the user for review and deployment.
When to Use This Skill
This skill activates when you need to:
- Implement complex business rules within a database.
- Enforce data integrity constraints beyond simple foreign keys.
- Optimize database performance by minimizing network round trips.
- Implement atomic transactions for data consistency.
Examples
Example 1: Generating a Stored Procedure for Order Processing
User request: "generate stored procedure to process orders in PostgreSQL"
The skill will:
- Analyze the request and determine the need for a PostgreSQL stored procedure for order processing.
- Generate the SQL code for a stored procedure that handles order creation, validation, and updates.
- Present the generated SQL code to the user.
Example 2: Creating a Trigger for Auditing Data Changes
User request: "create a trigger in MySQL to audit changes to the 'products' table"
The skill will:
- Analyze the request and determine the need for a MySQL trigger on the 'products' table.
- Generate the SQL code for a trigger that logs changes (inserts, updates, deletes) to a separate audit table.
- Present the generated SQL code to the user.
Best Practices
- Database Choice: Specify the target database (PostgreSQL, MySQL, SQL Server) for optimal code generation.
- Detailed Requirements: Provide clear and detailed requirements for the stored procedure, function, or trigger to ensure accurate code generation.
- Security Considerations: Review the generated code for potential security vulnerabilities, such as SQL injection, before deployment.
Integration
This skill can be integrated with other plugins for tasks such as database schema analysis or deployment automation, allowing for a complete end-to-end database development workflow.
GitHub 仓库
相关推荐技能
content-collections
元Content Collections 是一个 TypeScript 优先的构建工具,可将本地 Markdown/MDX 文件转换为类型安全的数据集合。它专为构建博客、文档站和内容密集型 Vite+React 应用而设计,提供基于 Zod 的自动模式验证。该工具涵盖从 Vite 插件配置、MDX 编译到生产环境部署的完整工作流。
hybrid-cloud-networking
元这个Skill帮助开发者配置本地基础设施与云平台之间的安全高性能连接。它支持VPN和专用连接选项,适用于构建混合云架构、连接数据中心到云以及实现安全的跨地域网络。关键能力包括建立AWS、Azure、GCP的混合连接,满足合规要求并支持渐进式云迁移。
llamaindex
元LlamaIndex是一个专门构建RAG应用的开发框架,提供300多种数据连接器用于文档摄取、索引和查询。它具备向量索引、查询引擎和智能代理等核心功能,支持构建文档问答、知识检索和聊天机器人等数据密集型应用。开发者可用它快速搭建连接私有数据与LLM的RAG管道。
csv-data-summarizer
元该Skill能自动分析CSV文件,无需用户交互即可生成统计摘要和可视化图表。它专为处理表格数据请求而设计,内置pandas、matplotlib和seaborn依赖。开发者在上传CSV或提出数据分析需求时,系统会直接执行全量分析并输出结果。
