Collect changed files from git diff and explicit paths, categorize by type, output manifest.
This skill is limited to using the following tools:
scripts/cleanup.shscripts/collect-info.shSkill for collecting files to review: runs git diff against target branch, merges explicit files, categorizes by type.
| Arg | Default | Description |
|---|---|---|
--against | origin/main | Target branch for diff comparison |
--files | (none) | Comma-separated explicit file paths |
Run:
${CLAUDE_PLUGIN_ROOT}/skills/collect-commits-and-files/scripts/collect-info.sh --against <branch> --files <paths>
Returns JSON manifest:
{
"temp_dir": "/tmp/quick-refactor-XXXXXX",
"repo_root": "/path/to/repo",
"against_branch": "origin/main",
"paths": {
"diff_dir": "<temp_dir>/diff",
"files_dir": "<temp_dir>/files",
"reviews_dir": "<temp_dir>/reviews"
},
"summary": {
"total_files": 10,
"source": 6,
"test": 2,
"config": 1,
"docs": 1
},
"project_rules": ["/path/to/CLAUDE.md", "/path/to/.kiro/steering.md"]
}
If script returns error, report to caller:
{"error": "No files to review", "error_code": "NO_FILES"}
Error codes:
NOT_GIT_REPO: Not in a git repositoryBRANCH_NOT_FOUND: Target branch does not existNO_FILES: No files found to reviewNO_EXISTING_FILES: All files are deleted/tmp/quick-refactor-XXXXXX/
├── diff/ # Individual file diffs
│ └── <md5hash>.diff
├── files/ # File paths by category
│ ├── source.txt
│ ├── test.txt
│ ├── config.txt
│ └── docs.txt
└── reviews/ # Empty, for review agent outputs
After processing is complete, run:
${CLAUDE_PLUGIN_ROOT}/skills/collect-commits-and-files/scripts/cleanup.sh <temp_dir>
| Category | Description | Example patterns |
|---|---|---|
| source | Source code files | *.ts, *.py, *.go |
| test | Test files | *_test.go, *.spec.ts, tests/ |
| config | Configuration | *.yaml, .eslintrc, .github/ |
| docs | Documentation | *.md, docs/ |
Return the manifest JSON directly. Orchestrator uses this to:
paths.files_dirsummary countspaths.reviews_dirtemp_dir on completion