# Evaluate

> 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

- **Type:** Skill
- **Install:** `agentstack add skill-jvalin17-agent-toolkit-evaluate`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [jvalin17](https://agentstack.voostack.com/s/jvalin17)
- **Installs:** 0
- **Category:** [Developer Tools](https://agentstack.voostack.com/c/developer-tools)
- **Latest version:** 0.1.0
- **License:** Apache-2.0
- **Upstream author:** [jvalin17](https://github.com/jvalin17)
- **Source:** https://github.com/jvalin17/agent-toolkit/tree/main/skills/evaluate

## Install

```sh
agentstack add skill-jvalin17-agent-toolkit-evaluate
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

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, 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: 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_/findings.json`
and let the finalize hook produce the canonical report.

Findings schema (all keys required):

```json
{
  "skill": "evaluate",
  "slug": "kebab-case-slug",
  "topic": "what was evaluated",
  "dimensions": {
    "completeness": 92,
    "code_quality": 82,
    "security": 91,
    "test_quality": 94,
    "efficiency": 84
  },
  "summary": ""
}
```

Dimension scores must be honest integers 0–100. The hook **recomputes**
the overall score from the weighted average — you cannot claim a higher
score than your dimension scores support.

Then run:

```
python3 /Users/jvalin/dev/st5/agent-toolkit/hooks/finalize_report.py evaluate .scratch/evaluate_/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__.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.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [jvalin17](https://github.com/jvalin17)
- **Source:** [jvalin17/agent-toolkit](https://github.com/jvalin17/agent-toolkit)
- **License:** Apache-2.0

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** yes
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-jvalin17-agent-toolkit-evaluate
- Seller: https://agentstack.voostack.com/s/jvalin17
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
