done
npx machina-cli add skill robzolkos/zolkos-agent-skills/done --openclawDone - Reset for next task
You are finishing up the current work and resetting the repo to be ready for the next task.
Steps
-
Check for uncommitted changes: Run
git status --porcelain. If there is ANY output (staged, unstaged, or untracked files), stop immediately and tell the user:- List the uncommitted/untracked files
- Tell them to commit or stash their changes before running
/done - Do NOT proceed to the next steps
-
Determine the default branch: Run
git branch --list master mainto check which exists. Prefermasterif it exists, otherwise usemain. If neither exists, tell the user that no master or main branch was found and stop. -
Switch to the default branch: Run
git checkout <branch>where<branch>is the branch determined in step 2. -
Pull latest changes: Run
git pullto fetch and merge the latest changes from the remote. -
Confirm: Tell the user they are now on the default branch with the latest changes and ready to start the next task.
Source
git clone https://github.com/robzolkos/zolkos-agent-skills/blob/master/skills/done/SKILL.mdView on GitHub Overview
This skill resets your workspace by ensuring no uncommitted changes exist, then switches to the repository's default branch (master or main) and pulls the latest commits. It ensures you start the next task from a clean, up-to-date codebase.
How This Skill Works
It first checks for uncommitted changes using git status --porcelain and stops if any output is shown. Then it lists master and main to decide the default branch, checks out that branch, and runs git pull to fetch and merge remote changes.
When to Use It
- Preparing for a new task after finishing the current one to avoid conflicts
- Starting a feature work in a clean working tree with the latest code
- Collaborating in a team to ensure you have the most recent changes from the default branch
- Automating task resets in a script to standardize environments
- Verifying the repository is on the correct branch before running builds or tests
Quick Start
- Step 1: Run git status --porcelain to verify a clean working tree
- Step 2: Detect the default branch with git branch --list master main and choose master if present
- Step 3: Checkout the default branch and run git pull, then you're ready for the next task
Best Practices
- Always run git status --porcelain first to confirm a clean working tree
- Do not proceed if there are uncommitted or untracked files; require commit or stash
- Automatically detect default branch by preferring master, then main
- After switching branches, run git pull to ensure you have the latest changes
- Confirm you are on the default branch and that the workspace is ready before starting the next task
Example Use Cases
- A developer finishes a feature and runs the reset to begin a bugfix with the latest master/main
- A CI bot uses this to prepare a fresh workspace for the next job in a pipeline
- A teammate runs the command when starting a new ticket to pull the freshest code
- A mentor scripts onboarding to keep templates up-to-date on the default branch
- A multi-repo workflow standardizes resets before running tests