Przejdź do treści
Biblioteka skilli
Programowanie · Przegląd i audyt

sweep

/sweep

Szuka w kodzie pozostałości debugowania i problemów jakości, takich jak console.log, debugger czy TODO, z opcją poprawy bezpiecznych wzorców.

Licencja
MIT
Ostatnia zmiana repozytorium
27.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
2
Przestarzałość

Brak sygnałów. Repozytorium zmienione 27.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Szuka w kodzie pozostałości debugowania i problemów jakości, takich jak console.log, debugger czy TODO, z opcją poprawy bezpiecznych wzorców.

Argumenty

/sweep [--fix] [--report] [--path <dir>] [--exclude <pattern>]
Oryginalny opis (EN)

Scan codebase for debug artifacts and code quality issues; optionally auto-fix safe patterns. Use when: before committing, during PR review, or periodic codebase cleanup. Not for: structural code improvement — use /refactor; security-specific scanning — use /scan. Keywords: sweep, debug cleanup, console.log, debugger, TODO, ts-any, code quality.

Jak działa

  1. Scan Patterns | 掃描模式
  2. Usage | 使用方式
  3. Workflow | 執行工作流程
  4. Configuration | 設定
  5. Next Steps Guidance | 下一步引導
  6. Related Standards | 相關標準
  7. Version History | 版本歷程
  8. License | 授權
Sekcje z nagłówków SKILL.md, w oryginale · 136 linii, 534 słów
Podgląd SKILL.md
---
name: sweep
scope: universal
description: |
  Scan codebase for debug artifacts and code quality issues; optionally auto-fix safe patterns.
  Use when: before committing, during PR review, or periodic codebase cleanup.
  Not for: structural code improvement — use /refactor; security-specific scanning — use /scan.
  Keywords: sweep, debug cleanup, console.log, debugger, TODO, ts-any, code quality.
allowed-tools: Read, Grep, Glob, Bash(find:*), Edit, Write
argument-hint: "[--fix] [--report] [--path <dir>] [--exclude <pattern>]"
---

# Sweep Assistant | 掃碼助手

> **Language**: English | 繁體中文

Scan the codebase for debug artifacts, code quality issues, and technical debt markers.
Optionally auto-fix safe patterns (console.log, debugger statements).

---

## Scan Patterns | 掃描模式

| Pattern ID | Label | Auto-fixable | Description |
|------------|-------|-------------|-------------|
| `console-log` | console.log / console.debug / console.trace | ✅ Yes | Debug output left in production code |
| `debugger` | debugger statement | ✅ Yes | Debugger breakpoints left in code |
| `todo-fixme` | TODO / FIXME / HACK / XXX | ❌ Report only | Technical debt markers |
| `ts-any` | TypeScript `any` type | ❌ Report only | Type safety violations |

---

## Usage | 使用方式

```bash
/sweep                        # Scan current directory, report findings
/sweep --fix                  # Scan and auto-fix fixable patterns
/sweep --report               # Scan and save report to .uds/sweep-report.json
/sweep --path src/            # Scan specific directory
/sweep --exclude "**/*.test.ts"  # Exclude patterns (glob)
```

---

## Workflow | 執行工作流程

### Step 1: Discover Files
Use Glob tool to find all source files under the target path.
Default excludes: `node_modules/`, `dist/`, `.git/`, `*.min.js`, `coverage/`.

### Step 2: Scan Each Pattern
For each pattern, use Grep to find matches across all files.
Collect findings: `{ file, line, column, pattern_id, label, fixable, content }`.

### Step 3: Report Findings
Output a structured summary:
```
📊 Sweep Results
─────────────────────────────────────
console-log:   12 findings  (auto-fixable)
debugger:       2 findings  (auto-fixable)
todo-fixme:    28 findings  (report only)
ts-any:         5 findings  (report only)
─────────────────────────────────────
Total: 47 findings  |  Fixable: 14
```

