yida-db-seq-fix SKILL.md skillA
yida-db-seq-fix from openyida/openyida is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.
mdr add openyida/openyida/yida-db-seq-fix@git:20260414.a0ded0dPins git:20260414.a0ded0d in mdr.lock. Pin the fingerprint instead.
- Audit grade
- A, 17 of 17 checks passed
- Kind
- SKILL.md skill
- Repository
- openyida/openyida
- Path
yida-skills/skills/yida-db-seq-fix/SKILL.md- Versions recorded
- 1
- Latest version
- git:20260414.a0ded0d, committed Apr 14, 2026
- Size
- 3,583 bytes
- Repository stars
- 231
- License
- MIT
PostgreSQL Sequence 自动修复工具。检测并修复宜搭环境检测自动建表时 Sequence 起始值问题,避免主键冲突。当用户提到"Sequence"、"主键冲突"、"自增ID错误"、"db-seq-fix"时触发。.
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# PostgreSQL Sequence 自动修复 ## 严格禁止 (NEVER DO) - 不要在生产环境直接执行 `--fix`,必须先用 `--dry-run` 预览 - 不要在未确认数据库连接的情况下执行修复操作 - 不要跳过 Sequence 检测直接修改数据库 ## 严格要求 (MUST DO) - 执行修复前必须先用 `--dry-run` 确认影响范围 - 修复完成后必须验证 Sequence 值是否正确更新 - 记录修复操作日志,便于问题追溯 ## 适用场景 | 用户意图 | 触发条件 | |---------|---------| | Sequence 起始值检测 | 环境检测自动建表后,需要验证 Sequence 配置 | | 主键冲突修复 | 插入数据时报 `duplicate key value violates unique constraint` 错误 | | 预防性检查 | 数据迁移后,确保 Sequence 值正确 | --- ## 背景 宜搭环境检测自动建表时,PostgreSQL 的 Sequence 默认使用 `START 1`。如果数据迁移时已有数据,Sequence 起始值可能小于已有数据的最大 ID,导致插入时报主键冲突错误。 此工具用于: 1. 检测 8 个核心表的 Sequence 当前值 2. 对比表中实际最大 ID 3. 自动将 Sequence 起始值设置为 `max(id) + 1` ## 命令 ### 预览模式(推荐先执行) ```bash openyida db-seq-fix --dry-run ``` 输出示例: ``` 📋 Sequence 检测报告 表名 当前值 最大ID 状态 ───────────────────────────────────────────── form_component 1 1000 ⚠️ 需要修复 form_definition 1 500 ⚠️ 需要修复 ... 💡 使用 openyida db-seq-fix --fix 执行自动修复 ``` ### 执行修复 ```bash openyida db-seq-fix --fix ``` 输出示例: ``` ✅ Sequence 修复完成 表名 修复前 修复后 ──────────────────────────────────────── form_component 1 1001 …
Read the whole file at its exact version.
How to install
mdr add openyida/openyida/yida-db-seq-fix@sha256:0b9f4c93d8399b88The line at the top of this page pins the label git:20260414.a0ded0d, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
[](https://markdownregistry.com/a/art_doy4js4p6ao2ziaj)
3 badge image fetches in 30 days. What the badge shows.
Versions
The registry has recorded 1 version of this file, committed on Apr 14, 2026.
Audit of the latest version
- pass: Frontmatter block present
- pass: Frontmatter declares a name
- pass: Frontmatter declares a description
- pass: Size between 200 bytes and 200 KB (3583 bytes)
- pass: No zero-width or bidi control characters
- pass: No instruction hidden inside an HTML comment
- pass: No link to an exfiltration or paste host
- pass: No credential-shaped string
- pass: No instruction to send local credentials anywhere
- pass: No text hidden with inline styles
- pass: No prompt-injection phrasing
- pass: No curl or wget piped into a shell
- pass: No recursive delete of root, home or parent
- pass: No instruction to read or print local credentials
- pass: No base64 blob over 200 characters
- pass: No link to a raw IP address
- pass: No script tag
Source
openyida/openyida · 231 stars · license MIT · pushed 2026-11-06 · branch main
API
GET https://markdownregistry.com/api/v1/artifacts/art_doy4js4p6ao2ziaj GET https://markdownregistry.com/api/v1/resolve?ref=openyida/openyida/yida-db-seq-fix GET https://markdownregistry.com/api/v1/blob/0b9f4c93d8399b8838558030a1e341970e6624ad11d82c8d414606ea6b98fa35
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.