Slash Command790 repo starsupdated 12d ago
suggest-automation
The suggest-automation slash command analyzes recent git commit patterns and CLAUDE.md rules to identify repetitive workflows and recommend appropriate automations. Use this command periodically to discover opportunities for creating new Claude commands, skills, or agents that could eliminate redundant manual work, such as generating test files, creating boilerplate components, or automating common git workflows.
Install in Claude Code
Copymkdir -p ~/.claude/commands && curl -fsSL https://raw.githubusercontent.com/sangrokjung/claude-forge/HEAD/commands/suggest-automation.md -o ~/.claude/commands/suggest-automation.mdThen start a new Claude Code session; the slash command loads automatically.
Definition
suggest-automation.md
## Task ### 0단계: 분석 범위 결정 - $ARGUMENTS 숫자 있으면 → 해당 커밋 수 - 없으면 → 기본 50개 커밋 ### 1단계: 데이터 수집 #### 커밋 패턴 수집 ```bash git log --oneline -[N] git log --name-status -[N] --pretty=format:"%s" ``` #### 기존 자동화 확인 Read 도구로 다음 디렉토리 확인: - `.claude/commands/` - 기존 command 목록 - `.claude/agents/` - 기존 agent 목록 - `.claude/skills/` - 기존 skill 목록 (있으면) #### CLAUDE.md 분석 - Read 도구로 CLAUDE.md 읽기 - 반복되는 규칙 패턴 확인 - 자주 언급되는 작업 유형 파악 ### 2단계: 패턴 분석 #### 커밋 메시지 패턴 - 같은 prefix 빈도 분석 (fix:, feat:, docs:, test: 등) - 같은 키워드 반복 횟수 (API, migration, test, config 등) - 유사한 작업 패턴 그룹화 #### 파일 변경 패턴 - 자주 생성되는 파일 유형 (*.test.ts, *.spec.ts 등) - 자주 수정되는 디렉토리 - 함께 변경되는 파일 그룹 #### CLAUDE.md 패턴 - 비슷한 규칙 그룹 - 반복 추가되는 규칙 유형 ### 3단계: 제안 생성 **패턴 → 제안 매핑:** | 발견 패턴 | 제안 유형 | 예시 | |----------|----------|------| | 테스트 파일 자주 생성 | command | `/generate-test` | | 특정 구조 파일 반복 생성 | skill | `api-generator` | | 복잡한 작업 반복 위임 | agent | `migration-helper` | | 같은 git 명령 조합 반복 | command | `/quick-deploy` | | 보일러플레이트 반복 | skill | `component-template` | **제안 조건:** - 최소 3회 이상 반복된 패턴만 제안 - 이미 존재하는 자동화와 중복 제외 ### 4단계: 결과 출력 ``` 🔍 자동화 기회 분석 (최근 [N]개 커밋) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ## 발견된 패턴 ### 1. [패턴 이름] ([반복 횟수]회) - 패턴: [구체적 패턴 설명] - 제안: [command/skill/agent 이름] - 효과: [자동화 시 이점] ### 2. [패턴 이름] ([반복 횟수]회) - 패턴: [구체적 패턴 설명] - 제안: [command/skill/agent 이름] - 효과: [자동화 시 이점] [추가 패턴...] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ## 이미 있는 자동화 - /[command1] ✓ - /[command2] ✓ - [agent1] ✓ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ## 권장 액션 1. [높음] [제안 내용] 2. [중간] [제안 내용] 3. [낮음] [제안 내용] 생성할 번호를 입력하세요 (또는 'skip'): ``` ### 5단계: 선택적 생성 사용자가 번호 선택하면: 1. 해당 유형(command/skill/agent) 템플릿 생성 2. 적절한 디렉토리에 파일 생성 3. 기본 구조 채워넣기 **생성 예시 (command):** ```markdown # 생성: .claude/commands/[이름].md --- allowed-tools: [필요한 도구] description: [자동 생성된 설명] argument-hint: [인자 힌트] --- ## Task [기본 템플릿 - 사용자가 수정 필요] ### 0단계: 환경 확인 [프로젝트 상태 확인] ### 1단계: 실행 [핵심 작업] ### 완료 안내 [결과 출력] ``` **생성 완료 안내:** ``` ✅ 자동화 생성 완료 생성된 파일: - .claude/commands/[이름].md 다음 단계: 1. 파일 내용 확인 및 수정 2. 테스트 실행: /[이름] ``` ### 패턴 없을 때 ``` 🔍 자동화 기회 분석 (최근 [N]개 커밋) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ✨ 뚜렷한 반복 패턴이 발견되지 않았습니다. 가능한 이유: - 다양한 작업을 진행 중 - 이미 충분히 자동화됨 - 분석 범위가 작음 (커밋 수 늘려서 재시도) 💡 Tip: /suggest-automation 100 으로 더 넓은 범위 분석 ```
More from this repository
architectSubagent
|
build-error-resolverSubagent
|
code-reviewerSubagent
|
database-reviewerSubagent
Use when writing SQL queries, creating migrations, or troubleshooting database performance in Supabase/PostgreSQL projects. Reviews indexes, RLS policies, schema types, N+1 patterns. Read-only reviewer with EXPLAIN ANALYZE capability.
doc-updaterSubagent
|
e2e-runnerSubagent
|
plannerSubagent
|
refactor-cleanerSubagent
|