### Step 4: HITL Gate (if --fix and findings > 20)
If `--fix` flag is set AND total fixable findings exceed 20:
**Pause and require explicit user confirmation** before applying fixes.
Show the list of files that will be modified.

### Step 5: Apply Fixes (if --fix confirmed)
For each fixable finding:
- `console-log`: Remove the line if it contains only the console statement
- `debugger`: Remove the line if it contains only the debugger statement

Use Edit tool to apply changes file by file.
Report: "Fixed N findings in M files."

### Step 6: Save Report (if --report)
Write findings to `.uds/sweep-report.json`:
```json
{
  "timestamp": "<ISO8601>",
  "total_findings": 47,
  "fixable": 14,
  "fixed": 14,
  "findings_by_pattern": { "console-log": 12, "debugger": 2, "todo-fixme": 28, "ts-any": 5 },
  "files_modified": ["src/auth.ts", "src/utils.ts"]
}
```

---

## Configuration | 設定

Configure via `uds.project.yaml`:

```yaml
sweep:
  default_path: "src/"
  exclude_patterns:
    - "**/*.test.ts"
    - "**/*.spec.ts"
    - "**/fixtures/**"
  hitl_threshold: 20       # Require confirmation if fixable findings exceed this
  patterns:
    enabled:
      - console-log
      - debugger
      - todo-fixme
      - ts-any
```

---

## Next Steps Guidance | 下一步引導

After `/sweep` completes, suggest:

> - Run `/checkin` to verify overall code quality before committing
> - Run `/code-review` to review the cleaned-up changes
> - Run `/commit` to commit the fixes

---

## Related Standards | 相關標準

- [Checkin Standards](../../.standards/checkin-standards.ai.yaml) — Pre-commit quality gates
- [Code Review](../code-review-assistant/SKILL.md) — Code review assistant
- [Testing Guide](../testing-guide/SKILL.md) — Testing standards

---

## Version History | 版本歷程

| Version | Date | Changes |
|---------|------|---------|
| 1.0.0 | 2026-04-28 | Initial release — XSPEC-097 Phase 1 (從上游遷移) |

---

## License | 授權

This skill is released under [MIT License](https://opensource.org/licenses/MIT) and [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/).

Wersje

RepozytoriumWynikLicencja
Ta strona · AsiaOstrich/universal-dev-standards100MIT
tony/skills100MIT
AsiaOstrich/universal-dev-standards100MIT
AsiaOstrich/universal-dev-standards100MIT
andryorelabs/jobship100MIT
chrs-myrs/livespec100MIT
jisuzzzz/haechi100MIT
JunLin615/os-optics-kit100MIT
AsiaOstrich/universal-dev-standards100MIT

Migawka bazy z 13.11.2026 · wersja paczki 1c64d212210a (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100slop-scan
    Uruchamia analizę jakości kodu przez usługę Slop Bot, wykrywając zapachy kodu i problemy złożoności.
  • 100cleanup
    Przegląda repozytorium pod kątem duplikacji, zbędnej złożoności i problemów strukturalnych, tylko na wyraźne polecenie użytkownika.
  • 85codebase-sweep
    Przegląda całe repozytorium przy pełnym audycie, kontroli stanu lub sprzątaniu, zwracając ustalenia, a poprawki wprowadza w uzgodnionym zakresie.
  • 84scan-todos
    Przeszukuje komentarze w kodzie źródłowym pod kątem znaczników TODO, FIXME, HACK i XXX i dla każdego rozwiązuje problem lub zakłada zgłoszenie.
  • 95pr-review
    Przegląda pull request pod kątem poprawności, bezpieczeństwa, jakości kodu i testów oraz zwraca uwagi do poprawy.
  • 100warden-sweep
    Skanuje cały kod repozytorium narzędziem Warden, weryfikuje ustalenia głębokim śledzeniem i tworzy robocze pull requesty dla potwierdzonych problemów.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.