Explains code snippets in plain English, breaking down what the code does step by step. Perfect for learning, code reviews, or documentation.
Example eval suite for the "code-explainer" skill that explains code snippets to users.
See SKILL.md for the full skill definition. This skill:
This example demonstrates the full waza workflow:
cat examples/code-explainer/SKILL.md
# Generate eval from SKILL.md
waza generate examples/code-explainer/SKILL.md -o ./my-code-explainer-eval
# Or with LLM assistance for better tasks
waza generate examples/code-explainer/SKILL.md -o ./my-code-explainer-eval --assist
# Quick test with mock executor
waza run examples/code-explainer/eval.yaml \
--executor mock \
--context-dir examples/code-explainer/fixtures \
-v
# Full test with Copilot SDK
waza run examples/code-explainer/eval.yaml \
--executor copilot-sdk \
--context-dir examples/code-explainer/fixtures \
-v
code-explainer/
├── SKILL.md # ⭐ Skill definition (source of truth)
├── eval.yaml # Main eval configuration
├── fixtures/ # Code files to explain
│ ├── factorial.py # Python recursion example
│ ├── fetch_user.js # JavaScript async example
│ ├── squares.py # Python list comprehension
│ └── user_orders.sql # SQL JOIN example
├── tasks/ # Individual test tasks
│ ├── explain-python-recursion.yaml
│ ├── explain-js-async.yaml
│ ├── explain-list-comprehension.yaml
│ └── explain-sql-join.yaml
├── graders/
│ └── explanation_quality.py # Custom grader for explanation quality
└── trigger_tests.yaml # Trigger accuracy tests
This eval tests a code explanation skill across:
| Dimension | Coverage | |-----------|----------| | Languages | Python, JavaScript, SQL | | Concepts | Recursion, async/await, list comprehensions, JOINs | | Complexity | Beginner to intermediate |
| Metric | Weight | Threshold | What It Measures |
|--------|--------|-----------|------------------|
| task_completion | 40% | 80% | Did the skill complete the explanation? |
| trigger_accuracy | 30% | 90% | Does it trigger on appropriate prompts? |
| behavior_quality | 30% | 70% | Tool usage, response time within limits? |
Evaluates explanations on 5 criteria (20 points each):
Pass threshold: 60%
Create tasks/explain-new-concept.yaml:
id: explain-new-concept-001
name: Explain New Concept
description: Test explaining X concept
tags:
- language
- concept
inputs:
prompt: |
Explain this code:
```python
# Your code here
```
context:
language: python
complexity: beginner
concept: your-concept
expected:
output_contains:
- "keyword1"
outcomes:
- type: task_completed
graders:
- name: explains_concept
type: code
config:
assertions:
- "len(output) > 10"
Edit trigger_tests.yaml to add prompts that should or shouldn't trigger the skill.
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer