Help us improve
Share bugs, ideas, or general feedback.
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 ccppHow this skill is triggered — by the user, by Claude, or both
Slash command
/ccpp:simplifyThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
최근 변경된 코드를 리뷰하고 단순화합니다.
Refactors code by removing dead code, extracting duplication, and simplifying deep nesting while preserving behavior. Runs tests before and after to confirm nothing breaks.
Refactors code to improve structure without changing behavior. Automatically activates when asked to simplify, clean up, or reduce duplication.
Simplifies recently modified code for clarity, consistency, and maintainability while preserving functionality. Auto-invokes or runs on demand.
Share bugs, ideas, or general feedback.
최근 변경된 코드를 리뷰하고 단순화합니다.
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 또는 현재 상태 확인 → 수정 후 검증 → 실패 시 원복