dbt-agent-skills / evals
AGENTS.md730 starsChanged 9 months agoApache-2.0View on GitHub
This document covers conventions and patterns for working on the skill-eval CLI tool. Data flow: cli.py loads scenarios via models.py, executes via runner.py, grades via grader.py, and reports via reporter.py. We use Typer for the CLI. Use the appropriate output method based on context: User-facing CLI output (command results, prompts): Use typer.echo() Progress logging (during execution): Use logger from logging.py Never use print() for output. New commands go in cli.py: When modifying CLI commands that work with scenarios or skill…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository3 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- evals/CLAUDE.mdCLAUDE.md
- auditing-skillsSkill
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
26 rules. About 0 are common, 7 are distinctive, and 19 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
19
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 26
Use the appropriate output method based on context:
- Very specific: line 48
Never use print() for output.
- Distinctive: line 68
When modifying CLI commands that work with scenarios or skill sets, check if the underlying dataclasses need updates:
- Very specific: line 79
Use dataclasses.asdict() to convert dataclasses to dicts for YAML serialization.
- Very specific: line 82
Update Grade dataclass in models.py if adding new fields
- Very specific: line 83
Update GRADING_PROMPT_TEMPLATE in grader.py if changing what Claude evaluates
- Very specific: line 84
Update parse_grade_response() to extract new fields into Grade
- Very specific: line 85
Update reporter.py to display new fields
- Very specific: line 91
Add command function in cli.py with @app.command()
- Very specific: line 92
Use typer.echo() for all output
- Very specific: line 93
Add tests in tests/
- Distinctive: line 94
Update README.md usage section
- Very specific: line 99
Update SkillSet dataclass in models.py
- Very specific: line 100
Update load_scenario() to parse the new field
- Very specific: line 101
Update Runner.run_scenario() if it affects execution
- Distinctive: line 102
Add tests for the new field
- Very specific: line 107
Update _parse_json_output() to extract new data from Claude's output
- Very specific: line 108
Update metadata.yaml writing in run_scenario()
- Distinctive: line 109
Update grader if it should evaluate the new field
- Distinctive: line 110
Update reporter if it should display the new field
- Very specific: line 115
Update GRADING_PROMPT_TEMPLATE in grader.py
- Very specific: line 116
Update parse_grade_response() to handle new fields
- Very specific: line 117
Update init_grades_file() for manual grading template
- Very specific: line 118
Update reporter.py to show new fields in reports
- Distinctive: line 138
Run the ty type checker before committing:
- Very specific: line 147
Use list[str] not List[str] (Python 3.11+)
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Skill Evaluation Tool - Developer Guide
This document covers conventions and patterns for working on the skill-eval CLI tool.
Architecture Overview
src/skill_eval/
├── cli.py # Typer CLI commands (run, grade, report, review)
├── models.py # Data models: Scenario, SkillSet, load_scenario()
├── runner.py # Execution: Runner class, RunResult, RunTask
├── grader.py # Auto-grading with Claude CLI
├── reporter.py # Report generation from grades
├── selector.py # Interactive TUI selectors for runs/scenarios
└── logging.py # Loguru configuration with context supportData flow: cli.py loads scenarios via models.py, executes via runner.py, grades via grader.py, and reports via reporter.py.
CLI Framework: Typer
We use Typer for the CLI.
Output
Use the appropriate output method based on context:
User-facing CLI output (command results, prompts): Use typer.echo()
typer.echo(f"Run directory: {run_dir}")
typer.echo("Error: file not found", err=True)Progress logging (during execution): Use logger from logging.py
from skill_eval.logging import logger
logger.info("Starting scenario")
logger.debug("Tool called: Read")
logger.warning("Timeout reached")
logger.success("Completed")
# With context (for parallel runs)
ctx_logger = logger.bind(scenario="my-scenario", skill_set="with-skill")
ctx_logger.info("Starting") # Shows: [T0/my-scenario/with-skill] StartingNever use print() for output.
Adding Commands
New commands go in cli.py:
@app.command()
def mycommand(
arg: str = typer.Argument(..., help="Required argument"),
flag: bool = typer.Option(False, "--flag", "-f", help="Optional flag"),
) -> None:
"""Command description shown in --help."""
typer.echo(f"Running with {arg}")Data Models
Dataclasses (models.py, runner.py)
When modifying CLI commands that work with scenarios or skill sets, check if the underlying dataclasses need updates:
In models.py:
Grade- grading result (success, score, tool_usage, notes, etc.)SkillSet- skills, mcp_servers, allowed_toolsScenario- name, path, prompt, skill_sets, description
In runner.py:
RunResult- scenario results with output, success, tools_used, skills_invoked, etc.RunTask- task definition for parallel execution (scenario, skill_set, run_dir)
Use dataclasses.asdict() to convert dataclasses to dicts for YAML serialization.
When modifying grading:
- Update
Gradedataclass inmodels.pyif adding new fields - Update
GRADING_PROMPT_TEMPLATEingrader.pyif changing what Claude evaluates - Update
parse_grade_response()to extract new fields into Grade - Update
reporter.pyto display new fields
Modifying Features - Checklist
Adding a new CLI subcommand
- Add command function in
cli.pywith@app.command() - Use
typer.echo()for all output - Add tests in
tests/ - Update
README.mdusage section - Run
uv run ty check src/
Adding a new field to skill-sets.yaml
- Update
SkillSetdataclass inmodels.py - Update
load_scenario()to parse the new field - Update
Runner.run_scenario()if it affects execution - Add tests for the new field
Adding new run output/metadata fields
- Update
RunResultdataclass inrunner.py - Update
_parse_json_output()to extract new data from Claude's output - Update metadata.yaml writing in
run_scenario() - Update grader if it should evaluate the new field
- Update reporter if it should display the new field
- Add tests
Modifying grading criteria
- Update
GRADING_PROMPT_TEMPLATEingrader.py - Update
parse_grade_response()to handle new fields - Update
init_grades_file()for manual grading template - Update
reporter.pyto show new fields in reports - Add tests
Parallel Execution
We use concurrent.futures.ThreadPoolExecutor for parallel runs:
from concurrent.futures import ThreadPoolExecutor, as_completed
with ThreadPoolExecutor(max_workers=max_workers) as executor:
future_to_task = {executor.submit(fn, task): task for task in tasks}
for future in as_completed(future_to_task):
result = future.result()See Runner.run_parallel() in runner.py for the full implementation.
Type Checking with ty
Run the ty type checker before committing:
uv run ty check src/Fix any type errors. Common issues:
- Mixed dict types need explicit annotations
- Optional fields need
| Nonetypes - Use
list[str]notList[str](Python 3.11+)
Testing
Tests live in tests/ and use pytest.
Running Tests
uv run pytest # all tests
uv run pytest tests/test_cli.py # specific file
uv run pytest -k "test_grade" # by name patternTest Requirements
Every new feature needs tests. This includes:
- New CLI commands
- New options/flags on existing commands
- Changes to data models
- New grading/reporting logic
Dependencies
Key dependencies in pyproject.toml:
typer- CLI frameworkpyyaml- YAML parsingclaude-code-transcripts- HTML transcript generationloguru- Logging with context supporttextual- TUI for interactive selection
Dev dependencies:
pytest- testingty- type checking
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

