JordanGunn/nunchuck / skills/task/task-close
task-close
VerifiedClose a task by setting state to closed, recording close_reason and closed_at. Recomputes intent hash and clears `.tasks/.active` if it pointed to this task.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 589 B |
| references/00_ROUTER.md | markdown | 509 B |
| references/01_SUMMARY.md | markdown | 249 B |
| references/02_TRIGGERS.md | markdown | 365 B |
| references/03_ALWAYS.md | markdown | 313 B |
| references/04_NEVER.md | markdown | 238 B |
| references/05_PROCEDURE.md | markdown | 617 B |
| references/06_FAILURES.md | markdown | 276 B |
| references/07_INSTRUCTIONS.md | markdown | 382 B |
| references/08_PROCEDURE.md | markdown | 339 B |
| scripts/include/pyproject.toml | manifest | 280 B |
| scripts/include/task_close_cli.py | script | 1.7 KB |
| scripts/include/task_hash.py | script | 2.2 KB |
| scripts/include/task_parse.py | script | 2.4 KB |
| scripts/include/task_time.py | script | 1.3 KB |
| scripts/run.shexecutable | script | 213 B |
| scripts/validate.shexecutable | script | 641 B |
scripts/include/task_close_cli.py
View on GitHub#!/usr/bin/env python3
"""Task Close CLI - Close a task."""
import argparse
import sys
from task_hash import compute_intent_hash
from task_parse import (
get_task_path,
parse_task_file,
read_active_task,
serialize_task,
write_active_task,
)
from task_time import now_utc, to_rfc3339
def cmd_close(args: argparse.Namespace) -> int:
"""Close a task."""
task_id = args.id
task_path = get_task_path(task_id)
if not task_path.exists():
print(f"error: task '{task_id}' not found", file=sys.stderr)
return 1
fm, body = parse_task_file(task_path)
if fm.get("state") == "closed":
print(f"error: task '{task_id}' is already closed", file=sys.stderr)
return 1
now = to_rfc3339(now_utc())
fm["state"] = "closed"
fm["close_reason"] = args.reason
fm["closed_at"] = now
fm["updated_at"] = now
content = serialize_task(fm, body)
intent_hash = compute_intent_hash(content)
fm["intent_hash"] = intent_hash
final_content = serialize_task(fm, body)
task_path.write_text(final_content, encoding="utf-8")
print(f"closed: {task_id} ({args.reason})")
active_id = read_active_task()
if active_id == task_id:
write_active_task(None)
print("cleared: .tasks/.active")
return 0
def main() -> int:
parser = argparse.ArgumentParser(prog="task-close", description="Close a task")
parser.add_argument("id", help="Task ID to close")
parser.add_argument("--reason", choices=["completed", "abandoned"], required=True)
args = parser.parse_args()
return cmd_close(args)
if __name__ == "__main__":
sys.exit(main())
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |