warden-sweep
БесплатноЗапускает вложенные скриптыНе проверенFull-repository code sweep. Scans every file with warden, verifies findings via deep tracing, creates draft PRs for validated issues. Use when asked to "sweep…
от getsentry★ 6 617 звёзд на GitHubОб этом скилле
Warden Sweep
Full-repository code sweep: scan every file, verify findings with deep tracing, create draft PRs for validated issues.
Requires: warden, gh, git, jq, uv
Important: Run all scripts from the repository root using ${CLAUDE_SKILL_ROOT}. Output goes to .warden/sweeps/<run-id>/.
Bundled Scripts
scripts/scan.py
Runs setup and scan in one call: generates run ID, creates sweep dir, checks deps, creates warden label, enumerates files, runs warden per file, extracts findings.
uv run ${CLAUDE_SKILL_ROOT}/scripts/scan.py [file ...]
--sweep-dir DIR # Resume into existing sweep dir
scripts/index_prs.py
Fetches open warden-labeled PRs, builds file-to-PR dedup index, caches diffs for overlapping PRs.
uv run ${CLAUDE_SKILL_ROOT}/scripts/index_prs.py <sweep-dir>
scripts/create_issue.py
Creates a GitHub tracking issue summarizing sweep results. Run after verification, before patching.
uv run ${CLAUDE_SKILL_ROOT}/scripts/create_issue.py <sweep-dir>
scripts/organize.py
Tags security findings, labels security PRs, updates finding reports with PR links, posts final results to tracking issue, generates summary report, finalizes manifest.
uv run ${CLAUDE_SKILL_ROOT}/scripts/organize.py <sweep-dir>
scripts/extract_findings.py
Parses warden JSONL log files and extracts normalized findings. Called automatically by scan.py.
uv run ${CLAUDE_SKILL_ROOT}/scripts/extract_findings.py <log-path-or-directory> -o <output.jsonl>
scripts/generate_report.py
Builds summary.md and report.json from sweep data. Called automatically by organize.py.
uv run ${CLAUDE_SKILL_ROOT}/scripts/generate_report.py <sweep-dir>
scripts/find_reviewers.py
Finds top 2 git contributors for a file (last 12 months).
uv run ${CLAUDE_SKILL_ROOT}/scripts/find_reviewers.py <file-path>
Returns JSON: {"reviewers": ["user1", "user2"]}
Phase 1: Scan
Run (1 tool call):
uv run ${CLAUDE_SKILL_ROOT}/scripts/scan.py
To resume a partial scan:
uv run ${CLAUDE_SKILL_ROOT}/scripts/scan.py --sweep-dir .warden/sweeps/<run-id>
Parse the JSON stdout. Save runId and sweepDir for subsequent phases.
Report to user:
## Scan Complete
Scanned **{filesScanned}** files, **{filesTimedOut}** timed out, **{filesErrored}** errors.
### Findings ({totalFindings} total)
| # | Severity | Skill | File | Title |
|---|----------|-------|------|-------|
| 1 | **HIGH** | security-review | `src/db/query.ts:42` | SQL injection in query builder |
...
Render every finding from the findings array. Bold severity for high and above.
On failure: If exit code 1, show the error JSON and stop. If exit code 2, show the partial results. List timed-out files separately from errored files so users know which can be retried.
Phase 2: Verify
Deep-trace each finding using Task subagents to qualify or disqualify.
For each finding in data/all-findings.jsonl:
Check if data/verify/<finding-id>.json already exists (incrementality). If it does, skip.
Launch a Task subagent (subagent_type: "general-purpose") for each finding. Process findings in parallel batches of up to 8 to improve throughput.
Task prompt for each finding:
Read ${CLAUDE_SKILL_ROOT}/references/verify-prompt.md for the prompt template. Substitute the finding's values into the ${...} placeholders.
Process results:
Parse the JSON from the subagent response and:
- Write result to
data/verify/<finding-id>.json - Append to
data/verified.jsonlordata/rejected.jsonl - For verified findings, generate
findings/<finding-id>.md:
# ${TITLE}
**ID**: ${FINDING_ID} | **Severity**: ${SEVERITY} | **Confidence**: ${CONFIDENCE}
**Skill**: ${SKILL} | **File**: ${FILE_PATH}:${START_LINE}
## Description
${DESCRIPTION}
## Verification
**Verdict**: Verified (${VERIFICATION_CONFIDENCE})
**Reasoning**: ${REASONING}
**Code trace**: ${TRACE_NOTES}
## Suggested Fix
${FIX_DESCRIPTION}
```diff
${FIX_DIFF}
Update manifest: set `phases.verify` to `"complete"`.
**Report** to user after all verifications:
Verification Complete
{verified} verified, {rejected} rejected.
Verified Findings
| # | Severity | Confidence | File | Title | Reasoning |
|---|---|---|---|---|---|
| 1 | HIGH | high | src/db/query.ts:42 |
SQL injection in query builder | User input flows directly into... |
| ... |
Rejected ({rejected_count})
{findingId}{file}: {reasoning} ...
---
## Phase 3: Issue
Create a tracking issue that ties all PRs together and gives reviewers a single overview.
**Run** (1 tool call):
```bash
uv run ${CLAUDE_SKILL_ROOT}/scripts/create_issue.py ${SWEEP_DIR}
Parse the JSON stdout. Save issueUrl and issueNumber for Phase 4.
Report to user:
## Tracking Issue Created
{issueU
Установить warden-sweep в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл warden-sweep?
Full-repository code sweep. Scans every file with warden, verifies findings via deep tracing, creates draft PRs for validated issues. Use when asked to "sweep the repo", "scan everything", "find all bugs", "full codebase review", "batch code analysis", or run warden across the entire repository.
Как установить скилл warden-sweep?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл warden-sweep запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic