maintainer review treats SKILL.md files in hidden agent directories as library skills
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 75/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- nodejs, typescript
调研方向
问题位于 packages/intent/src/review/review.ts 第 565-572 行。与 packages/intent/src/maintainer/existing.ts 第 74-83 行的逻辑进行比较。修复方法是为审查的技能发现添加针对隐藏段(以 '.' 开头的部分)和 'node_modules' 的过滤器。首先运行重现步骤以查看失败,然后修改 review.ts 中的路径测试以匹配设置逻辑。通过在包含隐藏目录 .claude/skills/ 的测试工作区中运行 maintainer review 和 maintainer check 来验证。
由索引模型根据 Issue 内容生成。
描述
Problem
intent maintainer review treats every SKILL.md under a skills/ directory as a library skill, including skills in hidden agent directories such as .claude/skills/. These are repository-local agent skills: they are not published and declare no sources. Review reports each one as pending, and recording fails, so maintainer check cannot pass in a repository that has project-level agent skills.
maintainer setup already excludes these paths when it registers existing skills, so the two commands disagree on what a library skill is.
Reproduction
In a pnpm workspace with one package skill and one project-level Claude Code skill:
.claude/skills/add-a-package/SKILL.md # repository-local agent skill, no sources
packages/client/skills/client-core/SKILL.md
_artifacts/{domain_map.yaml,skill_spec.md,skill_tree.yaml}
pnpm exec intent maintainer setup
pnpm exec intent maintainer review --updated "Initial review."
pnpm exec intent maintainer check
maintainer setup registers only packages/client/skills/client-core/SKILL.md, as expected.
maintainer review --updated fails:
Review skill:.claude/skills/add-a-package/SKILL.md has unresolved source evidence. Fix the source mapping before recording it.
maintainer check reports:
Review skill .claude/skills/add-a-package/SKILL.md: No source paths declared. Add the evidence used to author this skill.
Adding .claude/** to review.ignore in skill_tree.yaml does not help: that list filters unmapped changes, not skill discovery.
Cause
Review selects skill files with a path test only (review.ts#L565-L572):
basename(path) === 'SKILL.md' &&
(/(^|\/)skills\//.test(path) || /* ... */)
Setup applies the same test and also skips hidden segments and node_modules (existing.ts#L74-L83):
basename(path) === 'SKILL.md' &&
/(^|\/)skills\//.test(path) &&
!path
.split('/')
.some((part) => part.startsWith('.') || part === 'node_modules')
Expected
Review discovers the same default set as setup: hidden agent directories (.claude/, .cursor/, .agents/, …) stay out unless the skill tree declares the path explicitly, or review state already records it.
Suggested fix
Apply the hidden-segment filter of existing.ts to the /(^|\/)skills\// branch in review.ts, and keep the customRoots, declaredSkills and review-state branches as they are. A shared helper would keep the two rules from drifting again.
Environment
@tanstack/intentpreviewhttps://pkg.pr.new/@tanstack/intent@292(commit80ed89d), source checked againstmainat305ca7f- Node.js 24.21, pnpm 12.3.4, macOS arm64
- 主要语言
- TypeScript
- 星标
- 331
- 派生
- 22
- 平均合并
- 12 小时 17 分钟
- 30 天内合并 PR
- 51
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
TanStack/intent 的其他 Issue
-
难度 5/5 一周以上 新手友好度 45/100
-
难度 4/5 3-5 天 新手友好度 48/100
-
难度 5/5 一周以上 新手友好度 35/100
-
难度 5/5 一周以上 新手友好度 45/100
-
enhancement
难度 5/5 一周以上 新手友好度 35/100
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 65/100
-
难度 2/5 1-3 小时 新手友好度 75/100
-
bug v2
难度 2/5 1-3 小时 新手友好度 75/100
modelcontextprotocol/inspector#2458 · 1 条评论 ·
-
难度 1/5 1 小时以内 新手友好度 75/100
railmapgen/rmp-gallery#4068 ·
-
Mend: dependency security vulnerability status: needs triage 🕵️♀️
难度 2/5 1-3 小时 新手友好度 70/100
carbon-design-system/ibm-products#9907 ·