dev-reset-workspace
Clean the workspace of finished-work vestiges so new work can start from a fresh main branch
от Nebulavenus★ 51 звезда на GitHub
Установить dev-reset-workspace в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Reset the workspace to a clean state on main with no leftover branches,
uncommitted files, or background agents from previous work. Run this between
tasks to start fresh.
When to use this skill:
- After merging a PR and before starting new work
- When the workspace has accumulated stale branches or uncommitted files
- When background agents from a previous session may still be running
- Any time
git statusorgit diffis not clean and you want a fresh start
Arguments
--force(optional): Skip interactive prompts — auto-delete safe-to-remove files and stale branches without asking. Still preserves files that appear to contain meaningful uncommitted work.
Workflow
Work through each phase in order. Report findings at each phase before
acting. Unless --force is given, ask the user before destructive actions.
Phase 1 — Stop background agents
Check for running background tasks (agents, shells, builds) from previous work.
List running tasks: Use the TaskList tool (or
/tasksoutput) to find any in-progress background agents or shells.For each running task:
- Identify what it is doing (build, test, agent work, etc.)
- Determine if it is safe to stop — a task is safe to stop if:
- It belongs to a completed/merged PR
- It is idle or stuck
- It is a stale monitoring or polling loop
- A task is NOT safe to stop if:
- It is actively writing files that haven't been committed
- It is mid-push or mid-merge
Stop safe tasks using TaskStop. Report any tasks you chose not to stop and why.
If no tasks are running, report "No background tasks found" and proceed.
Phase 2 — Analyze uncommitted changes
Examine the working tree for any modifications or untracked files.
Run diagnostics in parallel:
git status --short git diff --stat git diff --cached --stat git log --oneline -10 git branch -vvIf the working tree is clean (no output from status/diff), skip to Phase 3.
For each uncommitted or untracked file, classify it:
Classification Action Examples Belongs to a merged PR Should have been committed — warn user Source files matching recent PR topics Build artifact / generated file Safe to delete or add to .gitignorebuild/,*.o,*.spv,shaders/compiled/Editor / OS junk Add to .git/info/exclude(local only).DS_Store,*.swp,.vscode/settings.jsonMeaningful new work Stash or warn — do NOT delete New lesson files, library changes Unknown Ask the user Anything ambiguous To classify files, check recent context:
# Recent merged PRs gh pr list --state merged --limit 5 # Recent branches (local and remote) git branch -a --sort=-committerdate | head -20 # What the current branch was working on git log --oneline HEAD...origin/main 2>/dev/nullReport findings in a table:
Uncommitted files analysis: ────────────────────────────────────────────── M lessons/gpu/17-normal-maps/main.c → Belongs to merged PR #42 (stale edit) ?? build/CMakeCache.txt → Build artifact (safe to delete) ?? .DS_Store → OS junk (add to local exclude) A lessons/gpu/30-new-lesson/main.c → New work (stash? ask user)Take action per classification:
- Merged-PR leftovers: Warn the user. These may be edits that should
have been in the PR. Offer to discard them (
git checkout -- <file>) or stash them. - Build artifacts already in
.gitignore: Delete withgit clean -fdfor those paths only (not a blanket clean). - Build artifacts NOT in
.gitignore: Offer to add them to.gitignoreand then delete. - Editor/OS junk: Add patterns to
.git/info/exclude(not.gitignore, since these are personal and shouldn't be committed). - Meaningful new work:
git stash push -m "dev-reset: uncommitted work". Report the stash entry so the user can recover it. - Unknown: Ask the user with AskUserQuestion (options: delete, stash, gitignore, local exclude, skip).
- Merged-PR leftovers: Warn the user. These may be edits that should
have been in the PR. Offer to discard them (
Phase 3 — Switch to main and pull latest
If not on
main:git checkout mainIf checkout fails due to uncommitted changes, go back to Phase 2 — something was missed.
Pull latest:
git pull origin mainVerify:
git status --short git diff --statBoth should produce no output. If not, investigate and resolve.
Phase 4 — Remove stale local branches
Find and delete local branches whose work has been merged into origin/main.
Fetch latest remote state:
git fetch --prune originFind merged branches:
git branch --merged origin/main \
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл dev-reset-workspace?
Clean the workspace of finished-work vestiges so new work can start from a fresh main branch
Как установить скилл dev-reset-workspace?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл dev-reset-workspace запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
AnthropicToolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
access
AnthropicManage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
configure
AnthropicSet up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
access
AnthropicManage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…