General

validate-output - Claude MCP Skill

/validate-output - Validate Generated Skills, Prompts, Agents, or Hooks

SEO Guide: Enhance your AI agent with the validate-output tool. This Model Context Protocol (MCP) server allows Claude Desktop and other LLMs to /validate-output - validate generated skills, prompts, agents, or hooks... Download and configure this skill to unlock new capabilities for your AI workflow.

🌟66 stars • 114 forks
šŸ“„0 downloads

Documentation

SKILL.md
# /validate-output - Validate Generated Skills, Prompts, Agents, or Hooks

**Check that your generated output is properly formatted and ready to use.**

---

## Usage

```
/validate-output skill [path]
/validate-output prompt
/validate-agent [path]
/validate-output hook [path]
```

---

## What This Command Does

Validates generated output and creates distribution files:
- āœ… YAML frontmatter is correct
- āœ… Naming conventions followed (kebab-case)
- āœ… Required files present
- āœ… Format is proper
- āœ… Quality standards met
- āœ… **Creates ZIP file** (if validation passes for skills)

---

## Validate a Skill

```
/validate-output skill generated-skills/my-skill
```

**Checks**:

1. **YAML Frontmatter**:
```yaml
---
name: skill-name-kebab-case  āœ… Check format
description: One-line description  āœ… Check present
---
```

2. **Naming**:
- āœ… Skill name is kebab-case (not Title Case, snake_case, camelCase)
- āœ… Folder name matches skill name
- āœ… Python files are snake_case (if present)

3. **Required Files**:
- āœ… SKILL.md exists
- āœ… HOW_TO_USE.md exists (or usage instructions in SKILL.md)
- āœ… Python files (if skill needs code)
- āœ… sample_input.json and expected_output.json (if applicable)

4. **Quality**:
- āœ… SKILL.md has clear capabilities section
- āœ… Input/output formats documented
- āœ… Examples provided
- āœ… No placeholder text

**Output**:
```
Validating: generated-skills/my-skill/

āœ… YAML Frontmatter: Valid
āœ… Skill Name: my-skill (kebab-case āœ“)
āœ… Required Files: All present
   - SKILL.md āœ“
   - HOW_TO_USE.md āœ“
   - calculator.py āœ“
   - sample_input.json āœ“
āœ… Quality: Documentation complete

šŸŽ‰ Skill validation PASSED!

Creating ZIP file for Claude Desktop...

cd generated-skills && zip -r my-skill.zip my-skill/ -x "*.pyc" "*__pycache__*" "*.DS_Store"

āœ… ZIP created: generated-skills/my-skill.zip (35KB)

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

šŸ“¦ Ready to use!

**For Claude Desktop** (Easiest):
Drag and drop: generated-skills/my-skill.zip

**For Claude Code**:
/install-skill generated-skills/my-skill

Next steps:
1. Import ZIP to Claude Desktop OR install to Claude Code
2. /test-factory my-skill
```

**If Issues Found**:
```
Validating: generated-skills/bad-skill/

āŒ YAML Frontmatter: Invalid
   Issue: Name is "Bad Skill" (Title Case)
   Fix: Change to "bad-skill" (kebab-case)

āŒ Required Files: Missing
   Issue: HOW_TO_USE.md not found
   Fix: Add usage documentation

āš ļø Quality: Incomplete
   Issue: No examples in SKILL.md
   Recommendation: Add 2-3 usage examples

Validation FAILED. Fix issues and run /validate-output again.
```

---

## Validate a Prompt

```
/validate-output prompt
```

**Checks**:

1. **Format Structure**:
- āœ… XML: Has `<mega_prompt>` tags, properly nested
- āœ… Claude: Has clear sections (Role, Mission, Workflow, etc.)
- āœ… ChatGPT: Has both required sections
- āœ… Gemini: Has role configuration

2. **Completeness**:
- āœ… No placeholder text ([TODO], [FILL IN], etc.)
- āœ… All sections have content
- āœ… Examples included (at least 2)

3. **Quality** (from prompt-factory's 7-point validation):
- āœ… Token count reasonable (3-6K Core, 8-12K Advanced)
- āœ… Actionable workflow present
- āœ… Best practices mentioned
- āœ… Clear role and mission

**Output**:
```
Validating generated prompt...

āœ… Format: XML (properly structured)
āœ… Completeness: No placeholders
āœ… Examples: 3 examples found
āœ… Token Count: ~5,200 tokens (Core mode, optimal)
āœ… Quality: 7/7 gates passed

šŸŽ‰ Prompt validation PASSED! Ready to use.

How to use:
1. Copy the <mega_prompt> block
2. Paste into Claude/ChatGPT/Gemini
3. Start using your customized AI!
```

---

## Validate an Agent

```
/validate-agent .claude/agents/my-agent
```

**Checks**:

1. **YAML Frontmatter**:
```yaml
---
name: agent-name-kebab-case  āœ…
description: When to invoke...  āœ…
tools: Read, Write, Edit  āœ… Comma-separated string
model: sonnet  āœ… Valid value
color: green  āœ… Valid color
field: frontend  āœ… Domain
expertise: expert  āœ… Level
---
```

2. **Naming**:
- āœ… Agent name is kebab-case
- āœ… File name matches agent name
- āœ… No special characters

3. **Tools Format**:
- āœ… Comma-separated string (not array)
- āœ… Valid tool names
- āœ… Appropriate for agent type

4. **Description Quality**:
- āœ… Describes WHEN to invoke (not just what it does)
- āœ… Specific enough for auto-discovery
- āœ… Clear and actionable

**Output**:
```
Validating: .claude/agents/my-agent.md

āœ… YAML Frontmatter: Valid
āœ… Agent Name: my-agent (kebab-case āœ“)
āœ… Tools: "Read, Write, Edit" (proper format āœ“)
āœ… Model: sonnet (valid āœ“)
āœ… Color: green (valid āœ“)
āœ… Description: Specific and clear āœ“

šŸŽ‰ Agent validation PASSED! Ready to use.

The agent will auto-invoke when:
[Description from agent]

Or invoke manually:
"Use the my-agent agent to [task]"
```

---

## Validate a Hook

```
/validate-output hook generated-hooks/my-hook
```

**Checks**:

1. **JSON Structure**:
```json
{
  "matcher": { ... },  āœ… Valid object
  "hooks": [ ... ]     āœ… Non-empty array
}
```

2. **Safety Patterns**:
- āœ… Tool detection present (`command -v tool`)
- āœ… Silent failure mode (`|| exit 0`)
- āœ… No destructive operations (no `rm -rf`, `git push --force`)
- āœ… File path validation (quoted paths, no `..`)

3. **Event Type Validation**:
- āœ… Appropriate timeout for event type
- āœ… Matcher appropriate for event (empty for SessionStart, SubagentStop)
- āœ… Command complexity matches event timing

4. **Hook Commands**:
- āœ… No path traversal attempts
- āœ… External tools have detection wrappers
- āœ… Error handling present
- āœ… Commands are safe (no dangerous patterns)

**Output**:
```
Validating: generated-hooks/my-hook/hook.json

āœ… JSON Structure: Valid
   - matcher object: āœ“
   - hooks array: 1 command āœ“
āœ… Safety Patterns: All present
   - Tool detection: āœ“
   - Silent failure: āœ“
   - No destructive ops: āœ“
   - Path safety: āœ“
āœ… Event Type: PostToolUse
   - Timeout: 60s (appropriate āœ“)
   - Matcher: tool_names + paths āœ“
āœ… Security: PASSED
   - No path traversal āœ“
   - Proper quoting āœ“
   - Error handling āœ“

šŸŽ‰ Hook validation PASSED!

Security Score: 5/5
━━━━━━━━━━━━━━━━━━━━
āœ… Tool detection present
āœ… Silent failure mode
āœ… No destructive operations
āœ… Path safety validated
āœ… Error handling complete

Next steps:
1. /install-hook generated-hooks/my-hook
2. Restart Claude Code
3. Test by triggering the hook event
```

**Validation using hook-factory validator**:
```bash
python3 generated-skills/hook-factory/validator.py generated-hooks/my-hook/hook.json
```

**If Issues Found**:
```
Validating: generated-hooks/bad-hook/hook.json

āŒ JSON Structure: Invalid
   Issue: "matcher" is string, should be object
   Fix: Change to {"tool_names": ["Write"]}

āŒ Safety Patterns: Missing
   Issue: No tool detection for "black" command
   Fix: Add "command -v black" check

āŒ Security: FAILED
   Issue: Path traversal detected (..)
   Fix: Remove ".." from file paths

āš ļø Event Type: Mismatched
   Issue: SubagentStop with tool_names matcher
   Fix: SubagentStop should have empty matcher {}

Validation FAILED. Fix issues and run /validate-output again.
```

---

## Quick Validation

**Just ran an agent that generated output?**

```
/validate-output skill
```

Claude will check the most recently generated skill in the conversation.

---

## When to Use

**Use /validate-output**:
- āœ… After generating any skill/prompt/agent/hook
- āœ… Before installing
- āœ… Before sharing with team
- āœ… If something doesn't work as expected
- āœ… To learn proper formatting
- āœ… For hooks: CRITICAL before installation (security check)

**Benefits**:
- Catch formatting errors early
- Learn what makes valid output
- Ensure quality before installation
- Save time debugging

---

## Related Commands

- `/build` - Generate skills/prompts/agents/hooks
- `/install-skill` - Install skills after validation passes
- `/install-hook` - Install hooks after validation passes
- `/test-factory` - Test installed skills/agents
- `/factory-status` - See all validated outputs

---

**Ensure quality before installation!** āœ…

Signals

Avg rating⭐ 0.0
Reviews0
Favorites0

Information

Repository
alirezarezvani/claude-code-skill-factory
Author
alirezarezvani
Last Sync
3/13/2026
Repo Updated
3/13/2026
Created
1/16/2026

Reviews (0)

No reviews yet. Be the first to review this skill!

Related Skills

Related Guides