一键导入
eval-harness-skill
Evaluate code quality, skill effectiveness, and implementation correctness against defined criteria with scoring and improvement suggestions
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Evaluate code quality, skill effectiveness, and implementation correctness against defined criteria with scoring and improvement suggestions
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Deploy and troubleshoot Next.js 16+ applications on AWS Amplify Hosting — build spec (amplify.yml), SSR Lambda env-var injection, CloudFront OAC, Route53 DNS, GitHub Actions deploy triggers, post-deploy verification, and rollback strategy
Design and document APIs — REST conventions, OpenAPI/Swagger spec generation, GraphQL schema patterns, API versioning, pagination, rate limiting, error response formats, and HATEOAS
Implement authentication and authorization patterns — OAuth2/OIDC flows, JWT best practices, session management, RBAC/ABAC, NextAuth/Auth.js, Passport.js, password hashing, and CSRF protection
Apply clean architecture principles with vertical slicing, dependency rule, clear layer boundaries, and feature-first organization - language-agnostic
Write clean, human-readable code with proper naming, small functions, self-documenting patterns, and object calisthenics - language-agnostic
Detect and fix code smells including long methods, large classes, feature envy, primitive obsession, and more with refactoring guidance - language-agnostic
| name | eval-harness-skill |
| description | Evaluate code quality, skill effectiveness, and implementation correctness against defined criteria with scoring and improvement suggestions |
| license | Apache-2.0 |
| compatibility | opencode |
| metadata | {"audience":"developers, QA engineers, agents","workflow":"evaluation, quality-assurance","trigger":"explicit-only","protocol":"autoresearch-opt-in"} |
I provide a structured evaluation framework to assess code, skills, and implementations:
Use this skill when:
Trigger phrases:
Establish what "good" looks like for the evaluation target:
## Evaluation Criteria
### Correctness (0-10)
- Does the code do what it's supposed to do?
- Are edge cases handled?
- Are error paths covered?
### Code Quality (0-10)
- Follows language/framework conventions?
- Clean, readable, maintainable?
- Proper abstractions without over-engineering?
### Test Coverage (0-10)
- Are tests present and comprehensive?
- Do tests cover edge cases?
- Are tests maintainable?
### Performance (0-10)
- Efficient algorithms and data structures?
- No unnecessary computations?
- Proper caching where applicable?
### Security (0-10)
- Input validation?
- No injection vulnerabilities?
- Proper auth/authz?
Define what to evaluate:
| Scope | Description | Example |
|---|---|---|
| Single File | Evaluate one file | eval src/auth/login.ts |
| Module | Evaluate a directory/module | eval src/auth/ |
| Skill Output | Evaluate what a skill produces | eval skill:tdd-workflow |
| PR Diff | Evaluate changes in a PR | eval pr:42 |
| Acceptance Criteria | Check against issue requirements | eval issue:150 |
Run the evaluation checks:
Produce a structured evaluation report:
## Evaluation Report
**Target**: src/auth/login.ts
**Date**: 2024-01-25
**Evaluator**: eval-harness
### Summary
| Criterion | Score | Threshold | Status |
|-----------|-------|-----------|--------|
| Correctness | 8/10 | 7/10 | PASS |
| Code Quality | 7/10 | 7/10 | PASS |
| Test Coverage | 5/10 | 7/10 | FAIL |
| Performance | 9/10 | 6/10 | PASS |
| Security | 6/10 | 7/10 | FAIL |
### Overall: 35/50 (70%) — NEEDS IMPROVEMENT
### Detailed Findings
#### Test Coverage (5/10) — FAIL
- Missing: Error path tests for network failures
- Missing: Edge case test for expired tokens
- Suggestion: Add tests for `handleAuthError()` failure cases
#### Security (6/10) — FAIL
- Issue: Password not hashed before comparison (line 42)
- Issue: Session token stored in localStorage (vulnerable to XSS)
- Suggestion: Use httpOnly cookies for session management
For each failing criterion, provide actionable improvements:
## Criteria
- Naming conventions (snake_case, camelCase per language)
- Function length (max 20 lines recommended)
- Class size (max 200 lines recommended)
- Complexity (cyclomatic < 10)
- Duplication (DRY principle)
- Error handling (no silent catches)
## Criteria
- Task completion (does it achieve the goal?)
- Output quality (is the result production-ready?)
- Consistency (same input → same quality output?)
- Edge case handling (does it fail gracefully?)
- Integration (works with other skills/agents?)
## Criteria (from issue/plan)
- Each acceptance criterion checked off
- Evidence provided for each check
- No partial completions
- No regressions introduced
| Skill | Integration |
|---|---|
verification-loop | Eval provides criteria, verification enforces them continuously |
continuous-learning | Eval results feed into learning (what patterns score well) |
strategic-compact | Compact preserves evaluation results for context |
linting-workflow | Eval incorporates lint results as a sub-criterion |
code-smells | Eval uses code smell detection as quality signals |
solid-principles | Eval checks SOLID compliance as code quality criterion |
| Range | Label | Description |
|---|---|---|
| 9-10 | Excellent | Production-ready, exemplary implementation |
| 7-8 | Good | Solid work, minor improvements possible |
| 5-6 | Adequate | Functional but needs improvement |
| 3-4 | Below Standard | Significant issues, needs rework |
| 1-2 | Poor | Major problems, needs complete rewrite |
| 0 | Failed | Does not meet minimum requirements |
| Criterion | Default Threshold |
|---|---|
| Correctness | 7/10 |
| Code Quality | 7/10 |
| Test Coverage | 7/10 |
| Performance | 6/10 |
| Security | 7/10 |
Thresholds can be customized per project or per evaluation run.
"Run eval on src/auth/ before I create the PR"
The skill will:
"Evaluate the output of tdd-workflow skill"
The skill will:
verification-loop - Continuous verification during implementationcontinuous-learning - Learn from evaluation resultsstrategic-compact - Preserve eval context during compactionDO NOT execute any of the following unless AUTORESEARCH_PROTOCOL=1 is set in your environment. When unset, this skill behaves exactly as documented in all sections above; the Iteration Protocol block is descriptive only.
When AUTORESEARCH_PROTOCOL=1:
autoresearch-core-skill/SKILL.md.{"pass":bool,"score":N} JSON from a mechanical evaluator. Pass determines keep/revert; score logged to eval-harness-results.tsv. See autoresearch-core-skill/references/evaluator-contract.md.autoresearch-core-skill/references/stuck-detection.md.eval-harness-results.tsv (8-column: iteration, commit, metric, delta, status, description, timestamp, evaluator_output). See autoresearch-core-skill/references/audit-trail.md.autoresearch-core-skill/references/crash-recovery.md.git reset --hard HEAD~1) on pass:false.Iterations: 25); safety blocks .env, node_modules/, rm -rf, git push --force. See autoresearch-core-skill/references/iteration-safety.md.TSV audit trail. Append every eval run to eval-harness-results.tsv. Overnight persistence via autoresearch-core-skill/scripts/autoresearch-loop.sh (detects available CLI tool). Score is the eval metric; pass = meets target threshold.
Iterations: unlimited overrides)