skill-status-sync
- Repo stars 435
- Author updated Live
- Author repo nvim
- Domain
- Productivity
- Compatible agents
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- Trust score
- 88 / 100 · community maintained
- Author / version / license
- @benbrastmckie · no license declared
- Token usage
- Lean
- Setup complexity
- Guided setup
- External API key
- Not required
- Operating systems
- Unspecified (assume cross-platform)
- Runtime requirements
- No special requirements
- Permissions
-
- Read-only
- Write / modify
- Shell exec
- Network behavior
- Local-only
- Install commands
- 26 variants
Profile is derived at build time from SKILL.md and install vectors. Subject to drift from author intent.
Heads up: 未限定 allowed-tools,默认拥有全部工具权限。
---
name: skill-status-sync
description: Atomically update task status across TODO.md and state.json. For standalone use only. Direct exe…
category: productivity
runtime: no special runtime
---
# skill-status-sync output preview
## PART A: Task fit
- Use case: Atomically update task status across TODO.md and state.json. For standalone use only. Direct execution skill for atomic status synchronization across TODO.md and state.json. This skill executes inline without spawning a subagent, avoiding memory issues. runs entirely locally. Works with Claude Code, Cursor, Cline and 23 more..
- Inputs: target material, constraints, expected output, and acceptance criteria.
- Evidence boundary: follow “Context References / Standalone Use Only / Trigger Conditions” and do not present inference as author intent.
## PART B: Execution result
- **01** The card summarizes the use case; runtime output centers on “Atomically update task status across TODO.md and state.json. For standalone use only. Direct execution skill for atomic status synchronization across TODO.md and state.json. This skill executes inline without spawning a subagent, avoiding memory issues. runs entirely locally. Works with Claude Code, Cursor, Cline and 23 more.”.
- **02** When the source has headings, the agent prioritizes “Context References / Standalone Use Only / Trigger Conditions” so the result follows the author’s structure.
- **03** Typical output includes task judgment, concrete steps, required commands or file edits, validation, and follow-up options.
- **04** Risk context follows the fingerprint: read files, write/modify files, run shell commands; mostly runs locally; usually needs no extra API key.
## Running Rules
- read files, write/modify files, run shell commands; mostly runs locally; usually needs no extra API key.
- Validate with a small sample before expanding scope.
- Return the result, validation criteria, and next iteration options. The source mentions slash commands such as `/plan`, `/implement`, `/revise`; use them first when your agent supports command triggers.
Name target files or source material, expected output, forbidden changes, and whether network or shell access is allowed. Permission fingerprint: read files, write/modify files, run shell commands.
Start with a small task and check whether the result follows “Context References / Standalone Use Only / Trigger Conditions”. Inspect diffs, logs, previews, or tests before expanding scope.
Confirm the final output includes a concrete result, evidence, and next action. If it stays generic, tighten inputs, boundaries, and acceptance criteria.
---
name: skill-status-sync
description: Atomically update task status across TODO.md and state.json. For standalone use only. Direct exe…
category: productivity
source: benbrastmckie/nvim
---
# skill-status-sync
## When to use
- Atomically update task status across TODO.md and state.json. For standalone use only. Direct execution skill for atomi…
- Use it when the task has clear inputs, repeatable steps, and validation criteria.
## What to provide
- Target material, scope, expected result, and forbidden changes.
- Whether network, commands, file writes, or external services are allowed.
## Execution rules
- Organize steps around “Context References / Standalone Use Only / Trigger Conditions” and keep inference separate from source facts.
- read files, write/modify files, run shell commands; mostly runs locally; usually needs no extra API key.
- Validate with a small sample before expanding the task.
## Output requirements
- Return the deliverable, key evidence, validation method, and next action.
- Mark missing information as unknown; do not invent commands, platforms, or dependencies. The author source anchors workflow facts; repository files anchor sources and commands; Fluxly only adds fit, limitations, and quality judgment.
skill "skill-status-sync" {
input -> user goal + target files + boundaries + acceptance criteria
context -> Context References / Standalone Use Only / Trigger Conditions
rules -> SKILL.md triggers / order / output contract
runtime -> no special runtime | read files, write/modify files, run shell commands | mostly runs locally
guardrails -> usually needs no extra API key + small-sample validation + diff/log review
output -> copyable result + checklist + next iteration
} Status Sync Skill (Direct Execution)
Direct execution skill for atomic status synchronization across TODO.md and state.json. This skill executes inline without spawning a subagent, avoiding memory issues.
Context References
Reference (do not load eagerly):
- Path:
.claude/context/patterns/jq-escaping-workarounds.md- jq escaping patterns (Issue #1132)
Standalone Use Only
IMPORTANT: This skill is for STANDALONE USE ONLY.
Workflow skills (skill-researcher, skill-planner, skill-implementer, etc.) now handle their own preflight/postflight status updates inline. This eliminates the multi-skill halt boundary problem where Claude may pause between skill invocations.
Use this skill for:
- Manual task status corrections
- Standalone scripts that need to update task state
- Recovery operations when workflow skills fail
- Testing status update behavior in isolation
Do NOT use this skill in workflow commands (/research, /plan, /implement, /revise) - those commands now invoke a single skill that handles its own status updates.
Trigger Conditions
This skill activates when:
- Manual status correction is needed
- Artifacts need to be linked outside normal workflow
- Status synchronization recovery is needed between TODO.md and state.json
API Operations
This skill exposes three primary operations:
| Operation | Purpose | When to Use |
|---|---|---|
preflight_update |
Set in-progress status | GATE IN checkpoint |
postflight_update |
Set final status + link artifacts | GATE OUT checkpoint |
artifact_link |
Add single artifact link (idempotent) | Post-artifact creation |
Execution
1. Input Validation
Validate required inputs based on operation type:
For preflight_update:
task_number- Must be provided and exist in state.jsontarget_status- Must be an in-progress variant (researching, planning, implementing)session_id- Must be provided for traceability
For postflight_update:
task_number- Must be provided and existtarget_status- Must be a final variant (researched, planned, implemented, partial)artifacts- Array of {path, type} to linksession_id- Must be provided
For artifact_link:
task_number- Must be provided and existartifact_path- Relative path to artifactartifact_type- One of: research, plan, summary
2. Execute Operation Directly
Route to appropriate operation and execute using Bash (jq) and Edit tools.
Operation: preflight_update
Purpose: Set in-progress status at GATE IN checkpoint
Execution:
- Validate task exists:
task_data=$(jq -r --arg num "{task_number}" \
'.active_projects[] | select(.project_number == ($num | tonumber))' \
specs/state.json)
if [ -z "$task_data" ]; then
echo "Error: Task {task_number} not found"
exit 1
fi
- Update state.json:
jq --arg ts "$(date -u +%Y-%m-%dT%H:%M:%SZ)" --arg status "{target_status}" \
'(.active_projects[] | select(.project_number == {task_number})) |= . + {
status: $status,
last_updated: $ts
}' specs/state.json > specs/tmp/state.json && mv specs/tmp/state.json specs/state.json
- Update TODO.md status marker:
- Find task entry:
grep -n "^### {task_number}\." specs/TODO.md - Use Edit tool to change
[OLD_STATUS]to[NEW_STATUS]
- Find task entry:
Status Mapping:
| state.json | TODO.md |
|---|---|
| not_started | [NOT STARTED] |
| researching | [RESEARCHING] |
| planning | [PLANNING] |
| implementing | [IMPLEMENTING] |
Return: JSON object with status "synced" and previous/new status fields.
Operation: postflight_update
Purpose: Set final status and link artifacts at GATE OUT checkpoint
Execution:
- Update state.json status and timestamp:
jq --arg ts "$(date -u +%Y-%m-%dT%H:%M:%SZ)" --arg status "{target_status}" \
'(.active_projects[] | select(.project_number == {task_number})) |= . + {
status: $status,
last_updated: $ts
}' specs/state.json > specs/tmp/state.json && mv specs/tmp/state.json specs/state.json
- Add artifacts to state.json (for each artifact):
IMPORTANT: Use two-step jq pattern to avoid Issue #1132 escaping bug. See jq-escaping-workarounds.md.
# Step 1: Update timestamp
jq --arg ts "$(date -u +%Y-%m-%dT%H:%M:%SZ)" \
'(.active_projects[] | select(.project_number == {task_number})) |= . + {
last_updated: $ts
}' specs/state.json > specs/tmp/state.json && mv specs/tmp/state.json specs/state.json
# Step 2: Add artifact (append to array)
jq --arg path "{artifact_path}" \
--arg type "{artifact_type}" \
'(.active_projects[] | select(.project_number == {task_number})).artifacts += [{"path": $path, "type": $type}]' \
specs/state.json > specs/tmp/state.json && mv specs/tmp/state.json specs/state.json
Update TODO.md status marker:
- Use Edit to change status:
[RESEARCHING]->[RESEARCHED]
- Use Edit to change status:
Link artifacts in TODO.md:
- Add research/plan/summary links in appropriate location
Status Mapping:
| state.json | TODO.md |
|---|---|
| researched | [RESEARCHED] |
| planned | [PLANNED] |
| implemented | [IMPLEMENTED] |
| partial | [PARTIAL] |
Return: JSON object with target_status and artifacts_linked fields.
Operation: artifact_link
Purpose: Add single artifact link (idempotent)
Execution:
- Idempotency check:
if grep -A 30 "^### {task_number}\." specs/TODO.md | grep -q "{artifact_path}"; then
echo "Link already exists"
# Return "skipped" status
fi
- Add to state.json artifacts array:
IMPORTANT: Use two-step jq pattern to avoid Issue #1132 escaping bug. See jq-escaping-workarounds.md.
# Step 1: Update timestamp
jq --arg ts "$(date -u +%Y-%m-%dT%H:%M:%SZ)" \
'(.active_projects[] | select(.project_number == {task_number})) |= . + {
last_updated: $ts
}' specs/state.json > specs/tmp/state.json && mv specs/tmp/state.json specs/state.json
# Step 2: Add artifact (append to array)
jq --arg path "{artifact_path}" \
--arg type "{artifact_type}" \
'(.active_projects[] | select(.project_number == {task_number})).artifacts += [{"path": $path, "type": $type}]' \
specs/state.json > specs/tmp/state.json && mv specs/tmp/state.json specs/state.json
- Add link to TODO.md using Edit tool:
| Type | Format in TODO.md |
|---|---|
| research | Count-aware format (see "Artifact Linking Format" in state-management.md) |
| plan | Count-aware format (see "Artifact Linking Format" in state-management.md) |
| summary | Count-aware format (see "Artifact Linking Format" in state-management.md) |
Count-Aware Logic: Use inline format for 1 artifact, multi-line list for 2+. See state-management.md for detection patterns and insertion examples.
Insertion order:
- research: after Language line
- plan: after Research line (or Language if no Research)
- summary: after Plan line
Return: JSON object with status "linked" or "skipped".
Return Format
preflight_update returns:
{
"status": "synced",
"summary": "Updated task #{N} to [{STATUS}]",
"previous_status": "not_started",
"new_status": "researching"
}
postflight_update returns:
{
"status": "{target_status}",
"summary": "Updated task #{N} to [{STATUS}] with {M} artifacts",
"artifacts_linked": ["path1", "path2"],
"previous_status": "researching",
"new_status": "researched"
}
artifact_link returns:
{
"status": "linked|skipped",
"summary": "Linked artifact to task #{N}" | "Link already exists",
"artifact_path": "path/to/artifact.md",
"artifact_type": "research"
}
Error Handling
Task Not Found
Return failed status with recommendation to verify task number.
Invalid Status Transition
Return failed status with current status and allowed transitions.
File Write Failure
Return failed status with recommendation to check permissions.
jq Parse Failure
If jq commands fail with INVALID_CHARACTER or syntax error (Issue #1132):
- Log to errors.json with session_id and original command
- Retry with two-step pattern from
jq-escaping-workarounds.md - If retry succeeds, log recovery action
Integration Notes
For Workflow Commands: Do NOT use this skill directly. Workflow skills now handle their own status updates inline.
For Manual Operations: Use this skill for standalone status corrections:
### Manual Status Correction
Invoke skill-status-sync with:
- operation: preflight_update or postflight_update
- task_number: {N}
- target_status: {valid_status}
- session_id: manual_correction
- artifacts: [{path, type}, ...] (for postflight only)
This skill ensures:
- Atomic updates across both files
- Consistent jq/Edit patterns
- Proper error handling
- Direct execution without subagent overhead
Decide Fit First
Design Intent
How To Use It
Boundaries And Review