agents-squad list_skills ignores the standard ~/.agents/skills layout and only sees the 7 bundled skills
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 78/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
- Lĩnh vực
- tooling
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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, CLI3.0.76,@cline/core 0.2.2, Bun1.4.2, Windows 1110.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:
- Wrong roots.
~/.agents/skills(global) and<baseCwd>/.agents/skills(project) are missing — those are the paths the host uses. - Wrong shape.
readMarkdownDir(:199) only accepts top-level entries whereentry.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
- Read the standard layout: for each root accept both
<name>.mdand<name>/SKILL.md(the latter by descending one level forSKILL.md). - Add the standard roots:
~/.agents/skillsand<baseCwd>/.agents/skills, honouringCLINE_DIR/CLINE_DATA_DIRthe same way the rest of the file does. Keep today's precedence (bundled → global → project, last wins by name) so overrides still work; dedupe bynameas now. - Surface failures: collect parse/validation errors and return them (
warnings/failuresarray in the tool result) instead ofcatch {}. - 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.
- Ngôn ngữ chính
- TypeScript
- Star
- 38
- Fork
- 18
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của cline/plugins
-
bug includes-hooks
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 67/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 58/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 38/100
Tất cả issue của cline/plugins
Issue tương tự
-
Flaky test: selecting a portion just after inserting it can also match its Change and Delete buttonsĐang mởready-for-agent
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
linagora/dcs-onlyoffice#172 ·
-
bug follow-up
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
nightly-tests
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
BlackBeltTechnology/pi-agent-dashboard#1226 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
danielmiessler/LifeOS#3028 ·
Maintainer thường phản hồi trong vòng 5 ngày
-
execute_sql cannot create a SQLite trigger or a PostgreSQL BEGIN ATOMIC function: the statement is cut at the semicolons inside its bodyCó thể đã có người làm @goranai đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày