anthropics / anthropics/skills

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

Abierto
#394 1 comentario 3 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Python
Estrellas
176k
Forks
20.9k
Merge medio
7 h 21 min
PR fusionados (30 d)
5

Descripción

## 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)

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.