💡 摘要
该技能提供用于常见应用功能的PostgreSQL模式。
🎯 适合人群
🤖 AI 吐槽: “该技能可能涉及数据库模式操作,如果没有适当的安全措施,可能会暴露敏感数据。实施严格的访问控制并验证所有输入以降低风险。”
风险:Medium。建议检查:是否发起外网请求(SSRF/数据外发)。以最小权限运行,并在生产环境启用前审计代码与依赖。
InsForge Skills
PostgreSQL schema patterns for the developer community. Maintained by InsForge.
What's Included
Skill: postgres-schema-patterns
Production-ready patterns for common app features:
- Social graph (follows, connections)
- Likes, favorites, bookmarks
- Nested comments & threads
- Multi-tenant / SaaS organizations
Each pattern includes:
- Schema with constraints & indexes
- Row Level Security (RLS) policies
- SDK query examples
- Performance best practices
Works with any PostgREST-based backend.
Installation
npx skills add InsForge/insforge-skills
If you're using Claude Code, you can also install this skill as a plugin:
/plugin marketplace add InsForge/insforge-skills
/plugin install postgres-schema-patterns@insforge-agent-skills
Or browse available plugins with /plugin and select from the Discover tab.
Usage
The skill automatically activates when designing database schemas:
You: "I need to build a social media app with follows and likes"
Claude: [Loads postgres-schema-patterns]
"I'll use the Social Graph pattern..."
Or invoke directly: /insforge:postgres-schema-patterns
Contributing
We welcome contributions! Add new patterns by:
- Create a new file in
skills/postgres-schema-patterns/patterns/ - Follow the existing pattern structure (Schema, RLS, SDK, Best Practices)
- Submit a PR
Ideas for new patterns:
- E-commerce (orders, cart, inventory)
- Messaging (conversations, threads)
- Notifications
- Bookings & appointments
- Tags & categories
License
MIT
优点
- 生产就绪的模式
- 包括性能最佳实践
- 支持行级安全
- 与基于PostgREST的后端兼容
缺点
- 仅限于PostgreSQL
- 可能需要额外的自定义
- 并非所有应用功能都涵盖
- 依赖于PostgREST
相关技能
免责声明:本内容来源于 GitHub 开源项目,仅供展示和评分分析使用。
版权归原作者所有 InsForge.
