Agent SkillsAgent Skills
mgd34msu

review-scoring-rubric

@mgd34msu/review-scoring-rubric
mgd34msu
6
3 forks
Updated 5/5/2026
View on GitHub

Provides the complete code review scoring rubric with 10 weighted categories, severity multipliers, and deduction calculations. Use when performing quantified code reviews, calculating quality scores, or creating improvement roadmaps.

Installation

$npx agent-skills-cli install @mgd34msu/review-scoring-rubric
Claude Code
Cursor
Copilot
Codex
Antigravity

Details

Pathplugins/goodvibes/skills/common/quality/review-scoring-rubric/SKILL.md
Branchmain
Scoped Name@mgd34msu/review-scoring-rubric

Usage

After installing, this skill will be available to your AI coding assistant.

Verify installation:

npx agent-skills-cli list

Skill Instructions


name: review-scoring-rubric description: Provides the complete code review scoring rubric with 10 weighted categories, severity multipliers, and deduction calculations. Use when performing quantified code reviews, calculating quality scores, or creating improvement roadmaps.

Review Scoring Rubric

Complete scoring system for quantified code reviews with weighted categories and severity-based deductions.

Quick Start

Calculate score:

Calculate a score for this codebase using the 10-category weighted rubric.

Specific category audit:

Analyze the Testing category and calculate its weighted contribution to the score.

The Formula

Final Score = 10 - Total Weighted Deductions

Where:
Total Weighted Deductions = SUM(Category Deduction * Category Weight)
Category Deduction = SUM(Issue Points * Severity Multiplier)

Maximum Deduction per Category: 10 points (caps at 0 for category)


Severity Multipliers

SeverityMultiplierDescriptionExample Issues
Critical2.0xActive danger, data loss, security holesSQL injection, RCE, hardcoded secrets
Major1.5xSignificant problems, high bug potentialGod classes, no tests, N+1 queries
Minor1.0xCode smells, maintainability issuesLong functions, magic numbers
Nitpick0.5xStyle, preferences, minor polishNaming conventions, formatting

Category Weights

CategoryWeightFocus Areas
Organization12%File structure, module boundaries, separation of concerns
Naming10%Variables, functions, classes, constants clarity
Error Handling12%Try/catch, validation, error propagation, recovery
Testing12%Coverage, test quality, edge cases, mocking
Performance10%Efficiency, N+1 queries, memory leaks, scalability
Security12%Input validation, auth, secrets, injection
Documentation8%Useful comments, API docs, README
SOLID/DRY10%SRP, OCP, LSP, ISP, DIP, no duplication
Dependencies6%Minimal deps, no circular refs, versions
Maintainability8%Complexity, readability, nesting depth
Total100%

Category 1: Organization (12%)

What to Evaluate

  • File and folder structure
  • Module boundaries and cohesion
  • Separation of concerns
  • Entry points and flow clarity

Deduction Reference

IssueBase PointsSeverity
God file (500+ lines)1.5Critical
God file (300-500 lines)1.0Major
No clear folder structure1.0Major
Mixed concerns in file0.75Major
Files in wrong directory0.5Minor
Inconsistent file naming0.5Minor
Too many files in one folder (20+)0.5Minor
Unclear entry point0.25Minor

Detection Commands

# Files over 300 lines
find src -name "*.ts" -exec wc -l {} \; | awk '$1 > 300 {print}'

# File count per directory
find src -type d -exec sh -c 'echo -n "{}: "; ls -1 "{}" 2>/dev/null | wc -l' \;

# Files in src root (should be minimal)
ls -la src/*.ts 2>/dev/null | wc -l

Grade Thresholds

GradeCriteria
AClean feature-based structure, clear boundaries, <300 line files
BMostly organized, few large files, clear flow
CSome structure issues, mixed concerns
DDisorganized, many large files, unclear flow
FNo structure, god files everywhere

Category 2: Naming (10%)

What to Evaluate

  • Variable name clarity
  • Function name accuracy
  • Class name appropriateness
  • Constant documentation

Deduction Reference

IssueBase PointsSeverity
Misleading names1.0Major
Single-letter variables (non-loop)0.75Major
Generic names (data, temp, result, item)0.5Minor
Inconsistent casing style0.5Minor
Magic numbers without constants0.5Minor
Abbreviated names (unclear)0.25Minor
Boolean without is/has/can prefix0.25Nitpick

Detection Commands

# Single letter variables
grep -rn "const [a-z] =\|let [a-z] =\|var [a-z] =" src/

# Generic names
grep -rn "const data =\|let data =\|const result =\|let temp =" src/

# Magic numbers
grep -rn "[^0-9\.][0-9]\{2,\}[^0-9\.]" src/ | grep -v "test\|spec"

Category 3: Error Handling (12%)

What to Evaluate

  • Try/catch placement
  • Error messages quality
  • Error recovery strategies
  • Validation completeness

Deduction Reference

IssueBase PointsSeverity
No error handling in critical path2.0Critical
Empty catch blocks1.5Critical
Catching and ignoring1.5Critical
Generic error messages0.75Major
No input validation0.75Major
console.error without proper handling0.5Minor
Missing error types/classes0.5Minor
Inconsistent error patterns0.25Minor

Detection Commands

# Empty catch blocks
grep -rn "catch.*{\s*}" src/
grep -rA2 "catch" src/ | grep -B1 "^\s*}"

# console.error without throw
grep -rn "console.error" src/ | wc -l

# Missing try/catch around async
grep -rn "await" src/ | head -20

Category 4: Testing (12%)

What to Evaluate

  • Test coverage percentage
  • Test quality (not just quantity)
  • Edge case coverage
  • Mock/stub appropriateness

Deduction Reference

IssueBase PointsSeverity
0% test coverage3.0Critical
No tests for critical paths2.0Critical
<50% coverage1.5Major
50-70% coverage1.0Major
Tests that don't assert1.0Major
No edge case tests0.75Major
70-80% coverage0.5Minor
Missing integration tests0.5Minor
Flaky tests0.5Minor

Detection Commands

# Test file count
find . -name "*.test.*" -o -name "*.spec.*" | wc -l

# Source file count (for ratio)
find src -name "*.ts" | wc -l

# Coverage report
npm test -- --coverage 2>/dev/null
npx jest --coverage 2>/dev/null

Coverage Thresholds

CoverageGradeDeduction
90%+A0
80-89%B0.5
70-79%C1.0
50-69%D1.5
<50%F2.0+

Category 5: Performance (10%)

What to Evaluate

  • Algorithm efficiency
  • Database query patterns
  • Memory management
  • Async/blocking operations

Deduction Reference

IssueBase PointsSeverity
N+1 query in hot path1.5Critical
Memory leak pattern1.5Critical
Blocking operation in async1.0Major
O(n^2) in hot path1.0Major
Missing pagination0.75Major
No caching strategy0.5Minor
Sequential instead of parallel0.5Minor
Missing indexes0.5Minor

Detection Commands

# N+1 patterns (loop with query)
grep -rn "for.*await\|forEach.*await" src/
grep -rn "\.findAll\|\.findMany" src/ | head -10

# Sync operations in async
grep -rn "readFileSync\|writeFileSync" src/
grep -rn "execSync" src/

See references/performance-detection.md for detailed patterns.


Category 6: Security (12%)

What to Evaluate

  • Input validation
  • Authentication/authorization
  • Secrets management
  • Injection prevention

Deduction Reference

IssueBase PointsSeverity
SQL injection2.0Critical
Command injection2.0Critical
Hardcoded secrets2.0Critical
XSS vulnerability1.5Critical
Missing auth on endpoint1.5Critical
IDOR vulnerability1.5High
No input validation1.0Major
Weak cryptography0.75Major
Missing security headers0.5Minor
Verbose error messages0.25Minor

Detection Commands

# Injection patterns
grep -rn "\`SELECT.*\${" src/
grep -rn "exec\|eval" src/

# Secrets
grep -rn "password.*=.*['\"]" src/
grep -rn "api_key.*=.*['\"]" src/

# npm audit
npm audit --json 2>/dev/null | jq '.metadata.vulnerabilities'

See security-audit-checklist skill for comprehensive coverage.


Category 7: Documentation (8%)

What to Evaluate

  • README completeness
  • API documentation
  • Code comments (why, not what)
  • Type definitions

Deduction Reference

IssueBase PointsSeverity
No README1.0Major
No API documentation0.75Major
Missing setup instructions0.5Minor
Outdated documentation0.5Minor
Comments explaining "what"0.25Nitpick
TODO comments without issues0.25Nitpick
Missing JSDoc on public API0.25Nitpick

Detection Commands

# Check README exists
ls README.md 2>/dev/null

# Count TODO comments
grep -rn "TODO\|FIXME\|XXX\|HACK" src/ | wc -l

# Check for JSDoc
grep -rn "/\*\*" src/ | wc -l

Category 8: SOLID/DRY (10%)

What to Evaluate

  • Single Responsibility adherence
  • Open/Closed design
  • Liskov Substitution
  • Interface Segregation
  • Dependency Inversion
  • Code duplication

Deduction Reference

IssueBase PointsSeverity
God class (1000+ lines)2.0Critical
SRP violation (multi-domain class)1.0Major
Switch on type (multiple places)0.75Major
OCP violation (modify to extend)0.75Major
LSP violation (broken substitution)0.75Major
Large interface (10+ methods)0.5Minor
Concrete dependencies0.5Minor
Duplicated code blocks0.5Minor

Detection Commands

# Duplicate code
npx jscpd src/ --min-lines 10

# Large classes
grep -A 500 "^class" src/**/*.ts | head -100

# Switch statements on type
grep -rn "switch.*type\|switch.*kind" src/

See code-smell-detector skill for comprehensive patterns.


Category 9: Dependencies (6%)

What to Evaluate

  • Dependency count
  • Circular dependencies
  • Version management
  • Security vulnerabilities

Deduction Reference

IssueBase PointsSeverity
Critical CVE in dependency2.0Critical
Circular dependencies1.0Major
Excessive dependencies (50+)0.75Major
High CVE in dependency0.5Major
Outdated major versions0.5Minor
No lockfile0.5Minor
Unused dependencies0.25Minor

Detection Commands

# Dependency count
cat package.json | jq '.dependencies | length'

# Circular dependencies
npx madge --circular src/

# Security audit
npm audit --json

# Unused dependencies
npx depcheck

# Outdated packages
npm outdated

Category 10: Maintainability (8%)

What to Evaluate

  • Cyclomatic complexity
  • Nesting depth
  • Code readability
  • Cognitive load

Deduction Reference

IssueBase PointsSeverity
Function complexity >301.5Critical
Function complexity 20-301.0Major
Nesting depth 5+1.0Major
Function complexity 15-200.5Minor
Function >100 lines0.5Minor
Nesting depth 40.25Minor
any types everywhere0.5Minor
Inconsistent formatting0.25Nitpick

Detection Commands

# Complexity analysis
npx escomplex src/ --format json | jq '.aggregate.cyclomatic'

# TypeScript any usage
grep -rn ": any\|as any" src/ | wc -l

# Type coverage
npx type-coverage --detail 2>/dev/null

Score Calculation Example

Category: Security (Weight: 12%)

Issues Found:
1. SQL Injection (src/api/users.ts:45)
   - Base: 2.0, Severity: Critical (2.0x)
   - Deduction: 2.0 * 2.0 = 4.0

2. Hardcoded API key (src/config.ts:12)
   - Base: 2.0, Severity: Critical (2.0x)
   - Deduction: 2.0 * 2.0 = 4.0

3. Missing input validation (5 endpoints)
   - Base: 1.0, Severity: Major (1.5x)
   - Deduction: 1.0 * 1.5 = 1.5

Category Raw Deduction: 4.0 + 4.0 + 1.5 = 9.5 (capped at 10)
Category Raw Score: 10 - 9.5 = 0.5/10
Weighted Contribution: 0.5 * 0.12 = 0.06 (out of 1.20 max)
Grade: F

Score Interpretation

ScoreVerdictReality Check
10ExemplaryYou actually did everything right. Rare.
9ExcellentMinor polish. Ship it.
8Very GoodFew small fixes. Solid work.
7GoodAcceptable. Some cleanup needed.
6SatisfactoryWorks but rough. Needs attention.
5AdequateBarely meets the bar. Clear problems.
4Below AverageSignificant issues. Risky to deploy.
3PoorMajor rework needed. Architectural problems.
2Very PoorFundamental issues. Barely functional.
1CriticalDo not deploy. Security holes. Will crash.

Report Template

## Score Breakdown

| Category | Weight | Raw Score | Deductions | Weighted | Grade |
|----------|--------|-----------|------------|----------|-------|
| Organization | 12% | X.X/10 | -X.X | X.XX/1.20 | {A-F} |
| Naming | 10% | X.X/10 | -X.X | X.XX/1.00 | {A-F} |
| Error Handling | 12% | X.X/10 | -X.X | X.XX/1.20 | {A-F} |
| Testing | 12% | X.X/10 | -X.X | X.XX/1.20 | {A-F} |
| Performance | 10% | X.X/10 | -X.X | X.XX/1.00 | {A-F} |
| Security | 12% | X.X/10 | -X.X | X.XX/1.20 | {A-F} |
| Documentation | 8% | X.X/10 | -X.X | X.XX/0.80 | {A-F} |
| SOLID/DRY | 10% | X.X/10 | -X.X | X.XX/1.00 | {A-F} |
| Dependencies | 6% | X.X/10 | -X.X | X.XX/0.60 | {A-F} |
| Maintainability | 8% | X.X/10 | -X.X | X.XX/0.80 | {A-F} |
| **TOTAL** | **100%** | | **-X.X** | **X.XX/10.00** | |

### Grade Scale
- A: 9.0-10.0 (Excellent)
- B: 7.0-8.9 (Good)
- C: 5.0-6.9 (Acceptable)
- D: 3.0-4.9 (Poor)
- F: 0.0-2.9 (Failing)

Reference Files

More by mgd34msu

View all
goodvibes-memory
6

ALWAYS load before starting any task. Provides persistent cross-session memory for learning from past work. Read memory at task start to avoid repeating mistakes; write memory at task end to record what worked. Covers decisions.json (architectural choices), patterns.json (proven approaches), failures.json (past errors and fixes), preferences.json (project conventions), and session activity logs.

discover-plan-batch
6

MANDATORY before starting any task. Enforces the strict 3-call-per-cycle execution loop that prevents tool call sprawl. D: Single discover call with all queries batched. P: Plan in text with zero tool calls. B: Single batched precision call. Every DPB cycle targets exactly 3 tool calls. Covers dependency analysis, batch opportunities, scope estimation, and loop-back triggers.

debugging
6

Load PROACTIVELY when task involves investigating errors, diagnosing failures, or tracing unexpected behavior. Use when user says "debug this", "fix this error", "why is this failing", "trace this issue", or "it's not working". Covers error message and stack trace analysis, runtime debugging, network request inspection, state debugging, performance profiling, type error diagnosis, build failure resolution, and root cause analysis with memory-informed pattern matching against past failures.

project-onboarding
6

Load PROACTIVELY when starting work on an unfamiliar codebase or setting up a new project. Use when user says "help me understand this codebase", "onboard me", "what does this project do", "set up my environment", or "map the architecture". Covers codebase structure analysis, architecture mapping, dependency auditing, convention and pattern detection, developer environment setup, and documentation of findings for rapid productive contribution.