From ccpp
Simplifies recently changed code by removing unnecessary abstractions, duplication (3+ occurrences), and complexity. Reviews git diffs, applies patterns like early returns and inline helpers, verifies with typechecks and tests.
npx claudepluginhub jh941213/my-cc-harness --plugin ccppThis skill is limited to using the following tools:
최근 변경된 코드를 리뷰하고 단순화합니다.
Compares coding agents like Claude Code and Aider on custom YAML-defined codebase tasks using git worktrees, measuring pass rate, cost, time, and consistency.
Designs and optimizes AI agent action spaces, tool definitions, observation formats, error recovery, and context for higher task completion rates.
Designs, implements, and audits WCAG 2.2 AA accessible UIs for Web (ARIA/HTML5), iOS (SwiftUI traits), and Android (Compose semantics). Audits code for compliance gaps.
최근 변경된 코드를 리뷰하고 단순화합니다.
git diff --name-only HEAD~1 # 최근 변경 파일 확인
// BEFORE: 한 번만 쓰이는 헬퍼
function formatUserName(user: User) { return `${user.first} ${user.last}`; }
const name = formatUserName(user);
// AFTER: 인라인
const name = `${user.first} ${user.last}`;
// BEFORE: 깊은 중첩
if (user) {
if (user.isActive) {
if (user.hasPermission) {
doThing();
}
}
}
// AFTER: 얼리 리턴
if (!user?.isActive || !user.hasPermission) return;
doThing();
// BEFORE: 반복 패턴
const users = data.filter(d => d.type === 'user').map(d => d.name);
const admins = data.filter(d => d.type === 'admin').map(d => d.name);
// AFTER: 3회 이상 반복될 때만 추출
const namesByType = (type: string) => data.filter(d => d.type === type).map(d => d.name);
주의: 2회 반복은 추출하지 않음. 3회부터 고려.
# jscpd — copy-paste 감지 (3줄 이상 중복)
npx jscpd src/ --min-lines 3 --reporters console 2>/dev/null | head -30
# ast-grep — 구조적 패턴 탐지
sg --pattern 'console.log($$$)' --lang ts 2>/dev/null | head -10
수정 후 반드시 확인:
npm run typecheck || npx tsc --noEmit # 타입 안전
npm test # 테스트 통과
git diff --name-only HEAD~1 (최근 커밋 변경 파일)git stash 또는 현재 상태 확인 → 수정 후 검증 → 실패 시 원복