
Skill Validator
- 115 installs
- 33 repo stars
- Updated December 25, 2025
- daffy0208/ai-dev-standards
Audit custom Claude skills for trigger clarity, schema correctness, safety boundaries, and consistent behavior before adding them to a shared agent toolchain or standards repo.
About
The skill-validator skill in ai-dev-standards helps Claude Code review and harden custom agent skills: clear triggers, valid schemas, safe boundaries, and repeatable behavior so new skills integrate cleanly into orchestrated AI development standards repos.
- Trigger and scope review
- Schema and instruction audit
- Safety boundary checks
- Behavioral consistency tests
- Toolchain readiness gating
Skill Validator by the numbers
- 115 all-time installs (skills.sh)
- Ranked #248 of 782 Skill Development skills by installs in the Skillselion catalog
- Data as of Jul 30, 2026 (Skillselion catalog sync)
npx skills add https://github.com/daffy0208/ai-dev-standards --skill skill-validatorAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 115 |
|---|---|
| repo stars | ★ 33 |
| Last updated | December 25, 2025 |
| Repository | daffy0208/ai-dev-standards ↗ |
What it does
Audit custom Claude skills for trigger clarity, schema correctness, safety boundaries, and consistent behavior before adding them to a shared agent toolchain or standards repo.
Files
Skill Validator
Validate implementations match manifests using Codex for semantic comparison
Purpose
Ensures that skill/MCP implementations actually deliver what their manifests promise. Uses Codex to perform semantic analysis comparing descriptions, preconditions, and effects against actual code. Detects drift, missing functionality, and over-promised capabilities.
When to Use
- After updating skill implementations
- During quality audits to verify accuracy
- When manifests feel outdated or incorrect
- To detect description-implementation drift
- Before releasing new versions of resources
Key Capabilities
- Semantic Comparison: Uses Codex to understand if code matches description
- Precondition Validation: Verifies claimed preconditions are actually checked
- Effect Verification: Confirms code produces claimed effects
- API Surface Analysis: Validates exposed functions match manifest
- Drift Detection: Identifies when implementation diverges from manifest
- Coverage Scoring: Measures how much of manifest is implemented
Inputs
inputs:
resource_path: string # Path to skill/MCP directory
manifest_path: string # Path to manifest.yaml (default: resource_path/manifest.yaml)
implementation_path: string # Path to code (default: resource_path/index.js)
strict_mode: boolean # Fail on warnings (default: false)Process
Step 1: Load Manifest and Implementation
#!/bin/bash
# Load manifest and implementation
RESOURCE_PATH="$1"
MANIFEST_PATH="${2:-$RESOURCE_PATH/manifest.yaml}"
IMPL_PATH="${3:-$RESOURCE_PATH/index.js}"
if [ ! -f "$MANIFEST_PATH" ]; then
echo "❌ Manifest not found: $MANIFEST_PATH"
exit 1
fi
if [ ! -f "$IMPL_PATH" ]; then
# Try alternative extensions
if [ -f "$RESOURCE_PATH/index.ts" ]; then
IMPL_PATH="$RESOURCE_PATH/index.ts"
elif [ -f "$RESOURCE_PATH/SKILL.md" ]; then
# Skill might be declarative only
IMPL_PATH=""
else
echo "⚠️ No implementation file found, validating description only"
IMPL_PATH=""
fi
fi
# Read manifest
MANIFEST=$(cat "$MANIFEST_PATH")
# Read implementation (if exists)
if [ -n "$IMPL_PATH" ]; then
IMPLEMENTATION=$(cat "$IMPL_PATH")
else
IMPLEMENTATION=""
fiStep 2: Validate Description Accuracy
# Use Codex to compare description with implementation
codex exec "
Compare this manifest description with the actual implementation:
MANIFEST:
$MANIFEST
IMPLEMENTATION:
$IMPLEMENTATION
Questions:
1. Does the implementation match the description?
2. Are there features described but not implemented?
3. Are there features implemented but not described?
4. Is the description accurate and complete?
Output JSON:
{
\"description_accurate\": boolean,
\"missing_features\": [\"feature1\", \"feature2\"],
\"undocumented_features\": [\"feature3\"],
\"accuracy_score\": 0.0-1.0,
\"issues\": [
{
\"type\": \"missing_feature\",
\"severity\": \"high|medium|low\",
\"description\": \"...\",
\"suggestion\": \"...\"
}
]
}
" > /tmp/validation-description.jsonStep 3: Validate Preconditions
# Check if preconditions are actually enforced in code
PRECONDITIONS=$(python3 -c "
import yaml, json
manifest = yaml.safe_load(open('$MANIFEST_PATH'))
print(json.dumps(manifest.get('preconditions', []), indent=2))
")
codex exec "
Analyze if these preconditions are actually checked in the code:
PRECONDITIONS:
$PRECONDITIONS
IMPLEMENTATION:
$IMPLEMENTATION
For each precondition, determine:
1. Is it checked in the code?
2. Where is it checked (function name, line number)?
3. Does it fail gracefully if not met?
4. Is the error message clear?
Output JSON:
{
\"preconditions_validated\": [
{
\"check\": \"file_exists('package.json')\",
\"enforced\": boolean,
\"location\": \"function:line\",
\"error_handling\": \"good|poor|missing\",
\"suggestion\": \"...\"
}
],
\"coverage_score\": 0.0-1.0
}
" > /tmp/validation-preconditions.jsonStep 4: Validate Effects
# Check if claimed effects are actually produced
EFFECTS=$(python3 -c "
import yaml, json
manifest = yaml.safe_load(open('$MANIFEST_PATH'))
print(json.dumps(manifest.get('effects', []), indent=2))
")
codex exec "
Verify that this code actually produces the claimed effects:
CLAIMED EFFECTS:
$EFFECTS
IMPLEMENTATION:
$IMPLEMENTATION
For each effect, determine:
1. Is the effect actually produced?
2. Where in the code does it happen?
3. Are there conditions where it might not happen?
4. Are there other effects not listed?
Output JSON:
{
\"effects_validated\": [
{
\"effect\": \"creates_vector_index\",
\"implemented\": boolean,
\"location\": \"function:line\",
\"conditional\": boolean,
\"confidence\": 0.0-1.0
}
],
\"missing_effects\": [\"effect1\"],
\"extra_effects\": [\"effect2\"],
\"coverage_score\": 0.0-1.0
}
" > /tmp/validation-effects.jsonStep 5: Validate API Surface
# For MCPs/tools with defined APIs, validate exports
if [ -n "$IMPLEMENTATION" ]; then
codex exec "
Analyze the API surface of this implementation:
IMPLEMENTATION:
$IMPLEMENTATION
Questions:
1. What functions/classes are exported?
2. What are their signatures?
3. Are they documented?
4. Do they match what the manifest describes?
Output JSON:
{
\"exports\": [
{
\"name\": \"functionName\",
\"type\": \"function|class|object\",
\"signature\": \"(args) => result\",
\"documented\": boolean
}
],
\"api_complete\": boolean,
\"documentation_quality\": \"good|fair|poor\"
}
" > /tmp/validation-api.json
fiStep 6: Generate Validation Report
# Combine all validation results
python3 <<'PYTHON_SCRIPT'
import json
from datetime import datetime
# Load validation results
with open('/tmp/validation-description.json') as f:
desc_validation = json.load(f)
with open('/tmp/validation-preconditions.json') as f:
precond_validation = json.load(f)
with open('/tmp/validation-effects.json') as f:
effects_validation = json.load(f)
try:
with open('/tmp/validation-api.json') as f:
api_validation = json.load(f)
except FileNotFoundError:
api_validation = None
# Calculate overall score
scores = [
desc_validation.get('accuracy_score', 0),
precond_validation.get('coverage_score', 0),
effects_validation.get('coverage_score', 0)
]
overall_score = sum(scores) / len(scores)
# Collect all issues
all_issues = []
all_issues.extend(desc_validation.get('issues', []))
for precond in precond_validation.get('preconditions_validated', []):
if not precond.get('enforced'):
all_issues.append({
'type': 'unenforced_precondition',
'severity': 'medium',
'description': f"Precondition not enforced: {precond['check']}",
'suggestion': precond.get('suggestion', '')
})
for effect in effects_validation.get('effects_validated', []):
if not effect.get('implemented'):
all_issues.append({
'type': 'unimplemented_effect',
'severity': 'high',
'description': f"Effect not implemented: {effect['effect']}",
'suggestion': 'Implement this effect or remove from manifest'
})
# Generate report
report = {
'resource': 'RESOURCE_NAME_PLACEHOLDER',
'validated_at': datetime.utcnow().isoformat() + 'Z',
'overall_score': round(overall_score, 3),
'scores': {
'description_accuracy': desc_validation.get('accuracy_score', 0),
'precondition_coverage': precond_validation.get('coverage_score', 0),
'effect_coverage': effects_validation.get('coverage_score', 0)
},
'validation_results': {
'description': desc_validation,
'preconditions': precond_validation,
'effects': effects_validation,
'api': api_validation
},
'issues': all_issues,
'issue_count': len(all_issues),
'passed': overall_score >= 0.8 and len([i for i in all_issues if i['severity'] == 'high']) == 0
}
with open('/tmp/validation-report.json', 'w') as f:
json.dump(report, f, indent=2)
# Print summary
print(f"\nValidation Score: {overall_score:.2f}")
print(f"Issues Found: {len(all_issues)}")
print(f"Status: {'✅ PASSED' if report['passed'] else '❌ FAILED'}")
PYTHON_SCRIPTValidation Criteria
Scoring Rules
// Overall score is average of component scores
overallScore = (descriptionAccuracy + preconditionCoverage + effectCoverage) / 3
// Pass criteria
passed = overallScore >= 0.8 && highSeverityIssues.length === 0Severity Levels
- High: Missing core functionality, unenforced preconditions, unimplemented effects
- Medium: Incomplete features, poor error handling, undocumented exports
- Low: Minor inconsistencies, documentation gaps, style issues
Example Output
{
"resource": "rag-implementer",
"validated_at": "2025-10-28T12:00:00Z",
"overall_score": 0.85,
"scores": {
"description_accuracy": 0.9,
"precondition_coverage": 0.8,
"effect_coverage": 0.85
},
"validation_results": {
"description": {
"description_accurate": true,
"missing_features": [],
"undocumented_features": ["vector_index_optimization"],
"accuracy_score": 0.9,
"issues": [
{
"type": "undocumented_feature",
"severity": "low",
"description": "Implementation includes vector optimization not mentioned in manifest",
"suggestion": "Add 'optimizes_vector_queries' to effects"
}
]
},
"preconditions": {
"preconditions_validated": [
{
"check": "file_exists('package.json')",
"enforced": true,
"location": "validateProject:12",
"error_handling": "good"
},
{
"check": "env_var_set('OPENAI_API_KEY')",
"enforced": true,
"location": "setupEmbeddings:45",
"error_handling": "good"
}
],
"coverage_score": 0.8
},
"effects": {
"effects_validated": [
{
"effect": "creates_vector_index",
"implemented": true,
"location": "createIndex:120",
"conditional": false,
"confidence": 0.95
},
{
"effect": "adds_embedding_pipeline",
"implemented": true,
"location": "setupPipeline:85",
"conditional": false,
"confidence": 0.9
}
],
"missing_effects": [],
"extra_effects": ["optimizes_vector_queries"],
"coverage_score": 0.85
}
},
"issues": [
{
"type": "undocumented_feature",
"severity": "low",
"description": "Implementation includes vector optimization not mentioned in manifest",
"suggestion": "Add 'optimizes_vector_queries' to effects"
}
],
"issue_count": 1,
"passed": true
}Integration
With manifest-generator
Validates that generated manifests are accurate by comparing with implementation.
With capability-graph-builder
Ensures graph relationships are based on accurate capability descriptions.
CI/CD Pipeline
# .github/workflows/validate-skills.yml
name: Validate Skills
on: [push, pull_request]
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Validate all skills
run: |
for skill in SKILLS/*/; do
bash SKILLS/skill-validator/validate.sh "$skill"
doneSuccess Metrics
- ✅ All skills score >= 0.8
- ✅ No high severity issues in production skills
- ✅ 100% of preconditions enforced
- ✅ 95%+ of effects implemented
- ✅ API surface matches manifest
Related Skills
- manifest-generator: Generates manifests to be validated
- capability-graph-builder: Uses validated manifests
- system-diagnostician: Uses validation results for health checks
name: skill-validator
kind: skill
description: Validates that a skill or MCP implementation matches its manifest by running Codex-powered semantic comparisons across descriptions, preconditions, effects, and API surface.
inputs_schema:
type: object
properties:
resource_path:
type: string
description: Absolute or relative path to the skill/MCP directory to validate.
manifest_path:
type: string
description: Optional override path to manifest.yaml; defaults to resource_path/manifest.yaml.
implementation_path:
type: string
description: Optional override path to the implementation entrypoint; defaults to index.js or index.ts within the resource path.
strict_mode:
type: boolean
description: When true, treat warnings as failures and exit non-zero.
required:
- resource_path
preconditions:
- check: command_available('codex')
description: Codex CLI must be installed and accessible on PATH to perform semantic analysis.
required: true
- check: runtime_available('python3')
description: Python 3 runtime must be available for JSON aggregation and manifest parsing.
required: true
- check: file_exists(manifest_path)
description: Target manifest file must exist at the provided or default path.
required: true
- check: writable_directory('/tmp')
description: Temporary directory access is needed to write intermediate validation artifacts.
required: true
- check: file_exists(implementation_path)
description: Implementation entrypoint should exist when validating code-backed skills; declarative-only skills may skip this.
required: false
effects:
- creates_description_validation_json
- creates_precondition_validation_json
- creates_effect_validation_json
- creates_validation_report_json
- creates_api_surface_validation_json
domains:
- testing
- qa
- governance
cost: medium
latency: slow
risk_level: low
side_effects:
- makes_api_calls
- writes_temp_files
idempotent: true
success_signal: /tmp/validation-report.json exists and reports overall_score >= 0 with validation status output.
failure_signals:
- Manifest not found at provided path
- Codex execution failed
- Status: ❌ FAILED
compatibility:
composes_with:
- manifest-generator
- capability-graph-builder
enables:
- system-diagnostician
observability:
logs:
- Validation Score:*
- Issues Found:*
- Status:*
metrics:
- validation.overall_score
- validation.issue_count
metadata:
version: 0.1.0
tags:
- codex
- validation
- quality
examples:
- Validate updated skill manifests before release to ensure descriptions match implementations.
#!/bin/bash
# Validate skill/MCP implementation matches manifest
set -e
# Parse arguments
RESOURCE_PATH="$1"
STRICT_MODE="${2:-false}"
if [ -z "$RESOURCE_PATH" ]; then
echo "Usage: $0 <resource-path> [strict]"
echo "Example: $0 SKILLS/rag-implementer"
exit 1
fi
RESOURCE_NAME=$(basename "$RESOURCE_PATH")
MANIFEST_PATH="$RESOURCE_PATH/manifest.yaml"
echo "Validating: $RESOURCE_NAME"
echo ""
# Check if manifest exists
if [ ! -f "$MANIFEST_PATH" ]; then
echo "❌ No manifest found at: $MANIFEST_PATH"
echo "Run: bash SKILLS/manifest-generator/generate-manifest.sh --path $RESOURCE_PATH"
exit 1
fi
# Find implementation file
IMPL_PATH=""
if [ -f "$RESOURCE_PATH/index.js" ]; then
IMPL_PATH="$RESOURCE_PATH/index.js"
elif [ -f "$RESOURCE_PATH/index.ts" ]; then
IMPL_PATH="$RESOURCE_PATH/index.ts"
elif [ -f "$RESOURCE_PATH/SKILL.md" ]; then
IMPL_PATH="$RESOURCE_PATH/SKILL.md"
elif [ -f "$RESOURCE_PATH/README.md" ]; then
IMPL_PATH="$RESOURCE_PATH/README.md"
fi
if [ -z "$IMPL_PATH" ]; then
echo "⚠️ No implementation file found, validating description only"
else
echo "Implementation: $IMPL_PATH"
fi
echo ""
cd "$(dirname "$0")/../.."
# Step 1: Validate description
echo "[1/4] Validating description accuracy..."
MANIFEST=$(cat "$MANIFEST_PATH")
IMPLEMENTATION=""
if [ -n "$IMPL_PATH" ]; then
IMPLEMENTATION=$(cat "$IMPL_PATH")
fi
codex exec "
Compare this manifest description with the actual implementation:
MANIFEST:
$MANIFEST
IMPLEMENTATION:
$IMPLEMENTATION
Questions:
1. Does the implementation match the description?
2. Are there features described but not implemented?
3. Are there features implemented but not described?
4. Is the description accurate and complete?
Output JSON:
{
\"description_accurate\": boolean,
\"missing_features\": [\"feature1\"],
\"undocumented_features\": [\"feature2\"],
\"accuracy_score\": 0.85,
\"issues\": [
{
\"type\": \"missing_feature\",
\"severity\": \"high|medium|low\",
\"description\": \"...\",
\"suggestion\": \"...\"
}
]
}
Output ONLY valid JSON.
" > /tmp/validation-description.json
# Step 2: Validate preconditions
echo "[2/4] Validating preconditions enforcement..."
PRECONDITIONS=$(python3 -c "
import yaml, json, sys
try:
manifest = yaml.safe_load(open('$MANIFEST_PATH'))
print(json.dumps(manifest.get('preconditions', []), indent=2))
except:
print('[]')
")
if [ "$PRECONDITIONS" != "[]" ]; then
codex exec "
Analyze if these preconditions are actually checked in the code:
PRECONDITIONS:
$PRECONDITIONS
IMPLEMENTATION:
$IMPLEMENTATION
For each precondition, determine:
1. Is it checked in the code?
2. Where is it checked?
3. Does it fail gracefully if not met?
4. Is the error message clear?
Output JSON:
{
\"preconditions_validated\": [
{
\"check\": \"file_exists('package.json')\",
\"enforced\": true,
\"location\": \"function:line\",
\"error_handling\": \"good|fair|poor|missing\",
\"suggestion\": \"...\"
}
],
\"coverage_score\": 0.80
}
Output ONLY valid JSON.
" > /tmp/validation-preconditions.json
else
echo '{"preconditions_validated": [], "coverage_score": 1.0}' > /tmp/validation-preconditions.json
fi
# Step 3: Validate effects
echo "[3/4] Validating effects implementation..."
EFFECTS=$(python3 -c "
import yaml, json, sys
try:
manifest = yaml.safe_load(open('$MANIFEST_PATH'))
print(json.dumps(manifest.get('effects', []), indent=2))
except:
print('[]')
")
if [ "$EFFECTS" != "[]" ]; then
codex exec "
Verify that this code actually produces the claimed effects:
CLAIMED EFFECTS:
$EFFECTS
IMPLEMENTATION:
$IMPLEMENTATION
For each effect, determine:
1. Is the effect actually produced?
2. Where in the code does it happen?
3. Are there conditions where it might not happen?
Output JSON:
{
\"effects_validated\": [
{
\"effect\": \"creates_vector_index\",
\"implemented\": true,
\"location\": \"function:line\",
\"conditional\": false,
\"confidence\": 0.95
}
],
\"missing_effects\": [],
\"extra_effects\": [],
\"coverage_score\": 0.85
}
Output ONLY valid JSON.
" > /tmp/validation-effects.json
else
echo '{"effects_validated": [], "missing_effects": [], "extra_effects": [], "coverage_score": 1.0}' > /tmp/validation-effects.json
fi
# Step 4: Generate report
echo "[4/4] Generating validation report..."
python3 <<PYTHON_SCRIPT
import json
from datetime import datetime
# Load validation results
with open('/tmp/validation-description.json') as f:
desc_validation = json.load(f)
with open('/tmp/validation-preconditions.json') as f:
precond_validation = json.load(f)
with open('/tmp/validation-effects.json') as f:
effects_validation = json.load(f)
# Calculate overall score
scores = [
desc_validation.get('accuracy_score', 0),
precond_validation.get('coverage_score', 0),
effects_validation.get('coverage_score', 0)
]
overall_score = sum(scores) / len(scores) if scores else 0
# Collect all issues
all_issues = []
all_issues.extend(desc_validation.get('issues', []))
for precond in precond_validation.get('preconditions_validated', []):
if not precond.get('enforced'):
all_issues.append({
'type': 'unenforced_precondition',
'severity': 'medium',
'description': f"Precondition not enforced: {precond['check']}",
'suggestion': precond.get('suggestion', 'Add validation for this precondition')
})
for effect in effects_validation.get('effects_validated', []):
if not effect.get('implemented'):
all_issues.append({
'type': 'unimplemented_effect',
'severity': 'high',
'description': f"Effect not implemented: {effect['effect']}",
'suggestion': 'Implement this effect or remove from manifest'
})
# Count by severity
high_issues = len([i for i in all_issues if i['severity'] == 'high'])
medium_issues = len([i for i in all_issues if i['severity'] == 'medium'])
low_issues = len([i for i in all_issues if i['severity'] == 'low'])
# Determine pass/fail
passed = overall_score >= 0.8 and high_issues == 0
# Generate report
report = {
'resource': '$RESOURCE_NAME',
'validated_at': datetime.utcnow().isoformat() + 'Z',
'overall_score': round(overall_score, 3),
'scores': {
'description_accuracy': round(desc_validation.get('accuracy_score', 0), 3),
'precondition_coverage': round(precond_validation.get('coverage_score', 0), 3),
'effect_coverage': round(effects_validation.get('coverage_score', 0), 3)
},
'validation_results': {
'description': desc_validation,
'preconditions': precond_validation,
'effects': effects_validation
},
'issues': all_issues,
'issue_count': len(all_issues),
'issue_breakdown': {
'high': high_issues,
'medium': medium_issues,
'low': low_issues
},
'passed': passed
}
with open('/tmp/validation-report.json', 'w') as f:
json.dump(report, f, indent=2)
# Print summary
print("")
print("━" * 50)
print("VALIDATION REPORT")
print("━" * 50)
print(f"\nResource: {report['resource']}")
print(f"Overall Score: {overall_score:.2f}")
print(f"\nComponent Scores:")
print(f" Description Accuracy: {desc_validation.get('accuracy_score', 0):.2f}")
print(f" Precondition Coverage: {precond_validation.get('coverage_score', 0):.2f}")
print(f" Effect Coverage: {effects_validation.get('coverage_score', 0):.2f}")
print(f"\nIssues Found: {len(all_issues)}")
if high_issues > 0:
print(f" ❌ High: {high_issues}")
if medium_issues > 0:
print(f" ⚠️ Medium: {medium_issues}")
if low_issues > 0:
print(f" ℹ️ Low: {low_issues}")
if len(all_issues) > 0:
print("\nIssue Details:")
for issue in all_issues:
severity_icon = {"high": "❌", "medium": "⚠️", "low": "ℹ️"}.get(issue['severity'], "•")
print(f"\n {severity_icon} [{issue['severity'].upper()}] {issue['type']}")
print(f" {issue['description']}")
if issue.get('suggestion'):
print(f" → {issue['suggestion']}")
print("\n" + "━" * 50)
if passed:
print("✅ VALIDATION PASSED")
else:
print("❌ VALIDATION FAILED")
print("━" * 50)
print(f"\nReport saved: /tmp/validation-report.json")
print("")
# Exit with appropriate code
import sys
sys.exit(0 if passed or '$STRICT_MODE' != 'true' else 1)
PYTHON_SCRIPT
# Cleanup temporary files
rm -f /tmp/validation-description.json /tmp/validation-preconditions.json /tmp/validation-effects.json