Skip to content
Back to skills

Skill Code Validation

ASecurity

Use when validating skill code examples and patterns.

  • 2 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 10, 2026
ai-agentspythonshellbashtesting

Security analysis

A100/100

Scanned September 10, 2026

npx -y skills add LoopyLuci/Skills --skill skill-code-validation --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Skill Code Validation?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Skill Code Validation
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/loopyluci-skill-code-validation/badge)](https://www.skillsdirectory.com/skills/loopyluci-skill-code-validation)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: skill-code-validation
description: "Use when validating skill code examples and patterns."
version: 1.0.0
author: Hermes Agent
license: MIT
metadata:
  hermes:
    tags: [skill-validation, code-quality, syntax-checking, meta]
    related_skills: [skill-quality-standards, skill-testing-automation, skill-blueprint-generator]
---

# Skill Code Validation

Validating that skill code examples are syntactically correct and semantically sound — from Python and shell syntax checks through dependency verification and pattern matching.

## When to Use

- Ensuring skill code examples won't error at runtime
- Automating quality checks across skill inventory
- Verifying code snippets before publishing a skill
- Catching syntax errors, missing imports, and broken patterns

## Validation Methods

```python
import ast, subprocess

def validate_python(code: str) -> List[str]:
    errors = []
    try:
        ast.parse(code)
    except SyntaxError as e:
        errors.append(f"Python syntax error: {e}")
    
    # Check for unbound variables
    tree = ast.parse(code) if not errors else None
    return errors

def validate_bash(code: str) -> List[str]:
    errors = []
    if 'bash' in str(type(code)):
        result = subprocess.run(['bash', '-n', '-'], 
                               input=code, text=True, capture_output=True)
        if result.stderr: errors.append(result.stderr)
    return errors
```

## Verification Checklist

- [ ] Python code passes syntax check (ast.parse)
- [ ] Shell code passes syntax check (bash -n)
- [ ] Imports used in examples exist in standard library or are documented
- [ ] Variable names referenced before assignment
- [ ] Class/method definitions complete and consistent

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…