Skip to content

JordanGunn/nunchuck / skills/task/task-select

task-select

Verified

Select a task by writing its ID to `.tasks/.active`. Prints the selected task path and any suspicion flags (stale, hash mismatch) to encourage skepticism.

scripts/include/task_time.py

View on GitHub
"""Deterministic time utilities for task management."""

from datetime import datetime, timezone


def now_utc() -> datetime:
    """Return current UTC time."""
    return datetime.now(timezone.utc)


def to_rfc3339(dt: datetime) -> str:
    """Convert datetime to RFC3339 UTC string."""
    if dt.tzinfo is None:
        dt = dt.replace(tzinfo=timezone.utc)
    return dt.strftime("%Y-%m-%dT%H:%M:%SZ")


def from_rfc3339(s: str) -> datetime:
    """Parse RFC3339 UTC string to datetime."""
    s = s.rstrip("Z") + "+00:00"
    return datetime.fromisoformat(s)


def days_since(dt: datetime) -> int:
    """Return number of days since the given datetime."""
    now = now_utc()
    delta = now - dt
    return delta.days


def is_stale(
    last_reviewed_at: str | None,
    updated_at: str | None,
    created_at: str,
    threshold_days: int = 21,
) -> tuple[bool, str]:
    """
    Determine if a task is stale based on timestamps.
    
    Returns (is_stale, reason).
    """
    reference_str = last_reviewed_at or updated_at or created_at
    reference_dt = from_rfc3339(reference_str)
    age = days_since(reference_dt)
    
    if age >= threshold_days:
        source = "last_reviewed_at" if last_reviewed_at else ("updated_at" if updated_at else "created_at")
        return True, f"{age}d since {source}"
    return False, ""
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: 197kUpdated Claude CodeCodexVerifiedInstall
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: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
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: 194kUpdated Claude CodeCodexVerifiedInstall