Agent Skills
› open-mercato/open-mercato
› om-fix-specs
om-fix-specs
GitHub将遗留的SPEC-*规范文件重命名为日期+slug格式,处理文件名冲突并更新引用链接。
Trigger Scenarios
遗留SPEC-*文件名需清理
移除前缀后出现文件名冲突
规范化后链接失效
Install
npx skills add open-mercato/open-mercato --skill om-fix-specs -g -y
SKILL.md
Frontmatter
{
"name": "om-fix-specs",
"description": "Normalize spec filenames in .ai\/specs and .ai\/specs\/enterprise to the date+slug convention. Use this when legacy `SPEC-*` \/ `SPEC-ENT-*` names need to be cleaned up, when filename collisions appear after dropping numeric prefixes, or when links must be updated after normalization."
}
Fix Specs
Normalize legacy spec filenames to the date+slug convention with minimal churn.
When to use
- Legacy specs still use
SPEC-*orSPEC-ENT-*filename prefixes. - Two specs would collide after removing the numeric prefix.
- Links now point to the wrong filename after normalization.
Rules
- New canonical filenames are
{YYYY-MM-DD}-{slug}.mdfor both OSS and enterprise specs. - Remove legacy
SPEC-*/SPEC-ENT-*filename prefixes instead of inventing replacement numbers. - If two files would normalize to the same target, keep the older filename target and make the newer slug more specific.
- Update filename references and links everywhere in the repo.
- Preserve document history inside the file content when useful, but filenames MUST follow the date+slug format.
Workflow
- Run a dry run first:
python3 .ai/skills/om-fix-specs/scripts/fix_spec_conflicts.py --dry-run - Review planned renames and file updates.
- Apply changes:
python3 .ai/skills/om-fix-specs/scripts/fix_spec_conflicts.py --apply - Verify no conflicts remain:
python3 .ai/skills/om-fix-specs/scripts/fix_spec_conflicts.py --dry-run
Notes
- The script scans both
.ai/specsandai/specsroots if present. - Enterprise typos are tolerated (
enterpriseandenterpirse). - Conflict resolution drops legacy numeric prefixes first, then adds a slug suffix only when two files would land on the same target filename.
- Files without an embedded
YYYY-MM-DDsegment are skipped by the script and must be normalized manually. - Review in-file titles manually after normalization if you also want to remove legacy
SPEC-*labels from headings.
Version History
- c915d76 Current 2026-07-24 20:43


