Listing Approved
Approved on: November 29, 2026
Devxkit Safe Stash
Preserve tracked and untracked work before running `devxkit agent slice start` to avoid 'Working tree is not clean' errors.
Editor's Note
Before using `devxkit agent slice start`, ensure the working tree is clean or use `--stash` to save untracked files. Verify the stash with `git stash list` before proceeding.
When to Use It
- Preserving untracked files before starting a Devxkit agent slice
- Resolving 'Working tree is not clean' errors when using `devxkit agent slice start`
- Managing WIP (work in progress) files during branch checkout
SKILL.md
SkillsHunter provides this listing for informational purposes only. Review the skill’s source, license, and required permissions before use. You are responsible for deciding whether to install or run it. Terms of Use
---
name: devxkit-safe-stash
description: Preserve tracked and untracked work before devxkit agent slice start.
scope: global
devxkit_commands:
- devxkit agent slice start
---
# devxkit safe stash
Legacy prepared-slice compatibility only. Ordinary work uses an isolated
worktree and preserves the human checkout; do not stash another task.
## When to use
- `devxkit agent slice start <issue>` fails with **Working tree is not clean**
- You have WIP (including **untracked** files) that must survive branch checkout
- Before starting any issue-backed slice on the configured base (default `main`)
## Preconditions
- You understand stash pop may cause conflicts if the same files changed on the new branch
- Prefer stash over discarding work; never use destructive clean without explicit user approval
## Commands
```bash
git status --short
git stash push -u -m "wip before devxkit slice <issue>"
devxkit agent slice start <issue>
# Or let devxkit stash automatically:
devxkit agent slice start <issue> --stash
git stash list --date=local | head
git stash pop
git status --short
```
Manual sequence if `--stash` is not used:
```bash
git stash push -u -m "wip before devxkit slice <issue>"
devxkit agent slice start <issue>
git stash pop
```
## Validation
- `git status --short` is empty (or only expected slice artifacts) **before** `slice start`
- After `stash pop`, review status; resolve conflicts before `devxkit agent validate`
- Stash entry visible in `git stash list` until popped
## Common failures
- **Untracked files block slice start** → always use `-u` / `--stash`
- **Stash pop conflicts** → resolve manually; do not force-merge or `git clean`
- **`--stash` but still dirty** → doctor message lists remaining paths; stash again or commit WIP elsewhere
- **Lost work fear** → verify stash with `git stash list` before continuing
## Stop conditions
- Do **not** run `git clean -fdx` or other destructive cleanup unless the user explicitly authorizes it
- Do **not** proceed with slice start while tree is dirty
- Stop and report if stash pop produces conflicts you cannot resolve safely
## Related skills
- `devxkit-agent-flow`
Community Reviews & Field Notes
Tried this skill on your own project? Share the model you used and the results you got.