{"data":{"slug":"discovered-6e80fadc5dd3dc1316c635020faf2173db33c5178e813af1","title":"Devxkit Safe Stash","summary":"Preserve tracked and untracked work before running `devxkit agent slice start` to avoid 'Working tree is not clean' errors.","url":"https:\/\/skillshunter.net\/skills\/discovered-6e80fadc5dd3dc1316c635020faf2173db33c5178e813af1","json_url":"https:\/\/skillshunter.net\/api\/public\/v1\/skills\/discovered-6e80fadc5dd3dc1316c635020faf2173db33c5178e813af1","markdown_url":"https:\/\/skillshunter.net\/skills\/discovered-6e80fadc5dd3dc1316c635020faf2173db33c5178e813af1.md","download_url":"https:\/\/skillshunter.net\/skills\/discovered-6e80fadc5dd3dc1316c635020faf2173db33c5178e813af1\/download","category":{"slug":"software-development","name":"Software & Development"},"editor_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.","instructions":"---\nname: devxkit-safe-stash\ndescription: Preserve tracked and untracked work before devxkit agent slice start.\nscope: global\ndevxkit_commands:\n  - devxkit agent slice start\n---\n\n# devxkit safe stash\n\nLegacy prepared-slice compatibility only. Ordinary work uses an isolated\nworktree and preserves the human checkout; do not stash another task.\n\n## When to use\n\n- `devxkit agent slice start <issue>` fails with **Working tree is not clean**\n- You have WIP (including **untracked** files) that must survive branch checkout\n- Before starting any issue-backed slice on the configured base (default `main`)\n\n## Preconditions\n\n- You understand stash pop may cause conflicts if the same files changed on the new branch\n- Prefer stash over discarding work; never use destructive clean without explicit user approval\n\n## Commands\n\n```bash\ngit status --short\n\ngit stash push -u -m \"wip before devxkit slice <issue>\"\ndevxkit agent slice start <issue>\n\n# Or let devxkit stash automatically:\ndevxkit agent slice start <issue> --stash\n\ngit stash list --date=local | head\ngit stash pop\ngit status --short\n```\n\nManual sequence if `--stash` is not used:\n\n```bash\ngit stash push -u -m \"wip before devxkit slice <issue>\"\ndevxkit agent slice start <issue>\ngit stash pop\n```\n\n## Validation\n\n- `git status --short` is empty (or only expected slice artifacts) **before** `slice start`\n- After `stash pop`, review status; resolve conflicts before `devxkit agent validate`\n- Stash entry visible in `git stash list` until popped\n\n## Common failures\n\n- **Untracked files block slice start** \u2192 always use `-u` \/ `--stash`\n- **Stash pop conflicts** \u2192 resolve manually; do not force-merge or `git clean`\n- **`--stash` but still dirty** \u2192 doctor message lists remaining paths; stash again or commit WIP elsewhere\n- **Lost work fear** \u2192 verify stash with `git stash list` before continuing\n\n## Stop conditions\n\n- Do **not** run `git clean -fdx` or other destructive cleanup unless the user explicitly authorizes it\n- Do **not** proceed with slice start while tree is dirty\n- Stop and report if stash pop produces conflicts you cannot resolve safely\n\n## Related skills\n\n- `devxkit-agent-flow`\n","use_cases":["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"],"limitations":[],"compatibility":[],"setup_tip":null,"sample_input":null,"sample_output":null,"source_url":"https:\/\/github.com\/jesuserro\/devxkit\/blob\/0380bd30488627f7232a08c38ebc0c7dd9a66dc3\/src\/devxkit\/assets\/skills\/devxkit\/devxkit-safe-stash\/SKILL.md","source_commit":"0380bd30488627f7232a08c38ebc0c7dd9a66dc3","license":null,"version":null,"listing_approved_at":"2026-11-29","created_at":"2026-11-28T18:48:50.000000Z","updated_at":"2026-11-29T10:53:27.000000Z","seo_title":"Devxkit Safe Stash - Git Workflow for Devxkit Agent Slice Start","seo_description":"A guide to using `devxkit safe stash` to preserve untracked and tracked work before starting a Devxkit agent slice.","seo_keywords":["devxkit safe stash","git stash","devxkit agent slice start","working tree not clean","preserve untracked files","devxkit workflow"]}}