skills: a Claude-compatible SKILL.md that fails to parse is dropped without any log
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 72/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- typescript
- 领域
- tooling
调研方向
修复应放在 packages/core/src/config/plugin/compatibility.ts 中兼容性加载器的 if (parsed._tag === "Parsed") 分支里,该分支目前会静默丢弃 Skipped 结果。请阅读 agent.ts(约第 153 和 175 行)和 command.ts(约第 142 和 150 行)如何记录存在但无法使用的文件,并保持相同的写法。完成标准是:警告中包含 markdown 和 frontmatter 跳过情况下的文件名和原因,并且有测试确认该消息会出现。
由索引模型根据 Issue 内容生成。
描述
Summary
The compatibility loader reads SKILL.md files from Claude and agent skill roots (packages/core/src/config/plugin/compatibility.ts). When SkillFile.parse returns Skipped, the file is simply not added to the loaded map:
const parsed = SkillFile.parse(resolved, filepath, content)
if (parsed._tag === "Parsed") loaded.set(parsed.skill.id, parsed.skill)
There is no log call on the other branch, so a skill that exists but cannot be parsed disappears without a trace at every log level, including DEBUG. The model then works without instructions the user believes are loaded.
This is the same symptom as #66716, which covers the native skill loader (skill.ts, which logs the skip at logDebug). This loader is the only one of the three that reports nothing at all.
Environment
- opencode version: 2.4.2, and
devat2204311e - Client: TUI / shared service
- Model and provider: Not relevant
- OS: Linux 6.x x86_64
- Terminal: xterm-kitty, truecolor
- Shell: /bin/bash
- Install/channel: latest (release)
- Active plugins: none related
Reproduction
-
Create a skill under a compatibility root, for example
~/.claude/skills/repro/SKILL.md, with frontmatter that parses as YAML but does not decode into the expected shape:--- name: repro description: [not, a, string] --- body -
Make sure that root is part of
compatibility.claudesoConfigCompatibilityPluginscans it. -
Start opencode and open the skills list (
/skills). -
The skill is absent.
-
Search the log for the path: there is no line naming the file, at the default level or with
OPENCODE_LOG_LEVEL=DEBUG.
Expected Behavior
A warning that names the file and the reason it was skipped, in the same shape the other two loaders already use for a file that exists but cannot be used (agent.ts:153/agent.ts:175, command.ts:142/command.ts:150). Both skip reasons should be reported, since both mean the file was found and then dropped.
Actual Behavior
No log output at any level; the skill is silently missing from the catalog.
Additional Context
SkillFile.parse returns { _tag: "Skipped", reason: "markdown" } when the frontmatter block cannot be read at all, and { _tag: "Skipped", reason: "frontmatter", issue } when it decodes into the wrong shape. Both are currently discarded by the if above.
- 主要语言
- TypeScript
- 星标
- 228k
- 派生
- 31k
- 平均合并
- 5 小时 16 分钟
- 30 天内合并 PR
- 464
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
anomalyco/opencode 的其他 Issue
-
tui: Mermaid renderer displays <b>/<strong> tags literally and ignores \n line breaks可能已有人在做 @argszero 于 1 天前认领。 未关闭area/tui platform/wsl status/repro-simulated type/bug version/v2
难度 2/5 1-3 小时 新手友好度 82/100
anomalyco/opencode#66773 · 4 条评论 ·
维护者通常 1 天内回复
-
area/sdk-api platform/linux type/feature version/v2
难度 2/5 1-3 小时 新手友好度 76/100
anomalyco/opencode#66604 · 1 条评论 ·
维护者通常 1 天内回复
-
area/web inference/go reproduced type/bug
难度 2/5 1-3 小时 新手友好度 84/100
anomalyco/opencode#66475 · 1 条评论 ·
维护者通常 1 天内回复
-
[FEATURE]: More colorful built-in Dracula theme for the desktop app可能重新可做 关联的 PR 已关闭且未合并。 未关闭area/desktop type/feature version/v2
难度 2/5 1-3 小时 新手友好度 68/100
anomalyco/opencode#66446 · 1 条评论 ·
维护者通常 1 天内回复
-
desktop: app-version.v1 in drafts.sqlite is never refreshed — reports 1.19.4 while running 2.3.2未关闭area/desktop platform/windows type/feature version/v2
难度 2/5 1-3 小时 新手友好度 66/100
anomalyco/opencode#66079 · 1 条评论 ·
维护者通常 1 天内回复
查看 anomalyco/opencode 的全部 Issue
相似的 Issue
-
area:tui enhancement platform:macos
难度 2/5 1-3 小时 新手友好度 68/100
anthropics/claude-code#112838 ·
-
approved check:passed streams:add
难度 2/5 1-3 小时 新手友好度 66/100
维护者通常 1 天内回复
-
RequirementAgent treats list -> add -> list as a tool call cycle and drops the second list call (Python)可能已有人在做 @chaitanya0305 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 68/100
i-am-bee/beeai-framework#2049 · 1 个 reaction ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
ardia-browser/ardia#4778 ·
维护者通常 1 天内回复
-
[M09] Silence parser misreads ffmpeg times in scientific notation (6.25e-05 → 6.25 s)可能已有人在做 @G-darshan-32 今天认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 78/100
clipy-recorder/clipy#164 · 1 条评论 ·