JordanGunn/nunchuck / skills/task/task-create
task-create
VerifiedCreate a new task file in `.tasks/<id>.md` from template. Sets timestamps, computes initial intent hash, and optionally auto-selects the task.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 556 B |
| references/00_ROUTER.md | markdown | 509 B |
| references/01_SUMMARY.md | markdown | 346 B |
| references/02_TRIGGERS.md | markdown | 453 B |
| references/03_ALWAYS.md | markdown | 358 B |
| references/04_NEVER.md | markdown | 273 B |
| references/05_PROCEDURE.md | markdown | 625 B |
| references/06_FAILURES.md | markdown | 306 B |
| references/07_INSTRUCTIONS.md | markdown | 440 B |
| references/08_PROCEDURE.md | markdown | 303 B |
| scripts/include/pyproject.toml | manifest | 280 B |
| scripts/include/task_create_cli.py | script | 2.4 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 | 214 B |
| scripts/validate.shexecutable | script | 644 B |
scripts/include/task_parse.py
View on GitHub"""Parse task files with YAML frontmatter."""
import re
from pathlib import Path
from typing import Any
import yaml
FRONTMATTER_PATTERN = re.compile(r"^---\s*\n(.*?)\n---\s*\n?", re.DOTALL)
def parse_task_file(path: Path) -> tuple[dict[str, Any], str]:
"""
Parse a task file into frontmatter dict and body content.
Returns (frontmatter, body).
"""
content = path.read_text(encoding="utf-8")
return parse_task_content(content)
def parse_task_content(content: str) -> tuple[dict[str, Any], str]:
"""
Parse task content into frontmatter dict and body.
Returns (frontmatter, body).
"""
match = FRONTMATTER_PATTERN.match(content)
if not match:
return {}, content
frontmatter_str = match.group(1)
body = content[match.end():]
try:
frontmatter = yaml.safe_load(frontmatter_str) or {}
except yaml.YAMLError:
frontmatter = {}
return frontmatter, body
def serialize_task(frontmatter: dict[str, Any], body: str) -> str:
"""
Serialize frontmatter and body back to task file content.
"""
fm_str = yaml.dump(
frontmatter,
default_flow_style=False,
allow_unicode=True,
sort_keys=False,
)
return f"---\n{fm_str}---\n\n{body.lstrip()}"
def get_tasks_dir() -> Path:
"""Get the .tasks directory path (repo root)."""
return Path(".tasks")
def get_active_file() -> Path:
"""Get the .tasks/.active file path."""
return get_tasks_dir() / ".active"
def get_task_path(task_id: str) -> Path:
"""Get the path to a task file."""
return get_tasks_dir() / f"{task_id}.md"
def list_task_files() -> list[Path]:
"""List all task files in .tasks/ directory."""
tasks_dir = get_tasks_dir()
if not tasks_dir.exists():
return []
return sorted(tasks_dir.glob("*.md"))
def read_active_task() -> str | None:
"""Read the currently active task ID from .tasks/.active."""
active_file = get_active_file()
if not active_file.exists():
return None
content = active_file.read_text(encoding="utf-8").strip()
return content if content else None
def write_active_task(task_id: str | None) -> None:
"""Write the active task ID to .tasks/.active."""
active_file = get_active_file()
if task_id is None:
if active_file.exists():
active_file.unlink()
else:
active_file.write_text(task_id + "\n", encoding="utf-8")
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: 197k | 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 |