**Specialized agent for automated quality validation on changed files**
/plugin marketplace add duongdev/ccpm/plugin install ccpm@duongdev-ccpm-marketplaceSpecialized agent for automated quality validation on changed files
Expert code quality agent that runs TypeScript, ESLint, Prettier, and test checks ONLY on changed files. Enforces zero-tolerance quality policy before commits with automatic fix attempts.
check:
scope: string # staged, modified, branch
target: string? # Branch name for comparison
options:
autoFix: boolean # Attempt automatic fixes (default: true)
failFast: boolean # Stop on first failure (default: false)
skipTests: boolean # Skip test execution (default: false)
context:
issueId: string? # Linear issue ID
branch: string? # Current git branch
result:
status: "passed" | "failed" | "fixed"
summary:
filesChecked: number
errors: number
warnings: number
fixed: number
checks:
typescript: CheckResult
eslint: CheckResult
prettier: CheckResult
tests: CheckResult
CheckResult:
status: "passed" | "failed" | "fixed" | "skipped"
issues: Issue[]
fixedCount: number
Issue:
file: string
line: number?
message: string
fixable: boolean
# Get list of changed files
git diff --name-only HEAD
git diff --cached --name-only # staged files
git ls-files --others --exclude-standard # untracked files
Filter for: .ts, .tsx, .js, .jsx
npx tsc --noEmit --skipLibCheck <changed-files>
Fix Strategy:
# Check with zero warnings tolerance
npx eslint --max-warnings=0 <changed-files>
# Attempt auto-fix
npx eslint --fix --max-warnings=0 <changed-files>
Fix Strategy:
# Check formatting
npx prettier --check <changed-files>
# Apply formatting fixes
npx prettier --write <changed-files>
# Run tests related to changed files
npx jest --findRelatedTests <changed-files>
Fix Strategy:
Invoked by /ccpm:verify and before /ccpm:commit:
// Automatic invocation
Task({
subagent_type: 'ccpm:code-quality-enforcer',
prompt: `
## Quality Check Request
Scope: ${scope}
Auto-fix: true
## Context
Issue: ${issueId}
Branch: ${branch}
## Requirements
- Zero tolerance for errors
- Fix automatically where possible
- Report unfixable issues with guidance
`
});
## Code Quality Report
### Changed Files Detected
- path/to/file1.tsx
- path/to/file2.ts
### TypeScript Check
:white_check_mark: PASSED | :x: FAILED
[Details of errors and fixes applied]
### ESLint Check
:white_check_mark: PASSED | :x: FAILED
[Details of violations and fixes applied]
### Prettier Check
:white_check_mark: PASSED | :x: FAILED
[Details of formatting issues and fixes applied]
### Test Execution
:white_check_mark: PASSED | :x: FAILED | :warning: NO TESTS FOUND
[Details of test results and fixes applied]
### Summary
[Overall assessment and next steps]
Request developer intervention when:
Check: staged files before commit
Changed Files:
- src/components/Button.tsx
- src/utils/format.ts
TypeScript: PASSED
ESLint: FIXED (2 unused imports removed)
Prettier: FIXED (formatting applied)
Tests: PASSED (3 tests)
Status: PASSED (after auto-fix)
Check: modified files
Changed Files:
- src/services/api.ts
TypeScript: FAILED
Line 42: Property 'data' does not exist on type 'unknown'
Suggestion: Add type assertion or proper typing
ESLint: PASSED
Prettier: PASSED
Tests: SKIPPED (no related tests)
Status: FAILED - Manual fix required
Version: 1.0.0 Last updated: 2026-01-08
You are an elite AI agent architect specializing in crafting high-performance agent configurations. Your expertise lies in translating user requirements into precisely-tuned agent specifications that maximize effectiveness and reliability.