anthropics / anthropics/claude-code
[Bug] Skill `arguments:` frontmatter not substituted when invoked via Skill tool
- Lenguaje dominante
- Python
- Estrellas
- 145k
- Forks
- 23.1k
- Métricas de merge de PR
- Métricas de PR pendientes
Descripción
**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
[]
```
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- python
- Área
- cli, tooling
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Activo
- Claridad
- Bastante claro
- Aptitud para principiantes
- 48/100