Records work activities from the current session for cross-session aggregation and work log generation
Resources
1Install
npx skillscat add tomwangowa/agent-skills/activity-logger Install via the SkillsCat registry.
Activity Logger Skill
Purpose
Records activities from the current Claude Code session to enable cross-session activity aggregation and work log generation. This skill is designed to work with multiple concurrent Claude Code instances across different projects.
When to Use
Automatic triggers:
- After completing a significant task or feature
- Before switching to a different project
- At the end of a work session
Manual triggers:
- "log this activity"
- "record what I just did"
- "save session activity"
- "log my work"
How It Works
When triggered, this skill will:
Collect session information:
- Generate or retrieve session ID
- Record current timestamp
- Identify current project (from git repo or directory name)
- Get current working directory
Gather activity details:
- Prompt user for activity description (if not provided)
- List recently modified files (from git status)
- Capture recent commits (if any)
- Record task context
Save activity record:
- Create JSON file in
~/.claude/activities/ - Filename format:
{session_id}_{timestamp}.json - Ensure directory structure exists
- Create JSON file in
Confirm to user:
- Display saved activity summary
- Show file path where activity was saved
Activity Record Format
Each activity record is saved as a JSON file with the following structure:
{
"session_id": "unique-session-identifier",
"timestamp": "2026-01-13T14:05:30Z",
"project_path": "/Users/username/projects/my-app",
"project_name": "my-app",
"git_branch": "main",
"activities": [
{
"type": "task_completed",
"description": "Implemented user authentication feature",
"files_changed": ["src/auth.ts", "src/middleware.ts"],
"commits": ["a1b2c3d4"]
}
],
"context": "Working on security improvements",
"tags": ["authentication", "security"]
}Activity Types
task_completed- Finished a specific task or featurebug_fixed- Resolved a bug or issuerefactoring- Code refactoring workresearch- Investigation or exploration workdocumentation- Documentation updatesreview- Code review activities
Usage Examples
Example 1: Simple activity logging
User: "log my work"
Claude: What activity would you like to log?
User: "Implemented OAuth2 login flow"
Claude: [Collects info and saves activity]Example 2: Automatic logging after task completion
User: "I've finished implementing the dashboard"
Claude: [Completes implementation work]
Great! Would you like me to log this activity? [logs automatically]Configuration
Activity logger uses the following directory structure:
~/.claude/
├── activities/ # Activity records
│ ├── session_*.json # Unprocessed activities
│ └── processed/ # Processed activities (archived)
└── config/
└── activity-config.json # Configuration (optional)Integration with work-log-analyzer
Activity records saved by this skill can be aggregated using the work-log-analyzer skill with the --aggregate flag:
User: "aggregate my activities"
Claude: [Uses work-log-analyzer to process all activity records]Environment Variables
CLAUDE_ACTIVITIES_DIR- Override default activities directory (default:~/.claude/activities)CLAUDE_SESSION_ID- Provide custom session ID (auto-generated if not set)
Dependencies
Required
jq- JSON processor (install:brew install jqon macOS,apt-get install jqon Ubuntu)git- Version control system (required for project context)
Optional
openssl- For secure random ID generation (falls back to/dev/urandomor$RANDOMif not available)
Implementation Notes
The skill implementation:
- Creates directory structure if it doesn't exist
- Generates a session ID based on timestamp + random string
- Uses git commands when available to gather context
- Falls back to directory scanning if not in a git repo
- Validates JSON output before saving