SuperAPI AI Directory

tana-session-log

Coding & development

View repository

Updated 10-16 01:34

About this skill

Log Session to Tana

Write a session log to Tana for the current session. Requires a Tana MCP server with import-paste and calendar-node tools. In Claude Code these are mcp__tana-outliner-local__import_tana_paste and mcp__tana-outliner-local__get_or_create_calendar_node; in other agents use the equivalents.

Tana workspace ID: GbpulTT1pv Session tag ID: qB78NPBiRNBM (the tag is applied by ID, so renaming it in Tana won't break this skill)

Step 1: Gather context

  1. Project name: from the working directory, git remote, or package.json. If you can't tell, ask the user.
  2. Summary: 1-2 sentences on what was accomplished. If $ARGUMENTS is given, use it as extra context.
  3. Key changes: git diff --stat and git log --oneline -5 (skip if not a git repo).
  4. Status: Completed, In progress, Paused, or Failed, based on context.
  5. End time: now, local: date +"%Y-%m-%dT%H:%M:%S"
  6. Start time and token usage: run python3 scripts/session-stats.py (path relative to this skill's directory). It prints Start:, Output:, New input:, and Cache reads: lines for the most recent Claude Code transcript of the current directory.
    • If this session was already logged to Tana, log only the work since then: pass --since <previous entry's End time> and use that as the Start time.
    • To backfill a past entry, pass --since and --until with its Start and End times.
    • If the script exits non-zero (not Claude Code, no transcript), omit the Token usage block and take the start time from the user or your best estimate of the session start.

Write every timestamp as local time with no Z or offset (2026-10-05T21:22:56). Tana reads [[date:...]] values in local time, and a trailing Z makes it create a page named date:... instead of a date.

Step 2: Write to Tana

Get today's calendar node with get_or_create_calendar_node (workspaceId GbpulTT1pv, granularity day, date from date +%F). Use the returned node ID as parentNodeId for import_tana_paste with this content:

- Session: [brief title of what was done] #[[^qB78NPBiRNBM]]
  - Start time:: [[date:[local start timestamp]]]
  - End time:: [[date:[local end timestamp]]]
  - Project:: [project name]
  - Summary:: [1-2 sentence summary]
  - Status:: [Completed | In progress | Paused | Failed]
  - Key changes:
    - [change 1]
    - [change 2]
  - Token usage:
    - Output: [n]
    - New input: [n]
    - Cache reads: [n]

Use the script's three token lines as-is.

Step 3: Confirm

Tell the user what was logged, a brief summary of the entry, and that it was added to today's date in Tana.

Keep the summary concise. If the session covered several tasks, mention the most significant.