Get the FREE Ultimate OpenClaw Setup Guide →

log-work

Scanned
npx machina-cli add skill qyinm/agent-skills-archive/log-work --openclaw
Files (1)
SKILL.md
4.4 KB

Overview

This skill helps you automatically document your development work into a structured markdown file, similar to a changelog. It analyzes recent code changes, git history, and creates comprehensive work logs that track all development activities.

Usage

When invoked, this skill will:

  1. Analyze recent changes in the codebase (git diff, git log)
  2. Identify what features/fixes/refactors were made
  3. Create or update a date-based markdown file in docs/worklog/
  4. Include timestamps, categories, and detailed descriptions

Default Behavior

  • File: Creates/updates docs/worklog/YYYY-MM-DD.md (e.g., docs/worklog/2026-01-09.md)
  • Directory: Automatically creates docs/worklog/ if it doesn't exist
  • Format: Entries within the same day are added to the same file (newest first)
  • Categories: feat, fix, refactor, docs, style, test, chore, perf

Entry Format

Each work log entry should follow this structure:

## [HH:MM] Category: Brief Title

### Changes
- Detailed change 1
- Detailed change 2
- Detailed change 3

### Files Modified
- `path/to/file1.ext`
- `path/to/file2.ext`

### Notes
Additional context, decisions made, or future considerations.

---

Note: Date is not included in the entry header since it's already in the filename.

Instructions

When the user invokes /log-work:

  1. Gather Context

    • Run git status to see current state
    • Run git diff to see unstaged changes
    • Run git log -5 --oneline to see recent commits
    • Get current date in YYYY-MM-DD format
  2. Analyze Changes

    • Identify the type of work (feat/fix/refactor/etc.)
    • List all modified files
    • Summarize what was changed and why
    • Note any important decisions or trade-offs
  3. Prepare File Path

    • Create docs/worklog/ directory if it doesn't exist
    • Determine file path: docs/worklog/YYYY-MM-DD.md (e.g., docs/worklog/2026-01-09.md)
    • Check if today's file already exists
  4. Create Entry

    • Use current date and time for the entry header
    • Create a clear, descriptive title
    • List all changes in bullet points
    • Include file paths
    • Add any relevant notes or context
  5. Update File

    • If today's file doesn't exist, create it with a header
    • If today's file exists, add the new entry at the TOP (reverse chronological within the day)
    • Maintain proper markdown formatting
    • Preserve existing entries from today
  6. Confirm

    • Show the user what was added
    • Provide the file path where it was logged

For detailed examples and usage scenarios, see EXAMPLES.md.

Options

  • --date <YYYY-MM-DD>: Use a specific date instead of today (default: today's date)
  • --category <type>: Specify the category (feat/fix/etc.)
  • --title <text>: Provide a custom title
  • --skip-git: Don't analyze git changes, just create entry from user description

Quick Examples

# Basic usage
/log-work

# With custom title
/log-work --title "Refactor authentication module"

# Specific category
/log-work --category fix --title "Fix memory leak in WebSocket handler"

For more examples and detailed scenarios, see EXAMPLES.md.

Important Guidelines

  1. Be Comprehensive: Include all significant changes, not just code
  2. Be Clear: Use clear, descriptive language that others can understand
  3. Be Consistent: Follow the same format for all entries
  4. Be Helpful: Add context and notes that will help future you/team
  5. Don't Duplicate: Check existing entries to avoid redundant logs
  6. Group Related: If multiple small changes belong together, group them in one entry

Integration Tips

  • Use this skill after completing a feature or significant work
  • Pair it with /commit for comprehensive documentation
  • Review the entry before finalizing to ensure accuracy
  • Keep entries focused on one main topic per entry
  • Use it daily to maintain a clear development history
  • Each day gets its own file in docs/worklog/, making it easy to track daily progress
  • You can add multiple entries to the same day's file for different tasks
  • Use --date option to retroactively log work from previous days if needed

Source

git clone https://github.com/qyinm/agent-skills-archive/blob/main/log-work/SKILL.mdView on GitHub

Overview

This skill automatically documents development work into structured markdown changelogs organized by date. It analyzes recent changes and git history to produce entries that track features, fixes, refactors, and other development activities, creating a coherent development history.

How This Skill Works

On activation, the tool runs git diff and git log to determine what changed, categorizes each change (feat, fix, refactor, etc.), then creates or updates docs/worklog/YYYY-MM-DD.md. Each entry uses the header ## [HH:MM] Category: Title and includes sections for Changes, Files Modified, and Notes, with new entries prepended to today's file.

When to Use It

  • End-of-day logging to build a complete project history.
  • Documenting new features with a clear changes list and affected files.
  • Recording fixes and refactors for maintenance and auditing.
  • Preparing release notes by summarizing recent work.
  • Creating an auditable record before code freezes or major milestones.

Quick Start

  1. Step 1: Run /log-work to analyze changes (git context required).
  2. Step 2: Optionally set --date, --category, or --title, then re-run.
  3. Step 3: Open docs/worklog/YYYY-MM-DD.md to review and commit.

Best Practices

  • Run with git context to capture diffs and history accurately.
  • Write a concise, descriptive Title for each entry.
  • Group related changes into a single entry when appropriate.
  • List all modified files under Files Modified and verify paths.
  • Avoid duplicate logs by checking existing today’s file before adding.

Example Use Cases

  • Example: feat: Add user profile page; Changes: UI for profile view, API endpoint /api/profile; Files Modified: src/pages/UserProfile.jsx, src/api/profile.js; Notes: Requires backend mock.
  • Example: fix: Resolve crash in login flow; Changes: Added null checks and guard clauses; Files Modified: src/auth/login.js; Notes: Tests updated.
  • Example: refactor: Rename fetchUser to getUser; Changes: Updated imports and tests; Files Modified: src/api/user.js, test/user.test.js; Notes: No behavior changes.
  • Example: docs: Update onboarding docs; Changes: Clarified steps and added examples; Files Modified: docs/onboarding.md, docs/worklog/2026-01-10.md; Notes: Coordinate with docs team.
  • Example: perf: Optimize image loader; Changes: Added caching and lazy-loading; Files Modified: src/assets/imageLoader.js; Notes: Benchmark improvements.

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers