|
| 1 | +--- |
| 2 | +name: repo-sweep |
| 3 | +description: Comprehensive pre-production repository audit for preparing repos for public release. Use when the user wants to perform a "final sweep", "production check", "pre-release audit", or prepare a repository to be made public. Audits metadata files across all project types (Fabric mods, Node/npm, Go, Python, etc.) for correct username/organization, checks README links, and identifies leftover development artifacts like planning docs, test scripts, and temporary files. Interactive cleanup with user confirmation. |
| 4 | +--- |
| 5 | + |
| 6 | +# Repo Sweep |
| 7 | + |
| 8 | +Perform a comprehensive pre-production audit of a repository before making it public. This skill systematically checks metadata files, documentation, and development artifacts to ensure the repo is production-ready. |
| 9 | + |
| 10 | +## Workflow |
| 11 | + |
| 12 | +### 1. Initial Repository Scan |
| 13 | + |
| 14 | +Start by understanding the repository structure and project type(s): |
| 15 | + |
| 16 | +```bash |
| 17 | +# Get repository overview |
| 18 | +ls -la |
| 19 | +find . -type f -name "*.json" -o -name "*.toml" -o -name "*.mod" -o -name "go.mod" | head -20 |
| 20 | +``` |
| 21 | + |
| 22 | +Identify all project types present (can be multiple in monorepos): |
| 23 | +- **Fabric Minecraft mod**: Look for `fabric.mod.json`, `gradle.properties` |
| 24 | +- **Node/npm**: Look for `package.json`, `package-lock.json` |
| 25 | +- **Go**: Look for `go.mod`, `go.sum` |
| 26 | +- **Python**: Look for `pyproject.toml`, `setup.py`, `requirements.txt`, `uv.lock` |
| 27 | +- **Other**: Check for project-specific metadata files |
| 28 | + |
| 29 | +### 2. Metadata Audit |
| 30 | + |
| 31 | +For each project type found, audit metadata files for correctness. The expected username is **GhostTypes** and organization names should be verified with the user. |
| 32 | + |
| 33 | +#### Fabric Minecraft Mods |
| 34 | + |
| 35 | +Check `fabric.mod.json`: |
| 36 | +```bash |
| 37 | +cat fabric.mod.json |
| 38 | +``` |
| 39 | + |
| 40 | +Verify: |
| 41 | +- `"authors"`: Should include "GhostTypes" |
| 42 | +- `"contact"`: URLs should use correct GitHub username |
| 43 | +- `"sources"`: Should point to correct repository URL |
| 44 | +- `"homepage"`: Should use correct username/org |
| 45 | +- `"issues"`: Should point to correct repository issues |
| 46 | + |
| 47 | +Check `gradle.properties`: |
| 48 | +```bash |
| 49 | +cat gradle.properties |
| 50 | +``` |
| 51 | + |
| 52 | +Verify: |
| 53 | +- `maven_group`: Should use correct organization (e.g., `io.github.ghosttypes`) |
| 54 | +- Any URLs or author fields |
| 55 | + |
| 56 | +#### Node/npm Projects |
| 57 | + |
| 58 | +Check `package.json`: |
| 59 | +```bash |
| 60 | +cat package.json |
| 61 | +``` |
| 62 | + |
| 63 | +Verify: |
| 64 | +- `"name"`: Should follow correct naming convention with org scope if applicable |
| 65 | +- `"author"`: Should be "GhostTypes" or include correct details |
| 66 | +- `"repository"`: URL should use correct GitHub username |
| 67 | +- `"bugs"`: URL should point to correct repository |
| 68 | +- `"homepage"`: Should use correct username/org |
| 69 | +- Any other URL fields |
| 70 | + |
| 71 | +**Critical**: Check for `package-lock.json`: |
| 72 | +```bash |
| 73 | +ls -la package-lock.json |
| 74 | +git check-ignore package-lock.json |
| 75 | +``` |
| 76 | + |
| 77 | +Verify: |
| 78 | +- `package-lock.json` exists (required for `npm ci` in CI/CD) |
| 79 | +- Not in `.gitignore` (should be committed) |
| 80 | +- If missing or ignored, warn user that GitHub Actions will fail with `npm ci` |
| 81 | + |
| 82 | +#### Go Projects |
| 83 | + |
| 84 | +Check `go.mod`: |
| 85 | +```bash |
| 86 | +cat go.mod |
| 87 | +``` |
| 88 | + |
| 89 | +Verify: |
| 90 | +- `module` path: Should use correct GitHub username (e.g., `github.com/GhostTypes/project-name`) |
| 91 | + |
| 92 | +#### Python Projects |
| 93 | + |
| 94 | +Check `pyproject.toml` or `setup.py`: |
| 95 | +```bash |
| 96 | +cat pyproject.toml 2>/dev/null || cat setup.py 2>/dev/null |
| 97 | +``` |
| 98 | + |
| 99 | +Verify: |
| 100 | +- `authors` / `author`: Should be "GhostTypes" |
| 101 | +- `homepage` / `urls`: Should use correct GitHub username |
| 102 | +- `repository`: Should point to correct repo URL |
| 103 | + |
| 104 | +**For UV projects**: Also check the `[tool.uv]` section if present and any `[project.urls]` entries. |
| 105 | + |
| 106 | +### 3. README and Documentation Audit |
| 107 | + |
| 108 | +Check README and other documentation for outdated links: |
| 109 | + |
| 110 | +```bash |
| 111 | +cat README.md |
| 112 | +find . -name "*.md" -type f | grep -v node_modules | head -10 |
| 113 | +``` |
| 114 | + |
| 115 | +Look for and update: |
| 116 | +- GitHub repository links (should use GhostTypes or correct org) |
| 117 | +- GitHub badge URLs (shields.io badges, workflow badges, etc.) |
| 118 | +- Any references to old usernames or placeholder names |
| 119 | +- Documentation links that should point to the correct repo |
| 120 | +- Installation instructions that reference the repo |
| 121 | + |
| 122 | +### 4. Development Artifacts Scan |
| 123 | + |
| 124 | +Scan for leftover development files that may not be needed in production: |
| 125 | + |
| 126 | +#### Development Planning/Tracking Files |
| 127 | + |
| 128 | +Look for markdown files typically generated during development: |
| 129 | +```bash |
| 130 | +find . -type f \( -name "*plan*.md" -o -name "*todo*.md" -o -name "*roadmap*.md" -o -name "*implementation*.md" -o -name "*spec*.md" -o -name "*design*.md" -o -name "*notes*.md" -o -name "*blueprint*.md" -o -name "*tracker*.md" -o -name "*bugs*.md" -o -name "*features*.md" \) | grep -v node_modules | grep -v .git |
| 131 | +``` |
| 132 | + |
| 133 | +**Action**: Present findings to user and ask what to do with each file: |
| 134 | +- Keep in repo (in a `docs/` or `dev-docs/` folder) |
| 135 | +- Delete |
| 136 | +- Keep for now (user will handle manually) |
| 137 | + |
| 138 | +#### Test Scripts and Temporary Files |
| 139 | + |
| 140 | +Look for standalone test scripts and temporary files in the root: |
| 141 | +```bash |
| 142 | +# Test scripts |
| 143 | +find . -maxdepth 2 -type f \( -name "test*.js" -o -name "test*.py" -o -name "test*.go" -o -name "*_test_*.py" -o -name "debug*.js" -o -name "scratch*.py" \) | grep -v node_modules | grep -v __tests__ | grep -v tests/ |
| 144 | + |
| 145 | +# Log files |
| 146 | +find . -type f \( -name "*.log" -o -name "*.log.*" \) | grep -v node_modules | head -20 |
| 147 | + |
| 148 | +# Temporary files |
| 149 | +find . -maxdepth 2 -type f \( -name "*.tmp" -o -name "*.temp" -o -name "temp_*" -o -name "tmp_*" \) | grep -v node_modules |
| 150 | +``` |
| 151 | + |
| 152 | +**Action**: Present findings to user and recommend deletion unless they serve a specific purpose. |
| 153 | + |
| 154 | +#### Build Artifacts and Cache Files |
| 155 | + |
| 156 | +Check for build artifacts that shouldn't be in the repo: |
| 157 | +```bash |
| 158 | +# Common build/cache directories (should be in .gitignore) |
| 159 | +ls -la | grep -E "(dist|build|out|target|__pycache__|.cache|.next|.nuxt)" |
| 160 | + |
| 161 | +# Check .gitignore exists and is comprehensive |
| 162 | +cat .gitignore 2>/dev/null |
| 163 | +``` |
| 164 | + |
| 165 | +**Action**: Verify these are properly ignored. If not, recommend adding to `.gitignore`. |
| 166 | + |
| 167 | +### 5. GitHub-Specific Files |
| 168 | + |
| 169 | +Check for proper GitHub configuration: |
| 170 | + |
| 171 | +```bash |
| 172 | +# Check for GitHub Actions workflows |
| 173 | +ls -la .github/workflows/ 2>/dev/null |
| 174 | + |
| 175 | +# Check for issue/PR templates |
| 176 | +ls -la .github/ISSUE_TEMPLATE/ 2>/dev/null |
| 177 | +ls -la .github/PULL_REQUEST_TEMPLATE.md 2>/dev/null |
| 178 | +``` |
| 179 | + |
| 180 | +Verify any hardcoded URLs or usernames in these files. |
| 181 | + |
| 182 | +**Workflow Trigger Audit**: Check each workflow file for proper path filtering to prevent unnecessary runs: |
| 183 | + |
| 184 | +```bash |
| 185 | +# List all workflows |
| 186 | +find .github/workflows -name "*.yml" -o -name "*.yaml" |
| 187 | +``` |
| 188 | + |
| 189 | +For each workflow, verify triggers are configured appropriately: |
| 190 | + |
| 191 | +**Bad** (triggers on ANY file change): |
| 192 | +```yaml |
| 193 | +on: |
| 194 | + push: |
| 195 | + branches: [ main ] |
| 196 | + pull_request: |
| 197 | +``` |
| 198 | +
|
| 199 | +**Good** (triggers only on relevant changes): |
| 200 | +```yaml |
| 201 | +on: |
| 202 | + push: |
| 203 | + branches: [ main ] |
| 204 | + paths: |
| 205 | + - 'src/**' |
| 206 | + - 'package.json' |
| 207 | + - 'package-lock.json' |
| 208 | + - '.github/workflows/ci.yml' |
| 209 | + pull_request: |
| 210 | + paths: |
| 211 | + - 'src/**' |
| 212 | + - 'package.json' |
| 213 | + - 'package-lock.json' |
| 214 | +``` |
| 215 | +
|
| 216 | +Common path patterns by project type: |
| 217 | +- **Node/npm**: `src/**`, `*.js`, `*.ts`, `package.json`, `package-lock.json` |
| 218 | +- **Python**: `src/**`, `*.py`, `pyproject.toml`, `requirements.txt`, `uv.lock` |
| 219 | +- **Go**: `**/*.go`, `go.mod`, `go.sum` |
| 220 | +- **Fabric mods**: `src/**`, `*.java`, `gradle.properties`, `fabric.mod.json` |
| 221 | + |
| 222 | +Files that should NOT trigger CI (add to exclusions or omit from paths): |
| 223 | +- `README.md`, `*.md` (unless testing docs) |
| 224 | +- `.gitignore`, `.editorconfig` |
| 225 | +- `LICENSE` |
| 226 | +- `docs/**` (unless you have doc tests) |
| 227 | + |
| 228 | +**Action**: For workflows without path filtering, suggest adding appropriate filters based on project type. |
| 229 | + |
| 230 | +### 6. Generate Summary Report |
| 231 | + |
| 232 | +After completing all checks, provide a structured summary: |
| 233 | + |
| 234 | +1. **Metadata Issues Found**: List all files that need username/org updates |
| 235 | +2. **README/Docs Issues**: List documentation files with incorrect links |
| 236 | +3. **CI/CD Issues**: |
| 237 | + - Missing or ignored `package-lock.json` for Node projects |
| 238 | + - Workflows without proper path filtering (wasting CI minutes) |
| 239 | +4. **Development Artifacts**: Categorized list of files requiring user decision |
| 240 | +5. **Recommendations**: Suggested actions for cleanup and optimization |
| 241 | + |
| 242 | +### 7. Interactive Cleanup |
| 243 | + |
| 244 | +For each category of issues found: |
| 245 | +- Present findings clearly |
| 246 | +- Ask user for preferences (keep/delete/move for dev artifacts) |
| 247 | +- Execute approved changes |
| 248 | +- Confirm completion |
| 249 | + |
| 250 | +## Important Notes |
| 251 | + |
| 252 | +- **Always ask before deleting**: Never delete files without explicit user confirmation |
| 253 | +- **Be thorough but focused**: Check all metadata files but don't get lost in non-metadata code files |
| 254 | +- **Respect .gitignore**: Files already gitignored are less urgent to address |
| 255 | +- **Support monorepos**: A single repo might have multiple project types |
| 256 | +- **Username is case-sensitive**: Use "GhostTypes" exactly (capital G and T) |
| 257 | +- **Preserve functionality**: Only suggest removing files that are clearly development artifacts, not files that might be part of the project's functionality |
| 258 | + |
| 259 | +## Common Development Artifact Patterns |
| 260 | + |
| 261 | +Files often created during development that may need cleanup: |
| 262 | +- `*-plan.md`, `*-implementation.md`, `*-spec.md` |
| 263 | +- `TODO.md`, `ROADMAP.md`, `NOTES.md` |
| 264 | +- `BLUEPRINT.md`, `DESIGN_DOC.md` |
| 265 | +- `test-*.js/py/go` (in root, not in test directories) |
| 266 | +- `debug-*.js/py`, `scratch-*.py` |
| 267 | +- `*.log`, `*.log.*` files |
| 268 | +- `temp_*.ext`, `tmp_*.ext` |
| 269 | +- Files with names like "old_", "backup_", "draft_" |
0 commit comments