Update skill-creator and make scripts executable (#350)

- Add `compatibility` optional field to SKILL.md frontmatter spec
- Add validation for `compatibility` field in quick_validate.py
- Rename "hyphen-case" to "kebab-case" terminology in init_skill.py
  and quick_validate.py
- Update max skill name length from 40 to 64 characters
- Make scripts executable (chmod +x) for accept_changes.py,
  comment.py, extract_form_structure.py, add_slide.py, thumbnail.py,
  and recalc.py

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Keith Lazuka
2026-02-06 16:19:32 -05:00
committed by GitHub
parent a5bcdd7e58
commit 1ed29a03dc
9 changed files with 16 additions and 7 deletions
+11 -3
View File
@@ -39,7 +39,7 @@ def validate_skill(skill_path):
return False, f"Invalid YAML in frontmatter: {e}"
# Define allowed properties
ALLOWED_PROPERTIES = {'name', 'description', 'license', 'allowed-tools', 'metadata'}
ALLOWED_PROPERTIES = {'name', 'description', 'license', 'allowed-tools', 'metadata', 'compatibility'}
# Check for unexpected properties (excluding nested keys under metadata)
unexpected_keys = set(frontmatter.keys()) - ALLOWED_PROPERTIES
@@ -61,9 +61,9 @@ def validate_skill(skill_path):
return False, f"Name must be a string, got {type(name).__name__}"
name = name.strip()
if name:
# Check naming convention (hyphen-case: lowercase with hyphens)
# Check naming convention (kebab-case: lowercase with hyphens)
if not re.match(r'^[a-z0-9-]+$', name):
return False, f"Name '{name}' should be hyphen-case (lowercase letters, digits, and hyphens only)"
return False, f"Name '{name}' should be kebab-case (lowercase letters, digits, and hyphens only)"
if name.startswith('-') or name.endswith('-') or '--' in name:
return False, f"Name '{name}' cannot start/end with hyphen or contain consecutive hyphens"
# Check name length (max 64 characters per spec)
@@ -83,6 +83,14 @@ def validate_skill(skill_path):
if len(description) > 1024:
return False, f"Description is too long ({len(description)} characters). Maximum is 1024 characters."
# Validate compatibility field if present (optional)
compatibility = frontmatter.get('compatibility', '')
if compatibility:
if not isinstance(compatibility, str):
return False, f"Compatibility must be a string, got {type(compatibility).__name__}"
if len(compatibility) > 500:
return False, f"Compatibility is too long ({len(compatibility)} characters). Maximum is 500 characters."
return True, "Skill is valid!"
if __name__ == "__main__":