07-schema-recommendations-agent-loop
安装方式
先用 Prompt 核对来源与依赖。也可下载安装包。
用 AI 助手安装
复制提示词,让助手先核对固定版本和依赖。
查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "07-schema-recommendations-agent-loop":https://skillpi.com/zh/skills/deepskill-09052ef9a8aa76e29eb27ee5bbf91efe14c895cb1804057079a9cf1436759b46。安装前核对上游来源和版本:https://github.com/planetscale/skills。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。
来源与配置
github.com
配置方式待核实
请查看原始来源中的适用工具、依赖和权限要求。
安装实测待补充
将对 PlanetScale 模式的建议进行安全分类,并把这些建议转化为审查过的分支、迁移、问题或拉取请求,但不在生产环境中应用任何更改。
介绍来源: third_party · planetscale · 1.0.0 参考来源
SkillPi 解读
- 能完成的任务
- 翻译待完成,请参阅来源文档。
- 适合谁
- 来源文档未说明。
- 输入和输出
- 翻译待完成,请参阅来源文档。
- 软件、账号及付费要求
- 来源文档未说明。
- 限制与区别
- 来源文档未说明。
- 实测状态
- 未测试
文件浏览
Frontmatter
name: planetscale-schema-recommendations-agent-loop
description: Safely triage PlanetScale schema recommendations and turn them into reviewed branches, migrations, issues, or pull requests without applying production changes.Schema recommendations agent loop
Purpose
Use PlanetScale schema recommendations as high-quality input to agents. Convert recommendations into safe implementation plans, issues, branches, migrations, or pull requests. Do not apply recommendations directly.
Inputs
Collect:
- Open schema recommendations.
- Recommendation type.
- Affected table, keyspace, schema, and query pattern.
- Suggested DDL.
- Supporting Insights evidence.
- Application repository and migration system.
- Engine: Vitess or Postgres.
- Target branch.
Recommendation types to recognize
- Add index for inefficient query.
- Remove redundant index.
- Prevent primary key ID exhaustion.
- Drop unused table.
- Upgrade legacy charset or collation.
- Other DDL recommendation.
Triage questions
For each recommendation, answer:
- Is this still open and relevant?
- Which query patterns triggered it?
- Which application code paths generate those queries?
- Is the recommendation safely expressible in the application’s migration framework?
- Does the ORM/schema source of truth need to change?
- Can it be tested on a non-production branch?
- What is the expected impact on reads, writes, storage, and deploy time?
- Is there a rollback or revert path?
- Is there a competing recommendation or migration?
Engine-specific implementation path
Vitess
Recommended path:
- Create or use a development branch.
- Apply the schema change to that branch only after approval.
- Open a deploy request only after approval.
- Use deploy request review to inspect schema, shard impact, data-loss warnings, lint errors, and conflicts.
- Use normal safe migration path unless instant deployment is explicitly justified.
- Deploy only after approval.
- Monitor Insights and anomaly state after deployment.
Default output before approval: issue or PR with migration proposal, not a live deploy request.
Postgres
Recommended path:
- Convert DDL into the application’s migration framework where possible.
- Test against a non-production branch.
- Run application tests and relevant query checks.
- Open PR.
- Apply production migration only after approval.
- Use backups/PITR runbook as recovery plan, not as a substitute for migration review.
Default output before approval: migration PR or issue, not production DDL.
Codebase correlation
When a repository is available:
- Search for the table and column names.
- Search for ORM model definitions.
- Search for migrations.
- Search for query fingerprints, route tags, job names, and controller/action names from Insights.
- Identify whether the recommendation should be implemented in database DDL, ORM schema, raw migration, or application query code.
Safety checks before proposing implementation
Block direct application when:
- The recommendation is stale or already addressed.
- The affected table is small enough that the benefit is unclear.
- The index would be redundant with an existing index.
- The index would hurt write-heavy workloads without enough read benefit.
- The table appears unused but repository references are ambiguous.
- Dropping a table or index lacks owner confirmation.
- The migration framework has a different schema source of truth.
- The recommendation targets production and no branch/test plan exists.
Output
For each recommendation, produce:
- Recommendation ID/number.
- Type.
- Severity and expected benefit.
- Evidence from Insights.
- Affected schema.
- Suggested DDL.
- Application code owner or likely location.
- Safe implementation path.
- Validation plan.
- Rollback/revert plan.
- Approval requirement.
End with:
“No schema recommendations have been applied.”
当前收录版本
1.0.0
安全与评测信息
质量评测
满分100 · 来自 SkillPi LAB 实验室的评测报告。
亮点
- 针对 PlanetScale 数据库模式建议提供端到端的安全处理流程,显著提升数据库运维效率
- 明确区分 Vitess 和 Postgres 引擎的实现路径,具备高度实用性
亮点
- description 清晰准确,覆盖多种推荐类型和场景,触发边界明确
亮点
- 文档结构完整,逻辑清晰,包含输入、处理逻辑、安全检查、输出等关键环节
亮点
- 覆盖主要异常场景,生产变更需审批,具备 rollback 计划,执行路径安全可靠
取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。
正文静态检测
100 / 100 · skillpi-20261123-no-r3-v1
正文未命中当前规则。
分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。
权限与使用前检查
根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。
未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。
安全评级与访问范围
safe · 静态证据核验,不代表运行安全保证。
来源文档未说明。
使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。
用户讨论
还没有已核实的点评。