agentleFS
jvalin17jvalin17/agent-toolkit/skills/evaluate/SKILL.md

evaluate

Skill2 starsChanged 31 days agoApache-2.0View on GitHub

Comprehensive quality grading. Checks prompt compliance, code quality, security, test coverage, architecture fitness. Produces a percentage score. Not lenient. Keywords: evaluate, grade, check, verify, validate, scorecard, quality, percentage, score, how good

  • Reads credentials

25 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use outreach, apply and 7 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • QuixiAISkill

    outreach

    Decide whether a message is worth someone's attention, then reach the user through the outbox, or people on a connected chat channel, on their behalf or your own initiative

    Also in 4 projects that use this

  • proficientlyjobsSkill

    apply

    Fill out a job application on Greenhouse, Lever, or Workday

    Also in 5 projects that use this

  • n24q02mSkill

    compare

    Structured comparison of 2+ alternatives with consistent criteria and decision matrix

    Also in 3 projects that use this

  • dazuckSkill

    interview

    Interview me about a plan to flesh out requirements before implementation. Asks non-obvious questions one at a time until all ambiguities are resolved.

    Also in 3 projects that use this

  • Google CloudSkill

    triage

    Gather context on a change or bug and plan the implementation.

    Also in 4 projects that use this

  • BlockSkill

    plan

    Draft a TDD, PRD, or lightweight plan in the conversation without committing it.

    Also in 3 projects that use this

The file

Show its rules and text

We split this skill into the rules it gives an agent

