agents-squad list_skills ignores the standard ~/.agents/skills layout and only sees the 7 bundled skills

オープン
#242 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
78/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
typescript
領域
tooling

調査の方向性

Start in index.ts at BUNDLED_SKILLS_DIR, GLOBAL_SKILLS_DIR, and readMarkdownDir, then compare this discovery logic with the standard paths resolved by @cline/core. Exercise list_skills with both flat Markdown files and nested SKILL.md directories, including invalid frontmatter. Done means standard global and project roots are discovered, existing precedence and deduplication still work, parse failures are surfaced, and the rules are documented in plugins/agents-squad/README.md.

索引モデルが issue の本文から書いたものです。

説明

Summary

list_skills (and run_skill) can only see skills that live as flat <dir>/<name>.md inside three plugin-private roots. Skills installed in the standard agents layout — ~/.agents/skills/<name>/SKILL.md, which cline skill writes and which @cline/core already resolves — are invisible.

In a Cline Desktop session the tool returned exactly the 7 bundled skills while 35 user skills were installed, so the agent reports that skills it is otherwise offered "do not exist".

Environment
  • Cline Desktop 0.0.51, CLI 3.0.76, @cline/core 0.2.2, Bun 1.4.2, Windows 11 10.0.26300
  • agents-squad installed via cline plugin install agents-squad → ~/.cline/plugins/_installed/official/agents-squad-1ae2facb94f9, plugin itself loads fine
  • ~/.agents/skills: 35 skills, 22 of them ship extra files (scripts/, references/); 43.5 MB / 411 files
What the tool reports
list_skills → 7 entries, all source: "bundled"
api-design, code-review, debugging, documentation, migration, refactoring, test-generation

~/.agents/skills/squad-token-saver, duckduckgo-web-search, archive-7z, … are all absent.

Minimal reproduction
# 1. any standard skill
mkdir ~/.agents/skills/foo
#    write ~/.agents/skills/foo/SKILL.md with `name`/`description` frontmatter + body

# 2. call list_skills  -> `foo` is NOT listed

# 3. move it to the plugin-private flat layout
mkdir ~/.cline/data/settings/skills
copy ~/.agents/skills/foo/SKILL.md ~/.cline/data/settings/skills/foo.md

# 4. call list_skills again -> `foo` IS listed (source: "global")
Root cause (index.ts on main)
// :41
const BUNDLED_SKILLS_DIR = join(MODULE_DIR, "skills");

// :86
const GLOBAL_SKILLS_DIR = join(resolveClineDataDirPath(), "settings", "skills");

// :253-258
const dirs = [
  { path: BUNDLED_SKILLS_DIR, source: "bundled" },
  { path: GLOBAL_SKILLS_DIR,  source: "global" },
  { path: join(baseCwd, ".cline", "skills"), source: "project" },
];

Two problems:

  1. Wrong roots. ~/.agents/skills (global) and <baseCwd>/.agents/skills (project) are missing — those are the paths the host uses.
  2. Wrong shape. readMarkdownDir (:199) only accepts top-level entries where entry.isFile() && entry.name.endsWith(".md") (:215-216), so a directory-shaped skill (<name>/SKILL.md) is skipped even if a root were added.

Meanwhile @cline/core 0.2.2 already resolves the standard layout:

// core dist
function rg(n){ return [
  join(dataRoot, "skills", n, "SKILL.md"),
  join(homeDir,  ".agents", "skills", n, "SKILL.md"),
].filter(dedupe) }

and the CLI's own cline skill installs globally into ~/.agents/skills (its error text is literally
Cannot install skill globally because ~/.agents/skills is not writable).

Result: the host mounts/offers one inventory, while the agent-facing tool reports a different, much smaller one.

Secondary bug: invalid frontmatter makes a skill vanish silently

readMarkdownDir wraps each parse in try { … } catch {} (:217-224). One of my skills had

compatibility: Cline SDK (@cline/sdk); plugins: agents-squad, goal; 兼容 r9k-subagent-routing。

which throws YAMLParseError: Nested mappings are not allowed in compact mappings at line 3, column 16.
The skill is then silently dropped — no entry, no warning, no way to tell a typo from a missing file.
(Quoting the value fixes it; the field itself is allowed — core's allowlist is
name, description, license, compatibility, metadata, allowed-tools.)

Suggested fixes
  1. Read the standard layout: for each root accept both <name>.md and <name>/SKILL.md (the latter by descending one level for SKILL.md).
  2. Add the standard roots: ~/.agents/skills and <baseCwd>/.agents/skills, honouring CLINE_DIR / CLINE_DATA_DIR the same way the rest of the file does. Keep today's precedence (bundled → global → project, last wins by name) so overrides still work; dedupe by name as now.
  3. Surface failures: collect parse/validation errors and return them (warnings / failures array in the tool result) instead of catch {}.
  4. Document the discovery rules in plugins/agents-squad/README.md: which directories are read, which shape, which frontmatter fields are allowed.
Workaround (verified)

Materialise the standard tree into a root the plugin does read: for every ~/.agents/skills/<name>/SKILL.md
write <CLINE_DATA_DIR>/settings/skills/<name>.md, and mirror the whole skill directory to
<CLINE_DATA_DIR>/settings/skills/<name>/ so relative asset paths (./scripts/…) keep resolving
(readMarkdownDir only looks at top-level .md files, so the mirrored directory is inert for listing).
With that, list_skills returned the bundled 7 plus the 35 user skills.
Happy to paste the ~40-line PowerShell sync script if it is useful for the README.

Why this matters

Skills are the main "how the agent should do X" surface. When the inventory mounted by the host and the inventory reported by this tool disagree, the model is actively misled: it will tell the user a skill does not exist, or fall back to generic behaviour, even though the skill is right there in ~/.agents/skills.

主要言語
TypeScript
スター
38
フォーク
18
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

cline/plugins のほかの issue

cline/plugins の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。