一键导入
nazgul-reset
Reset Nazgul state to a clean slate. Archives current state and recreates from templates. Use when Nazgul gets into a corrupted or confusing state.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Reset Nazgul state to a clean slate. Archives current state and recreates from templates. Use when Nazgul gets into a corrupted or confusing state.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Connect Nazgul task tracking to an external project board (GitHub Projects, Azure DevOps, etc). Use when user says "connect to github projects", "set up board", "track on github", or "nazgul board".
Start or resume a Nazgul autonomous development loop. Use when user says "start nazgul", "run nazgul", "begin development", "resume the loop", or passes an objective for new work. Auto-detects project state — no arguments needed.
Check the current state of a Nazgul autonomous loop. Use when asked about loop progress, task status, iteration count, review board status, or how the Nazgul loop is going.
Run one Nazgul automation-heartbeat tick — triages the work inbox and auto-starts the next objective if idle. Opt-in and default-off; fired by an optional Claude Code native scheduled agent (routine) or run by hand. Use when asked to "run a heartbeat tick", "check the inbox", or to test/debug the heartbeat.
View Nazgul run history — iteration timeline, task completions, review verdicts, git commits. Use after an overnight run to see what happened.
Brainstorm a new idea/objective into a Nazgul spec and tasks, then optionally run it. Interactive design front-end — produces a per-idea spec and a ready-to-execute task plan.
| name | nazgul:reset |
| description | Reset Nazgul state to a clean slate. Archives current state and recreates from templates. Use when Nazgul gets into a corrupted or confusing state. |
| allowed-tools | Read, Write, Bash, Glob, ToolSearch |
| metadata | {"author":"Jose Mejia","version":"2.7.1"} |
/nazgul:reset — Archive current state and reset to clean slate (with confirmation)/nazgul:reset --hard — Reset immediately without confirmation prompt/nazgul:reset --preserve-context — Reset but keep the context/ directory intact$ARGUMENTS
test -f nazgul/config.json && echo "YES" || echo "NO"ls nazgul/tasks/TASK-*.md 2>/dev/null | wc -l | tr -d ' 'ls nazgul/checkpoints/iteration-*.json 2>/dev/null | wc -l | tr -d ' 'Pre-load: Run ToolSearch with query select:AskUserQuestion to load the interactive prompt tool (deferred by default). Do this BEFORE any step that uses AskUserQuestion.
Reset Nazgul state to a clean slate by archiving existing state and recreating from templates.
If config does not exist (shows "NO"):
/nazgul:init to set up."Check $ARGUMENTS for flags:
--hard — Skip confirmation, proceed immediately--preserve-context — Keep the nazgul/context/ directory intact (architecture map, style conventions, test strategy, etc.)Unless --hard flag is present, show the summary, then use AskUserQuestion to confirm:
First, display what will be archived:
Nazgul Reset
═══════════════════════════════════════
This will archive and reset the following:
- Plan: nazgul/plan.md
- Tasks: [N] task file(s)
- Checkpoints: [N] checkpoint file(s)
- Reviews: nazgul/reviews/
- Docs: nazgul/docs/
- Logs: nazgul/logs/
Context directory: [WILL BE RESET | WILL BE PRESERVED (--preserve-context)]
Everything will be archived to nazgul/archive/[timestamp]/ before deletion.
Then use AskUserQuestion:
If Abort: stop immediately.
Generate a timestamp-based archive directory:
ARCHIVE_DIR="nazgul/archive/$(date +%Y-%m-%d-%H%M%S)"
mkdir -p "$ARCHIVE_DIR"
Move the following into the archive directory (if they exist):
nazgul/plan.md → $ARCHIVE_DIR/plan.mdnazgul/tasks/ → $ARCHIVE_DIR/tasks/nazgul/checkpoints/ → $ARCHIVE_DIR/checkpoints/nazgul/reviews/ → $ARCHIVE_DIR/reviews/nazgul/docs/ → $ARCHIVE_DIR/docs/nazgul/logs/ → $ARCHIVE_DIR/logs/If --preserve-context is NOT set:
8. nazgul/context/ → $ARCHIVE_DIR/context/
Use mv for each item. Skip items that do not exist.
nazgul/config.json and extract project.* fields (project name, language, framework, test command, etc.)nazgul/config.json with:
project.* fields restoredpaused: falsecurrent_iteration: 0objective: nullobjectives_history array (the old history is in the archive)Use jq for all JSON manipulation:
# Extract project fields from current config
PROJECT=$(jq '.project' nazgul/config.json)
# After writing fresh config, restore project fields
jq --argjson project "$PROJECT" '.project = $project' nazgul/config.json > nazgul/config.json.tmp && mv nazgul/config.json.tmp nazgul/config.json
Ensure the following empty directories exist for the next run:
mkdir -p nazgul/tasks
mkdir -p nazgul/checkpoints
mkdir -p nazgul/reviews
mkdir -p nazgul/docs
mkdir -p nazgul/logs
If --preserve-context was NOT set:
mkdir -p nazgul/context
Nazgul Reset Complete
═══════════════════════════════════════
Archived to: nazgul/archive/[timestamp]/
- Plan: [archived | not found]
- Tasks: [N] file(s) archived
- Checkpoints: [N] file(s) archived
- Reviews: [archived | not found]
- Docs: [archived | not found]
- Logs: [archived | not found]
- Context: [archived | PRESERVED]
Config reset with project settings preserved.
Next steps:
- /nazgul:start Start a fresh run
- /nazgul:start "objective" Start with a specific objective
- /nazgul:status Verify clean state