batch-operations
하는 일
이 스킬을 쓰면 AI가 프로젝트의 여러 파일에 같은 수정을 일관되게 적용할 수 있습니다. 모든 곳에 같은 이름 바꾸기나 업데이트가 필요한 개발자를 위한 스킬입니다.
사용하는 경우
- ✓코드베이스에서 함수나 컴포넌트를 쓰는 모든 곳의 이름을 바꾸고 싶을 때.
- ✓여러 파일에 걸쳐 버전 번호나 import를 업데이트해야 할 때.
- ✓여러 파일에 걸쳐 한 라이브러리에서 다른 라이브러리로 옮기는 경우.
스킬 링크
https://github.com/vudovn/ag-kit/blob/main/.agents/skills/batch-operations/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“제 프로젝트의 모든 파일에서 getUser 함수를 fetchUser로 이름 바꿔 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
이 스킬은 먼저 조건에 맞는 모든 파일을 찾아 변경 사항을 미리 보여 줍니다. 그다음 같은 바꾸기를 해당 파일들에 적용합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Batch Operations — Multi-File Changes
Apply consistent changes across many files at once. One pattern, many targets.
When to Use
✅ Good for:
- Renaming a function/component across all files that use it
- Adding an import to every file in a directory
- Updating version numbers across package files
- Applying the same code pattern to multiple similar files
- Migrating from one API to another across the codebase
- Adding/removing a field from all similar data structures
❌ Not for:
- Single-file edits (use direct editing)
- Unique changes per file (handle individually)
- Changes that need per-file judgment (use an agent per domain)
Batch Operation Protocol
Step 1: Define the Pattern
What: [exact text/pattern to find]
Replace: [exact replacement text]
Scope: [file glob pattern, e.g., "src/**/*.tsx"]
Exclude: [files to skip, e.g., "**/*.test.tsx"]
Step 2: Preview Before Executing
# Find all affected files FIRST
grep -rl "oldPattern" src/ --include="*.ts"
# Count matches
grep -rc "oldPattern" src/ --include="*.ts" | grep -v ":0$"
# Show context for each match
grep -rn "oldPattern" src/ --include="*.ts"
🔴 NEVER batch-modify without previewing first. Show the user what will change.
Step 3: Execute the Batch
For text replacements:
# On Linux/macOS
find src -name "*.ts" -exec sed -i 's/oldPattern/newPattern/g' {} +
# On Windows (PowerShell)
Get-ChildItem -Path src -Recurse -Filter *.ts |
ForEach-Object { (Get-Content $_) -replace 'oldPattern','newPattern' | Set-Content $_ }
For structural changes (adding imports, wrapping code):
- Use the Edit tool on each file
- Process files in a consistent order (alphabetical or by dependency)
Step 4: Verify the Batch
# Confirm no missed instances
grep -rl "oldPattern" src/ --include="*.ts"
# Should return empty
# Confirm replacements are correct
grep -rn "newPattern" src/ --include="*.ts" | head -5
# Run tests to catch breakage
npm run test
npm run build
Common Batch Patterns
| Operation | Command Pattern |
|---|---|
| Rename import | Find all import { X } → replace with import { Y } |
| Update version | Find "version": "1.0" → replace across all package.json |
| Add export | Append export { X } to all index files |
| Remove deprecated | Find deprecatedFn() → replace with newFn() |
| Add header | Prepend license header to all source files |
| Type migration | Find interface X → replace with type X = |
Safety Rules
- Preview first — always show affected files before modifying
- Git safety — ensure clean working directory (
git stashor commit first) - Exclude tests — often tests need different treatment than source
- Verify after — run build + tests after every batch operation
- Report changes — list every file modified with change summary
자주 묻는 질문
파일이 바뀌기 전에 일치하는 항목을 검토할 수 있나요?
네. 영향받는 모든 파일을 볼 수 있도록 미리 보기 단계를 먼저 거칩니다.
파일 하나만 바꿀 때도 유용한가요?
아닙니다. 스킬도 설명하듯, 파일 하나라면 직접 수정하는 것이 더 간단합니다.
파일마다 판단이 필요한 변경도 되나요?
아닙니다. 이런 경우는 한 파일씩 처리하는 것이 낫다고 스킬이 설명합니다.
상세 정보
작성자의 원본 설명
Apply operations across multiple files simultaneously. Pattern-based bulk modifications, search-and-replace across codebases, consistent changes to many files at once.
repo: vudovn/ag-kit
인기도
- GitHub 스타
- 8.2k
- 순위
- #12525
- 라이선스
- MIT
- 업데이트
- 2026. 10. 18.
댓글
- …
이 저장소의 다른 스킬
brainstorming
8.2k에이전트가 새로운 것이나 복잡한 것을 만들기 전에 명확한 질문을 하도록 가르쳐 목표를 먼저 이해하게 합니다.
code-review-checklist
8.2k에이전트에게 정확성, 보안, 성능, 테스트, 문서를 검토하는 체크리스트를 주고, AI 관련 위험도 포함합니다.
code-review-graph
8.2k에이전트가 구조 지도를 이용해 큰 프로젝트의 코드를 검토하도록 돕고, 변경과 관련된 파일만 읽게 합니다.
context-compression
8.2k에이전트가 끝난 작업을 요약하고 핵심 결정은 남겨 긴 채팅 세션을 줄이도록 가르쳐 집중력을 유지하게 합니다.