evals-code-run

Score unpushed git commits for duplication, bloat, inefficiency, and security issues.

Updated May 26, 2026
One-click install
npx skills add https://github.com/cagriy/dev-skills --skill evals-code-run-cagriy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: evals-code-run
Source: https://github.com/cagriy/dev-skills/tree/main/skills/evals-code-run
Command: npx skills add https://github.com/cagriy/dev-skills --skill evals-code-run-cagriy

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? After an AI-assisted implementation lands commits on a branch, there is no objective record of code quality. This Skill audits the committed-but-unpushed changes on the current branch across four quality dimensions and appends the scores to a persistent JSON log, so code quality is measured longitudinally rather than assumed. ## Core Features & Use Cases - Four-dimension scoring: Evaluates duplication (against the rest of the repo), code bloat, inefficient code, and security issues, each as a 0–100% score of affected added lines. - Parallel subagent analysis: Launches four independent read-only subagents with self-contained briefs, then validates their arithmetic and evidence before accepting results. - Append-only eval log: Writes exactly four JSON entries per run to ~/.claude/evals/code.json with atomic read-modify-write, including corrupt-log backup handling. - Use Case: After /feature-implement commits several TDD stages on a feature branch, run the evals to get an evidence-backed score table and per-dimension recommendations for improving the implementation workflow before pushing. ## Quick Start Ask the AI to run code evals on the unpushed commits of the current branch and append the duplication, bloat, inefficiency, and security scores to the eval log.

Frequently Asked Questions about evals-code-run

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I evaluate code quality of unpushed git commits?

Run the evals on the current branch; it diffs HEAD against the upstream (or a base ref you pass as an argument) using a three-dot diff, then scores the added lines for duplication, bloat, inefficiency, and security. Results are appended to ~/.claude/evals/code.json.

How to detect code duplication against the rest of a repository?

The duplication eval picks distinctive identifiers, string literals, and logic shapes from the added code and greps the rest of the repo for matches, counting near-copied blocks of roughly four or more contiguous lines. Each finding cites both the new location and the pre-existing code it duplicates.

Does the eval modify or commit anything in my repository?

No. The skill is strictly read-only with respect to the repo: it never modifies, stages, commits, checks out, or pushes project files. Its only write is the eval log at ~/.claude/evals/code.json, plus a timestamped backup if that log is corrupt.

What happens if my branch has no upstream or no unpushed commits?

Without an upstream or origin/HEAD, the skill stops and asks you to re-run with an explicit base ref. If the diff against the base is empty, it stops without writing anything to the log, since a run that evaluates nothing must not produce entries.

Are uncommitted working-tree changes included in the evaluation?

No. Only committed-but-unpushed changes are evaluated by design; uncommitted working-tree changes are mentioned in the summary but excluded from scoring. The expected flow is that each implementation stage is committed before evals run.

Why are lockfiles and generated files excluded from the score?

Machine-written lines such as lockfiles, minified bundles, and build output say nothing about the quality of the authored change and would dilute every score toward zero. The denominator counts only added lines in non-excluded files, and exclusions are recorded in the summary.