reset-code
npx machina-cli add skill brsbl/ottonomous/reset-code --openclawReset project to freshly installed plugin state. Can selectively reset parts or do a full reset.
Available Targets
| Target | Removes | Description |
|---|---|---|
diffs | .claude/skill-diffs/ | Skill diff previews |
otto | .otto/ | All workflow data |
code | src/, dist/, public/, configs | Generated app code |
deps | node_modules/, lockfiles | Dependencies |
all | Everything except allowlist | Full reset (default) |
Usage Examples
/reset-code- Full reset (prompts for confirmation)/reset-code diffs- Clear only skill diff previews/reset-code otto- Clear workflow data (same as/reset)/reset-code code- Clear generated code, keep deps/reset-code deps- Clear node_modules only
Preserved Files (allowlist)
Only these survive a full reset:
.claude/- Settings.claude-plugin/- Marketplace metadataskills/- Plugin skills.git/- Version controlREADME.md,LICENSE,.gitignore,.gitmodules
Removed Files (full reset)
Everything else, including:
.otto/- Workflow datasrc/,dist/,public/- App codenode_modules/- Dependenciespackage.json, lockfiles- Framework dirs (
.next/,.nuxt/, etc.) - Build configs (
vite.config.*,tsconfig*.json)
Workflow
1. Parse Arguments
Map targets to paths:
diffs -> .claude/skill-diffs/
otto -> .otto/
code -> src/, dist/, public/, *.config.*, tsconfig*.json, package.json
deps -> node_modules/, package-lock.json, yarn.lock, pnpm-lock.yaml
all -> everything except allowlist
2. Kill Active Processes (if otto or all targeted)
for pid_file in .otto/sessions/*/browser.pid .otto/otto/sessions/*/browser.pid; do
[ -f "$pid_file" ] && kill $(cat "$pid_file") 2>/dev/null || true
done
3. Preview Removal
For selective targets, show targeted paths:
du -sh <target_paths> 2>/dev/null
For full reset (all), list everything to remove:
to_remove=()
for item in ./* ./.*; do
[[ ! -e "$item" ]] && continue
name="${item##*/}"
case "$name" in
.|..|.claude|.claude-plugin|skills|.git|README.md|LICENSE|.gitignore|.gitmodules) ;;
*) to_remove+=("$item") ;;
esac
done
if [[ ${#to_remove[@]} -gt 0 ]]; then
du -sh "${to_remove[@]}" 2>/dev/null | sort -hr
fi
4. Confirm
Use AskUserQuestion:
"This will delete [target description]. Continue?" Options: "Yes, reset" / "Cancel"
5. Remove
For selective targets:
rm -rf <target_paths>
For full reset (all):
find . -maxdepth 1 \
! -name '.' \
! -name '.claude' \
! -name '.claude-plugin' \
! -name 'skills' \
! -name '.git' \
! -name 'README.md' \
! -name 'LICENSE' \
! -name '.gitignore' \
! -name '.gitmodules' \
-exec rm -rf {} +
6. Report
Reset complete. Cleared: [targets]
Run /otto to start a new build.
Source
git clone https://github.com/brsbl/ottonomous/blob/main/.claude/skills/reset-code/SKILL.mdView on GitHub Overview
reset-code performs a full or partial reset of the ottonomous plugin project. It removes generated code, workflow data, and dependencies while preserving plugin files and git history. The operation is destructive and requires confirmation.
How This Skill Works
The tool maps user targets (diffs, otto, code, deps, all) to specific paths, optionally kills active workflow processes, previews what will be removed, prompts for confirmation, and then deletes the targeted files. It ends with a report showing what was cleared and how to start a fresh build.
When to Use It
- Reset everything to a freshly installed plugin state (default all).
- Clear only skill diff previews without touching code or history (diffs).
- Wipe all workflow data while keeping plugin files intact (otto).
- Remove generated app code but keep dependencies (code).
- Refresh dependencies and lockfiles to resolve issues (deps).
Quick Start
- Step 1: /reset-code [target] (default: all).
- Step 2: Confirm when prompted; destructive action will proceed.
- Step 3: Review the report and run /otto to start a new build.
Best Practices
- Expect confirmation before any destructive action and back up important data.
- Understand which targets you are clearing to avoid unintended data loss.
- Rely on the allowlist to preserve essential files like .claude, .claude-plugin, skills, and git history.
- After a full reset, run /otto to trigger a fresh build and verify the plugin loads.
- Test selectively after partial resets to confirm only desired areas were affected.
Example Use Cases
- Admin runs /reset-code for a full reset to recover from a build glitch.
- Developer uses /reset-code diffs to clear only the visual skill diff previews.
- Ops clears workflow data with /reset-code otto to troubleshoot automation.
- Engineer regenerates app code while keeping dependencies via /reset-code code.
- Team refreshes environment by running /reset-code deps to reinstall node modules.