Back to list
fpontejos

logwork

by fpontejos

0🍴 0📅 Jan 19, 2026

SKILL.md


name: logwork description: Manage work log sessions (start/end/status/add)

Logwork

Manage work log sessions. Argument provided: "$ARGUMENTS"

Usage

/logwork # Show current session status (default) /logwork status # Same as above - show status /logwork start # Start a new session /logwork start 14:30 # Start with custom time /logwork end # End current session /logwork end 17:00 # End with custom time /logwork add [note] # Add entry to current session

IMPORTANT: ALWAYS retrieve the current timestamp from the local machine using date '+%Y-%m-%d %H:%M:%S %Z'. NEVER guess or infer timestamps.


Step 0: Parse Arguments

Parse $ARGUMENTS to extract:

  • command: first word (start, end, status, add, or empty)
  • rest: everything after the command
InputCommandRest
(empty)status(empty)
statusstatus(empty)
startstart(empty)
start 14:30start14:30
endend(empty)
end 17:00end17:00
add Fixed the auth bugaddFixed the auth bug

Configuration

Gap Threshold

The gap threshold determines when a session is considered "stale" and should be closed.

Default: 2 hours

Location: logs/log_index.yaml

config:
  gap_threshold_hours: 2

If not set, use default of 2 hours.


Command: status (Default)

Read-only - Shows current session information without modifying anything.

Process

  1. Read logs/log_index.yaml
  2. Check if session is active (no ended key)
  3. Calculate duration if active
  4. Display status

Output Format

If session is active:

## Session Status

**Status**: 🟢 Active
**Started**: [timestamp]
**Duration**: [Xh Ym] (ongoing)
**Log file**: logs/[filename].md
**Entries**: [N] logged items

### Recent Entries
- [HH:MM] [entry 1]
- [HH:MM] [entry 2]

### Project Totals
- **Total tracked time**: [Xh Ym]
- **Sessions**: [N]

---
→ `/logwork add [note]` to log work
→ `/logwork end` to close session

If no active session:

## Session Status

**Status**: ⚪ No active session
**Last session**: [date] ([duration])
**Total tracked time**: [Xh Ym] across [N] sessions

---
→ `/logwork start` to begin a new session

If no log data exists:

## Session Status

**Status**: No time tracking data

Run `/logwork start` to begin tracking time.

Command: start

Start a new session.

Process

  1. Check for existing active session:

    • If active session exists, warn and ask to close it first
    • Or offer to close it automatically
  2. Determine timestamp:

    • Get current system time: date '+%Y-%m-%d %H:%M:%S %Z'
    • If time provided (e.g., start 14:30):
      • Parse it (accepts: "14:30", "14:30:00", "2026-01-19 14:30")
      • If only time given, use today's date
      • Add system timezone
      • Ask user to confirm: "Use [parsed timestamp] as start time?"
    • If no time: use current system time
  3. Create log file: logs/YYYY-MM-DD_NN.md

    • NN = next sequence number for that date
  4. Add frontmatter:

    ---
    title: Work Log
    started: [timestamp]
    ---
    
    ## Tasks Completed
    
  5. Update logs/log_index.yaml:

    current: YYYY-MM-DD_NN
    started: [timestamp]
    updated: [timestamp]
    sessions:
      - YYYY-MM-DD_NN
    
    • Remove ended key if present

Output

## Session Started

**Started**: [timestamp]
**Log file**: logs/[filename].md

Ready to track work. Use:
- `/logwork add [note]` to log completed work
- `/logwork end` when done

Command: end

End the current session.

Process

  1. Check for active session:

    • If no active session, show error
  2. Determine timestamp:

    • Same logic as start for custom time
  3. Calculate duration:

    • From started to end timestamp
    • Format: Xh Ym
  4. Update log file frontmatter:

    ---
    title: Work Log
    started: [start timestamp]
    ended: [end timestamp]
    duration: Xh Ym
    ---
    
  5. Append closing entry:

    ### [timestamp]
    
    1. [summary of recent work from conversation]
    2. Session ended
    
  6. Update logs/log_index.yaml:

    current: YYYY-MM-DD_NN
    started: [timestamp]
    updated: [timestamp]
    ended: [timestamp]
    total_duration: Xh Ym  # cumulative
    
  7. Suggest session title:

    • Analyze tasks completed during session
    • Generate concise title (5-10 words)
    • Ask: "Suggested title: [title] — Use this?"
    • If approved, update title in frontmatter

Output

## Session Ended

**Duration**: [Xh Ym]
**Started**: [start timestamp]
**Ended**: [end timestamp]
**Title**: [title]

### Session Summary
- [key accomplishment 1]
- [key accomplishment 2]

### Project Totals
- **Total tracked time**: [Xh Ym]
- **Sessions**: [N]

---
→ `/handoff` to prepare git commit

Command: add