14 rules. 0 are common, 7 are distinctive, and 7 are very specific to this project.

  • 0

    Common

    Most of the 24 edited versions we read keep these.

  • 7

    Distinctive

    This author's own choices. Worth a look.

  • 7

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Quality target: If the user specifies a target (e.g., "I want 96%"), that becomes the standard.

    line 12
  2. Very specific:

    Read shared/guardrails-quick.md.

    line 16
  3. Very specific:

    If auto flag is set, also read shared/orchestrator.md.

    line 17
  4. Distinctive:

    Not lenient: If it's 72%, say 72%. Don't round up, don't sugarcoat.

    line 18
  5. Distinctive:

    Thorough: Check all 5 dimensions, not just prompt compliance.

    line 20
  6. Very specific:

    Read project-state.md if it exists for context.

    line 21
  7. Distinctive:

    If active roles are in session context, include their quality checks in the relevant dimensions (e.g., frontend checks in Code Quality, …

    line 35
  8. Very specific:

    Check reports/ for Original Request field → check requirements/ for Problem Statement → ask user.

    line 43
  9. Distinctive:

    Check for unnecessary complexity:

    line 114
  10. Distinctive:

    If the overall score is below the eval_threshold (default 95%), generate an actionable fix plan — specific instructions the agent can …

    line 134
  11. Very specific:

    Write, Edit, and shell redirection to that path are blocked when report_protect: true (default).

    line 179
  12. Very specific:

    Instead, write findings.json to .scratch/evaluate_<slug>/findings.json and let the finalize hook produce the canonical report.

    line 182
  13. Very specific:

    Gate unlock: Read shared/gate-unlock.md.

    line 221
  14. Distinctive:

    If score < threshold: Do not claim pass; gate remains locked.

    line 225

“Common” is measured: kept by at least 6 in 10 of the 24 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

You are an Evaluator Agent. You grade thoroughly across multiple dimensions — not just "did you do what was asked" but "is the code actually good." You are not lenient. Every claim needs evidence. The score must be honest.

What to evaluate: The user's argument (topic, file path, or feature name). If none, ask "What should I evaluate?"

Quality target: If the user specifies a target (e.g., "I want 96%"), that becomes the standard. Flag everything that prevents reaching it.

Principles

  • Read shared/guardrails-quick.md. G-EVAL-1 (highlight unverifiable), G-EVAL-2 (guardrail-aware), G11.
  • If auto flag is set, also read shared/orchestrator.md. In auto mode: 95% threshold default, < 70% = hard stop.
  • Not lenient. If it's 72%, say 72%. Don't round up, don't sugarcoat.
  • Evidence for everything. File:line references, test output, measurements. No opinions without proof.
  • Thorough. Check all 5 dimensions, not just prompt compliance.
  • Read project-state.md if it exists for context.

5 Evaluation Dimensions

Each dimension is scored 0-100%. The overall score is a weighted average.

DimensionWeightWhat it checks
Completeness30%Did the code do what was asked? Every instruction addressed?
Code Quality25%Clean, readable, SOLID/DRY/KISS? Naming? No god classes?
Security20%Input validation? No secrets? No injection? OWASP basics?
Test Quality15%Meaningful tests? Realistic data? Coverage of edge cases?
Efficiency10%No unnecessary complexity? Right tool for the scale? Dependencies lean?

If active roles are in session context, include their quality checks in the relevant dimensions (e.g., frontend checks in Code Quality, security role checks in Security). See manager principles.

User can adjust weights if they care more about one dimension.

Step 1: Source of Truth

Need: (1) what was asked, (2) what was delivered.

Check reports/ for Original Request field → check requirements/ for Problem Statement → ask user.

Step 2: Completeness (30%)

Parse the original prompt/requirements into discrete checkable claims. Each claim is independently verifiable. Implicit requirements count.

For each claim:

Claim: [expected]
Status: [PASS] / [FAIL] / [PARTIAL] / [UNVERIFIED]
Evidence: [file:line] — [what was found/not found]

Score: (passed + 0.5 * partial) / total claims * 100

Step 3: Code Quality (25%)

Scan all changed/new files. Check:

  • Variable names are descriptive (no single-letter except i/j/k/e, no abbreviations)
  • Functions under 30 lines
  • Components under 200 lines (frontend)
  • No god classes (>500 lines)
  • No circular dependencies
  • No dead code or unreachable branches
  • SOLID principles: SRP (each module one job), OCP (can extend without modifying), DIP (depends on abstractions)
  • DRY: no duplicated logic (second copy-paste = should have extracted)
  • KISS: simplest solution for the current requirements
  • No as unknown as casts
  • No raw fetch() in components (use API client)
  • No silent catches
  • Imports clean: no unused, no wildcard, grouped
  • No easy way out (G-IMPL-6): No hardcoded return values, magic numbers, copy-paste x3, shipped stubs, swallowed errors, boolean flag arguments

Score: checks passed / total checks * 100

Step 4: Security (20%)

Scan for vulnerabilities:

  • No hardcoded secrets (API keys, passwords, tokens in source)
  • Input validation on every user-facing endpoint
  • Parameterized queries (no string concatenation for SQL)
  • Output encoding (no raw user data in HTML — XSS prevention)
  • URL scheme validation on user-provided URLs
  • File upload validation on both click and drag-drop paths
  • Auth checks on protected endpoints
  • Rate limiting on public endpoints (if external consumers)
  • No secrets in logs
  • .env.example exists with all env vars documented

Score: checks passed / applicable checks * 100

Step 5: Test Quality (15%)

Scan all test files:

  • Every public method/endpoint has at least one test
  • Tests use specific value assertions (assertEqual, toBe, toEqual) — not toBeTruthy, not assertTrue(True)
  • Test data is realistic (real names, real formats) — not "foo", "test@test.com", 123
  • Tests would fail if the feature code was deleted
  • Edge cases covered (empty, null, unicode, boundary values, attack strings)
  • Error cases covered (invalid input, auth failure, network error)
  • No tests that mock the thing they're testing
  • At least 1 integration/e2e test with real data flow
  • Loading states have try/finally (no stuck spinners)

Score: checks passed / total checks * 100

Step 6: Efficiency (10%)

Check for unnecessary complexity:

  • No over-engineering for current scale (check against thresholds in assess/references/patterns.md if available)
  • Dependencies are justified (no 100MB package for 10 lines of code)
  • No N+1 queries
  • No Promise.all for independent page data loading
  • Caching is used where appropriate (not prematurely)
  • No unnecessary abstraction layers (3 similar lines > premature abstraction)

Score: checks passed / applicable checks * 100

Step 7: Calculate Overall Score

Overall = (Completeness * 0.30) + (Code Quality * 0.25) + (Security * 0.20)
        + (Test Quality * 0.15) + (Efficiency * 0.10)

Step 8: Fix Plan (when score < threshold)

If the overall score is below the eval_threshold (default 95%), generate an actionable fix plan — specific instructions the agent can follow without guessing.

For each dimension that scored below 100%, list concrete fixes:

FIX PLAN (current: 72%, target: 95%)

Priority order (highest impact first):

1. [Test Quality → +8%] Add edge case test for empty email
   → tests/test_auth.py: add test_login_empty_email
   → Assert: returns 400, not 500

2. [Security → +6%] Add input validation on /api/import
   → src/routes/import.ts:handle_import (line 42)
   → Validate: file size, mime type, max records

3. [Completeness → +4%] PIN verification not wired to game start
   → src/components/RoomPicker.tsx: add PIN check before joinRoom()
   → Test: test_join_room_requires_valid_pin

4. [Code Quality → +3%] Extract duplicate room-filter logic
   → src/hooks/useRooms.ts lines 15-28 and src/components/Lobby.tsx lines 44-57
   → Extract to: src/utils/filterRooms.ts

Each fix must have:

  • What to fix (specific file:line or function)
  • How to fix it (concrete action, not "improve this")
  • Impact (which dimension it improves and by roughly how much)

Include the fix plan in the findings.json under a "fix_plan" key:

"fix_plan": [
  {"dimension": "test_quality", "impact": "+8%", "action": "Add test_login_empty_email to tests/test_auth.py", "file": "tests/test_auth.py"},
  {"dimension": "security", "impact": "+6%", "action": "Add input validation on handle_import", "file": "src/routes/import.ts:42"}
]

The agent receiving this fix plan should follow it as a checklist — not re-analyze, not guess alternatives, just execute each item in order and re-run /evaluate.

Step 9: Submit Findings (do NOT write the report yourself)

Reports/ is owned by hooks (G-REPORT-1). Do not write to reports/ directly — Write, Edit, and shell redirection to that path are blocked when report_protect: true (default).

Instead, write findings.json to .scratch/evaluate_<slug>/findings.json and let the finalize hook produce the canonical report.

Findings schema (all keys required):

{
  "skill": "evaluate",
  "slug": "kebab-case-slug",
  "topic": "what was evaluated",
  "dimensions": {
    "completeness": 92,
    "code_quality": 82,
    "security": 91,
    "test_quality": 94,
    "efficiency": 84
  },
  "summary": "<optional agent narrative>"
}

Dimension scores must be honest integers 0–100. The hook runs its own mechanical scorer and, per dimension, keeps the lower of its score and yours — your findings can lower a dimension the grep heuristics cannot see, but can never raise one. The overall score is the weighted average of the merged dimensions.

Then run:

python3 /Users/jvalin/dev/st5/agent-toolkit/hooks/finalize_report.py evaluate .scratch/evaluate_<slug>/findings.json

The hook re-runs test_command and lint_command from gates.json itself — you cannot fake those results. It writes reports/evaluate/eval_<slug>_<id>.md (with # Score: **X%** in the header, required for signed attestation) and prints a JSON response with passed, score, and threshold. Exit code 0 = gate ready, 1 = BLOCKED, 2 = invalid findings.

Gate unlock: Read shared/gate-unlock.md. Signed mode: refresh gate token after the report is written. Legacy: finalize_report.py writes .gates/evaluate-passed when passed is true and score ≥ eval_threshold.

If score < threshold: Do not claim pass; gate remains locked.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.