SuperAPI AI Directory

work-log-claude

Agents & models

View repository

Updated 10-16 09:35

About this skill

Work Log Claude

Automatically generate work logs with semantic summaries based on conversation records of AI-assisted tools and git history.

How to Use

/work-log-claude <時間範圍> [結束日期] [--project <name>] [--output <mode>]

Time range: today | yesterday | this-week | this-month | YYYY-MM-DD Output mode: terminal | file | obsidian | all (default all)

Example:

/work-log-claude today
/work-log-claude yesterday --output terminal
/work-log-claude this-week --project example-app
/work-log-claude 2026-03-01 2026-03-11 --output file

Execution Flow

After receiving a user call, execute according to the following steps:

Step 1: Read configuration

Read the config.yamlin this skill's directory to obtain the following settings:

  • timezone(default Asia/Taipei)
  • output_dir(Markdown output directory, default docs/work-logs)
  • obsidian_vault(Obsidian vault path)
  • obsidian_folder(subfolder within the vault, default work-logs)
  • default_output(default output mode, default all)
  • claude_home(default ~/.claude)
  • codex_home(default ~/.codex)

If the configuration file does not exist, use the default values.

Step 2: Parse arguments

Extract from the user's call:

  • TIME_RANGE: first argument (required)
  • END_DATE: second argument (optional, used for a custom date range)
  • --project PROJECT: project filter (optional)
  • --output MODE: output mode (optional, defaults to default_output in config.yaml)

Step 3: Run the Parser

Use the Bash tool to run the Python parser and generate structured JSON containing git data:

SKILL_DIR="<skill_path>"
PYTHONPATH="$SKILL_DIR" python3 -m wl_parser.work_log_parser \
  TIME_RANGE \
  [END_DATE] \
  --timezone "TIMEZONE" \
  [--project "PROJECT"] \
  --claude-home "$HOME/.claude" \
  --codex-home "$HOME/.codex" \
  2>/dev/null > /tmp/wl_report.json

Replace placeholders with actual values.

Step 4: AI summary

Use the Read tool to read /tmp/wl_report.json。Only focus on the following fields:

  • projects: each project's short_name、git_commits(message + files_changed + insertions/deletions)、duration_minutes、session_count
  • summary:total_duration_minutes、project_count

No need to read sessions、tool_summary、token_summary(these are handled by the formatter).

Use the Read tool to read the prompts/summarize.md。

Following the guidance of the prompt template, generate the summary text. Use the Write tool to write the summary to /tmp/wl_summary.md。

Step 5: Format and output

First use the formatter CLI to generate the mechanical blocks:

terminal mode

SKILL_DIR="<skill_path>"
PYTHONPATH="$SKILL_DIR" python3 -m wl_parser.formatters terminal < /tmp/wl_report.json > /tmp/wl_formatted.md

Then display in order:

  1. /tmp/wl_summary.md 's content (AI summary)
  2. /tmp/wl_formatted.md 's content (work hour statistics + daily table)

file mode

SKILL_DIR="<skill_path>"
FILENAME="YYYY-MM-DD.md"  # 或 YYYY-MM-DD--YYYY-MM-DD.md 對範圍查詢
OUTPUT_PATH="docs/work-logs/$FILENAME"

PYTHONPATH="$SKILL_DIR" python3 -m wl_parser.formatters full_report < /tmp/wl_report.json > /tmp/wl_formatted.md

Use the Read tool to read /tmp/wl_summary.md and /tmp/wl_formatted.md. Use the Write tool to combine the two and write to $OUTPUT_PATH:

<wl_formatted.md 的標題行>

<wl_summary.md 內容>

<wl_formatted.md 標題行以下的內容>

Note:wl_formatted.md already includes the heading line; when combining, use wl_formatted.md 's heading, do not duplicate it.

obsidian mode

SKILL_DIR="<skill_path>"
OBSIDIAN_PATH="$OBSIDIAN_VAULT/$OBSIDIAN_FOLDER/YYYY-MM-DD.md"
mkdir -p "$(dirname "$OBSIDIAN_PATH")"

PYTHONPATH="$SKILL_DIR" python3 -m wl_parser.formatters obsidian < /tmp/wl_report.json > /tmp/wl_formatted.md

Use the Write tool to combine frontmatter + AI summary + formatted content and write to $OBSIDIAN_PATH。

all mode

Execute in order terminal → file → obsidian (the same /tmp/wl_report.json)。

Step 6: Report results

Inform the user:

  • Terminal summary has been displayed (terminal / all mode)
  • Markdown file has been written to the path (file / all mode)
  • Obsidian note has been written to the path (obsidian / all mode)

Notes

  • Skill Path: Replace <skill_path> with the absolute root directory of where the current agent loads this skill; do not assume it is installed in ~/.claude/skills/
  • First Use: Confirm the config.yaml 's obsidian_vault Path is correct
  • Codex support: only integrates session thread titles, does not parse SQLite
  • Timezone: all times are displayed in the timezone from config.yaml, default Asia/Taipei (UTC+8)
  • Git data: collects at most 50 commits per project, uses --stat instead of full diff
  • AI summary: generated by the Claude Code running the skill itself, does not call external APIs