Add an entry to the current session without changing session state.

Process

  1. Check for active session:

    • If no active session, offer to start one first
  2. Get timestamp: date '+%Y-%m-%d %H:%M:%S %Z'

  3. Parse note:

    • Use the rest of the arguments as the note
    • If empty, ask: "What did you complete?"
  4. Append to log file:

    ### [timestamp]
    
    - [note]
    
  5. Update logs/log_index.yaml:

    • Set updated to current timestamp

Output

## Entry Added

**Time**: [timestamp]
**Note**: [note]

Session continues. [Xh Ym] elapsed since start.

Quick Add Examples

/logwork add Fixed authentication bug
/logwork add Completed code review for PR #123
/logwork add Refactored database queries

Handling Stale Sessions

When checking session status or adding entries, detect stale sessions.

Detection

A session is stale if:

  • Session is active (no ended key)
  • Current time - updated time > gap_threshold_hours (default: 2 hours)

Handling

If stale session detected:

## Stale Session Detected

Last activity was [X] hours ago at [updated timestamp].

Options:
1. **Close and start new** - End previous session, start fresh
2. **Continue existing** - Keep current session, add entry
3. **Just show status** - Take no action

What would you like to do?

If user chooses "Close and start new":

  1. Close old session with updated as end time
  2. Generate closing summary from conversation/log
  3. Start new session
  4. Add current work entry

Error Handling

No logs directory

## Setup Required

Logs directory not found.

Run `/onboard-claude` to initialize the workspace, or create manually:
```bash
mkdir -p logs

### No log_index.yaml

No Session Data

No session tracking data found.

Starting fresh. Run /logwork start to begin.


### Attempting to end with no active session

No Active Session

There's no active session to end.

Run /logwork start to begin a new session.


### Attempting to add with no active session

No Active Session

Can't add entry - no active session.

Would you like to start a new session and add this entry?


---

## File Formats

### logs/log_index.yaml

```yaml
current: 2026-01-19_01
started: 2026-01-19 09:30:00 EST
updated: 2026-01-19 11:45:00 EST
# ended: only present when session is closed
total_duration: 45h 30m
sessions:
  - 2026-01-15_01
  - 2026-01-16_01
  - 2026-01-19_01
config:
  gap_threshold_hours: 2

logs/YYYY-MM-DD_NN.md

---
title: Implement authentication flow
started: 2026-01-19 09:30:00 EST
ended: 2026-01-19 12:15:00 EST
duration: 2h 45m
---

## Tasks Completed

### 2026-01-19 09:35:00 EST

- Set up JWT token generation

### 2026-01-19 10:20:00 EST

- Implemented login endpoint
- Added password hashing

### 2026-01-19 11:45:00 EST

- Completed refresh token logic

### 2026-01-19 12:15:00 EST

1. Finished authentication module
2. Session ended

Duration Calculations

Format

Always use Xh Ym format:

  • 0h 15m (15 minutes)
  • 1h 30m (1 hour 30 minutes)
  • 12h 45m (12 hours 45 minutes)

Adding Durations

When updating total_duration:

  1. Parse existing: "5h 30m" → 330 minutes
  2. Add new duration: 45 minutes
  3. Convert back: 375 minutes → "6h 15m"

Examples

Example 1: Check Status

User: /logwork

Claude:
1. Reads log_index.yaml
2. Finds active session started 2h ago
3. Shows status with duration and recent entries

Example 2: Quick Add

User: /logwork add Fixed the login timeout bug

Claude:
1. Checks for active session - found
2. Appends entry with timestamp
3. Updates log_index.yaml
4. Confirms entry added

Example 3: Start with Custom Time

User: /logwork start 09:30

Claude:
1. Parses "09:30" as today at 09:30
2. Asks: "Use 2026-01-19 09:30:00 EST as start time?"
3. User confirms
4. Creates session with that timestamp

Example 4: Stale Session

User: /logwork add Completed the refactor

Claude:
1. Checks for active session - found
2. Detects: last update was 5 hours ago
3. Shows stale session warning
4. User chooses "Close and start new"
5. Closes old session, starts new, adds entry

Skill Chaining

After logwork operations, suggest next actions:

SituationSuggestion
Session started"Ready to work. Use /logwork add to track progress"
Entry added"Continue working or /logwork end when done"
Session ended"Run /handoff to prepare git commit"
Status shown (active)"Use /logwork add [note] or /logwork end"
Status shown (inactive)"Run /logwork start to begin tracking"

Checklist

  • Parsed command and arguments
  • Retrieved current timestamp from system
  • Checked for existing session state
  • Handled stale sessions if applicable
  • Applied appropriate action (status/start/end/add)
  • Updated log file if needed
  • Updated log_index.yaml if needed
  • Calculated durations correctly
  • Suggested next action

Score

Total Score

35/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

0/5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon