Skip to content

[doc-gate] SKILL.md 中 docs-graph.py / recall-gate.py 的路径相对基准错误,按文档调用必然 No such file #154

Description

@WooDragon

问题

doc-gateskills/doc-maintenance/SKILL.md 第 130-131 行把两个内置工具写成:

  • tools/recall-gate.py
  • tools/docs-graph.py

读者会按 skill 目录去解析这个相对路径,但该目录下没有 tools/

skills/doc-maintenance/tools/     ← 不存在
doc-gate/<version>/tools/         ← 实际位置

影响

docs-graph.py 是被下游强制要求使用的工具。我的 Infra 项目 CLAUDE.md 里写着「文档引用关系查询(断链检测、backlinks、改名影响面)必须使用 docs-graph.py,禁止全库 grep 文件名猜引用关系」。被强制使用的工具给出错误路径,第一次调用必然失败:

python3 <skill_dir>/tools/docs-graph.py --root ... check
→ can't open file '.../skills/doc-maintenance/tools/docs-graph.py': [Errno 2] No such file or directory

失败后容易退回 grep,正好是该规则要禁止的行为。

建议

SKILL.md 中改为相对插件根的明确路径,或直接给出基于 CLAUDE_PLUGIN_ROOT 的调用形式(scripts/recall-gate.sh 第 99 行已经用了 ${CLAUDE_PLUGIN_ROOT}/tools,可与之对齐)。

环境

doc-gate 1.7.1

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions