anthropics / anthropics/skills

Packaging validator should warn (not error) on platform-specific extension fields

Offen
#394 1 Kommentar 3 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Python
Sterne
176k
Forks
20.8k
Ø Merge
7 Std. 21 Min.
Gemergte PRs (30 T.)
5

Beschreibung

## Context

The [Agent Skills open standard](https://agentskills.io/specification) defines 6 frontmatter fields:

```
name, description, license, compatibility, metadata, allowed-tools
```

The validator in `skills/skill-creator/scripts/quick_validate.py` (line 42) correctly enforces this set. However, platform-specific implementations like [Claude Code](https://code.claude.com/docs/en/skills#frontmatter-reference) extend the standard with additional fields:

```
model, context, agent, argument-hint, hooks, disable-model-invocation, user-invocable
```

These fields are documented and functional in Claude Code but are not part of the base spec. Other platforms (Cursor, Gemini CLI, Copilot, Goose, etc.) would simply ignore them.

## Problem

The validator currently **hard-errors** on any field not in the base spec:

```python
ALLOWED_PROPERTIES = {'name', 'description', 'license', 'allowed-tools', 'metadata', 'compatibility'}
unexpected_keys = set(frontmatter.keys()) - ALLOWED_PROPERTIES
if unexpected_keys:
return False, f"Unexpected key(s)..."
```

This means a skill authored for Claude Code with `context: fork` or `model: sonnet` fails validation and can't be packaged, even though:
- The base spec fields are all valid
- The extension fields are inert on non-Claude platforms
- The skill is otherwise portable

## Suggestion

**Warn on unknown fields instead of erroring.** Something like:

```python
if unexpected_keys:
print(f"Warning: non-standard frontmatter key(s): {', '.join(sorted(unexpected_keys))}. "
f"These may be platform-specific extensions and will be ignored by agents "
f"that don't support them.")
# Continue validation instead of returning False
```

This preserves the signal ("hey, these aren't portable") without blocking packaging of otherwise-valid skills that use platform extensions.

## References

- [Agent Skills spec - frontmatter](https://agentskills.io/specification#frontmatter-required)
- [Claude Code skills - frontmatter reference](https://code.claude.com/docs/en/skills#frontmatter-reference)

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.