From epieczko-betty
Validates artifact type names against the Betty Framework registry and returns complete metadata for each type. Provides intelligent fuzzy matching and suggestions for invalid types.
npx claudepluginhub joshuarweaver/cascade-code-general-misc-1 --plugin epieczko-bettyThis skill uses the workspace's default tool permissions.
Validates artifact type names against the Betty Framework registry and returns complete metadata for each type. Provides intelligent fuzzy matching and suggestions for invalid types.
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Guides building MCP servers enabling LLMs to interact with external services via tools. Covers best practices, TypeScript/Node (MCP SDK), Python (FastMCP).
Generates original PNG/PDF visual art via design philosophy manifestos for posters, graphics, and static designs on user request.
Validates artifact type names against the Betty Framework registry and returns complete metadata for each type. Provides intelligent fuzzy matching and suggestions for invalid types.
Version: 0.1.0 Status: active
This skill is critical for ensuring skills reference valid artifact types before creation. It validates artifact type names against registry/artifact_types.json, retrieves complete metadata (file_pattern, content_type, schema), and suggests alternatives for invalid types using three fuzzy matching strategies:
This skill is specifically designed to be called by meta.skill during Step 2 (Validate Artifact Types) of the skill creation workflow.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
artifact_types | array | Yes | - | List of artifact type names to validate |
check_schemas | boolean | No | true | Whether to verify schema files exist on filesystem |
suggest_alternatives | boolean | No | true | Whether to suggest similar types for invalid ones |
max_suggestions | number | No | 3 | Maximum number of suggestions per invalid type |
| Output | Type | Description |
|---|---|---|
validation_results | object | Validation results for each artifact type with complete metadata |
all_valid | boolean | Whether all artifact types are valid |
invalid_types | array | List of artifact types that don't exist in registry |
suggestions | object | Suggested alternatives for each invalid type |
warnings | array | List of warnings (e.g., schema file missing) |
*.validation.json) - Validation results with metadata and suggestionsNone - reads directly from registry files
python artifact_validate_types.py \
--artifact_types '["threat-model"]' \
--check_schemas true
Output:
{
"validation_results": {
"threat-model": {
"valid": true,
"file_pattern": "*.threat-model.yaml",
"content_type": "application/yaml",
"schema": "schemas/artifacts/threat-model-schema.json",
"description": "Threat model (STRIDE, attack trees)..."
}
},
"all_valid": true,
"invalid_types": [],
"suggestions": {},
"warnings": []
}
python artifact_validate_types.py \
--artifact_types '["data-flow-diagram", "threat-model"]' \
--suggest_alternatives true
Output:
{
"validation_results": {
"data-flow-diagram": {
"valid": false
},
"threat-model": {
"valid": true,
"file_pattern": "*.threat-model.yaml",
"content_type": "application/yaml",
"schema": "schemas/artifacts/threat-model-schema.json"
}
},
"all_valid": false,
"invalid_types": ["data-flow-diagram"],
"suggestions": {
"data-flow-diagram": [
{
"type": "data-flow-diagrams",
"reason": "Plural form",
"confidence": "high"
},
{
"type": "dataflow-diagram",
"reason": "Similar spelling",
"confidence": "low"
}
]
},
"warnings": [],
"ok": false,
"status": "validation_failed"
}
python artifact_validate_types.py \
--artifact_types '["data-model", "api-spec", "test-result"]' \
--max_suggestions 3
Output:
{
"all_valid": false,
"invalid_types": ["data-model", "api-spec"],
"suggestions": {
"data-model": [
{
"type": "logical-data-model",
"reason": "Specific variant of model",
"confidence": "medium"
},
{
"type": "physical-data-model",
"reason": "Specific variant of model",
"confidence": "medium"
},
{
"type": "enterprise-data-model",
"reason": "Specific variant of model",
"confidence": "medium"
}
],
"api-spec": [
{
"type": "openapi-spec",
"reason": "Specific variant of spec",
"confidence": "medium"
},
{
"type": "asyncapi-spec",
"reason": "Specific variant of spec",
"confidence": "medium"
}
]
},
"validation_results": {
"test-result": {
"valid": true,
"file_pattern": "*.test-result.json",
"content_type": "application/json"
}
}
}
python artifact_validate_types.py \
--artifact_types '["threat-model", "architecture-overview"]' \
--output validation-results.validation.json
Creates validation-results.validation.json with complete validation report.
The meta.skill agent calls this skill in Step 2 of its workflow:
# meta.skill workflow Step 2
2. **Validate Artifact Types**
- Extract artifact types from skill description
- Call artifact.validate.types with all types
- If all_valid == false:
→ Display suggestions to user
→ Ask user to confirm correct types
→ HALT until types are validated
- Store validated metadata for use in skill.yaml generation
Example Integration:
# meta.skill calls artifact.validate.types
result = subprocess.run([
'python', 'skills/artifact.validate.types/artifact_validate_types.py',
'--artifact_types', json.dumps(["threat-model", "data-flow-diagrams"]),
'--suggest_alternatives', 'true'
], capture_output=True, text=True)
validation = json.loads(result.stdout)
if not validation['all_valid']:
print(f"❌ Invalid artifact types: {validation['invalid_types']}")
for invalid_type, suggestions in validation['suggestions'].items():
print(f"\n Suggestions for '{invalid_type}':")
for s in suggestions:
print(f" - {s['type']} ({s['confidence']} confidence): {s['reason']}")
# HALT skill creation
else:
print("✅ All artifact types validated")
# Continue with skill.yaml generation using validated metadata
Detects when a user forgets the "s":
| Invalid Type | Suggested Type | Reason |
|---|---|---|
data-flow-diagram | data-flow-diagrams | Plural form |
threat-models | threat-model | Singular form |
Suggests specific variants when a generic term is used:
| Invalid Type | Suggested Types |
|---|---|
data-model | logical-data-model, physical-data-model, enterprise-data-model |
api-spec | openapi-spec, asyncapi-spec, graphql-spec |
architecture-diagram | system-architecture-diagram, component-architecture-diagram |
Catches typos and misspellings (60%+ similarity):
| Invalid Type | Suggested Type | Similarity |
|---|---|---|
thret-model | threat-model | ~90% |
architecure-overview | architecture-overview | ~85% |
api-specfication | api-specification | ~92% |
{
"ok": false,
"status": "error",
"error": "Artifact registry not found: registry/artifact_types.json"
}
Resolution: Ensure you're running from the Betty Framework root directory.
{
"ok": false,
"status": "error",
"error": "Invalid JSON: Expecting ',' delimiter: line 1 column 15 (char 14)"
}
Resolution: Ensure artifact_types is a valid JSON array with proper quoting.
{
"ok": false,
"status": "error",
"error": "Invalid JSON in registry file: ..."
}
Resolution: Validate and fix registry/artifact_types.json syntax.
Memory usage is minimal as registry is loaded once and indexed by name for O(1) lookups.
Run the test suite:
cd skills/artifact.validate.types
python test_artifact_validate_types.py
Test Coverage:
registry/artifact_types.jsonjq to search registry:
jq '.artifact_types[] | select(.name | contains("your-search"))' registry/artifact_types.json
max_suggestions to see more optionsThis is normal if schema files haven't been created yet. Schema files are optional for many artifact types. Set check_schemas=false to suppress these warnings.