Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

maintainer review treats SKILL.md files in hidden agent directories as library skills

未关闭 适合新手
#294 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
75/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
nodejs, typescript
领域
cli, tooling

调研方向

问题位于 packages/intent/src/review/review.ts 第 565-572 行。与 packages/intent/src/maintainer/existing.ts 第 74-83 行的逻辑进行比较。修复方法是为审查的技能发现添加针对隐藏段(以 '.' 开头的部分)和 'node_modules' 的过滤器。首先运行重现步骤以查看失败,然后修改 review.ts 中的路径测试以匹配设置逻辑。通过在包含隐藏目录 .claude/skills/ 的测试工作区中运行 maintainer reviewmaintainer 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/intent preview https://pkg.pr.new/@tanstack/intent@292 (commit 80ed89d), source checked against main at 305ca7f
  • Node.js 24.21, pnpm 12.3.4, macOS arm64
主要语言
TypeScript
星标
331
派生
22
平均合并
12 小时 17 分钟
30 天内合并 PR
51

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

TanStack/intent 的其他 Issue

查看 TanStack/intent 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。