anthropics / anthropics/claude-code
[Bug] Skill `arguments:` frontmatter not substituted when invoked via Skill tool
- Ngôn ngữ chính
- Python
- Star
- 145k
- Fork
- 23.1k
- Chỉ số merge pull request
- Chỉ số pull request đang chờ
Mô tả
**Bug Description**
Skill `arguments:` frontmatter (named positional $name substitution) does not
reach skills invoked via the Skill tool.
Claude Code 2.1.241, macOS. Plugin: MaxxtonGroup/claude-marketplace
developer 2.30.1, skill `reviewing-pre-pr`.
The skill declares:
arguments: base repo
context: fork
and its body references $base / $repo.
OBSERVED
1. Invoking it via the Skill tool with args "master /abs/path/to/repo"
(exactly two clean tokens) three times: the skill's context reports it
received no arguments at all. Not unsubstituted "$repo" — nothing.
On the third attempt it reported its cwd as the *session's* directory,
an unrelated repo.
2. Control, same session, same Skill tool: a forked skill with NO
`arguments:` key (`developer:reviewing-code-quality`, also context: fork)
received its raw args fine and echoed back a probe token.
So forking alone does not lose arguments.
3. Non-forked skills without `arguments:` also received args normally
(raw args appended as an "ARGUMENTS:" line).
INFERRED, NOT ISOLATED
Declaring `arguments:` appears to switch the skill onto the $name
substitution path and consume the raw ARGUMENTS passthrough; that
substitution then doesn't run on the Skill-tool path, so the values are
lost entirely rather than arriving unsubstituted. I could not test the
remaining case (non-forked skill WITH `arguments:`) because no such skill
exists to invoke, so I can't say whether `context: fork` is required to
trigger it or whether `arguments:` is simply ignored by the Skill tool
generally.
Typed slash-command invocation of the same skill did substitute correctly
in an earlier session, which is consistent with this being specific to the
Skill-tool path.
IMPACT
The skill is a pre-PR review gate. With arguments lost, its documented
fallback treats an empty repo argument as "use the working directory", so
it reviews whichever repo the session happens to sit in and, in one earlier
instance, opened a real pull request in that unrelated repo.
EXPECTED
Either apply $name substitution on the Skill-tool path, or — if `arguments:`
is unsupported there — leave the raw ARGUMENTS passthrough intact so the
skill still receives its input, and surface a warning that the declared
arguments were not substituted.
**Environment Info**
- Platform: darwin
- Terminal: xterm-256color
- Version: 2.1.241
- Feedback ID: 5e8f18b8-1b66-4264-84fa-502ccb5b8394
**Errors**
```json
[]
```
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Hướng nghiên cứu
Start by tracing the Skill tool path for skills declaring `arguments:` frontmatter, then reproduce the issue with the two-token invocation described above and compare it with a skill without that key. Done means named substitution works through the Skill tool, or raw arguments remain available with a warning when substitution is unsupported.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- python
- Lĩnh vực
- cli, tooling
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Sôi nổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 48/100