Skip to main content
hook CX Codex

ccam-productivity — Claude Code hook: session logging

ccam-productivity — a hook that writes session start and end timestamps from Claude Code into a log file. Handy when you want to measure how long you actually work on tasks.

MIT ★ 1,198 updated 2026-10-23

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin marketplace add hoangsonww/Claude-Code-Agent-Monitor
/plugin install ccam-productivity@claude-code-agent-monitor-plugins
Open on GitHub

What ccam-productivity does

The hook fires on SessionStart and SessionEnd. When a session begins, it appends a UTC timestamp to /tmp/ccam-session-timing.log; when it ends, another line lands in the same file. Those pairs of lines give you a rough time log: session length, start times, gaps between sessions.

Under the hood it's just two echo commands with date -u, both silencing errors with 2>/dev/null || true. If the file can't be written, the hook stays quiet. No API keys, no external services, just the local shell.

The repository description promises more: daily standups, weekly reports, sprint summaries built on Agent Monitor data. The hook itself only writes two lines per session. Reports are a separate job, this hook gives you raw timestamps and nothing else.

The log lives in /tmp, so a reboot wipes it. For anything persistent you'd need to point the commands somewhere else.

What it helps with

  • log start and end times of Claude Code sessions
  • collect raw data for tracking work time
  • keep an activity log without external services
  • measure session length with a simple local file

Example prompts for the agent

  • Start a Claude Code session and let ccam-productivity log the start time
  • Check /tmp/ccam-session-timing.log after the session ends
  • Show today's timestamps from the ccam log

How to install ccam-productivity

1Plugin marketplace

/plugin marketplace add hoangsonww/Claude-Code-Agent-Monitor
/plugin install ccam-productivity@claude-code-agent-monitor-plugins

2Manually: put the files in place

.claude/settings.json

The hooks block: event (PreToolUse, PostToolUse, Stop…) → command. Personal ones go to ~/.claude/settings.json

Step by step, with commands for each platform: Claude Code hooks: what they are, where to configure them, how to block a risky command

Questions about ccam-productivity

How do I install ccam-productivity in Claude Code?

Add the marketplace first: /plugin marketplace add hoangsonww/Claude-Code-Agent-Monitor. Then install the plugin: /plugin install ccam-productivity@claude-code-agent-monitor-plugins. Wire the hook up in .claude/settings.json.

What does the ccam-productivity hook do?

On SessionStart and SessionEnd it appends timestamped lines to /tmp/ccam-session-timing.log. Each line carries a [ccam-productivity] prefix and a UTC date.

Does it generate standups and reports?

No. The plugin description mentions daily standups, weekly reports and sprint summaries, but the hook has just two echo commands. It writes timestamps to a log; reports need to be built separately.

Source text

hooks.json · MIT
Hooks bundle shipped with the ccam-productivity plugin for Claude Code.

Productivity workflows for Claude Code — daily standups, weekly reports, sprint summaries, and intelligent workflow optimization powered by Agent Monitor session data.

Triggers on: SessionStart, SessionEnd.

```json
{
  "hooks": {
    "SessionStart": [
      {
        "matcher": "",
        "hooks": [
          {
            "type": "command",
            "command": "echo \"[ccam-productivity] Session started at $(date -u +%Y-%m-%dT%H:%M:%SZ)\" >> /tmp/ccam-session-timing.log 2>/dev/null || true"
          }
        ]
      }
    ],
    "SessionEnd": [
      {
        "matcher": "",
        "hooks": [
          {
            "type": "command",
            "command": "echo \"[ccam-productivity] Session ended at $(date -u +%Y-%m-%dT%H:%M:%SZ)\" >> /tmp/ccam-session-timing.log 2>/dev/null || true"
          }
        ]
      }
    ]
  }
}

```

© Son Nguyen · MIT · hoangsonww/Claude-Code-Agent-Monitor

Similar hooks

All hooks for Agent setup: memory, context, orchestration →

From the same set155

The whole set →
ccam-cost-guard ccam-cost-guard tracks Claude Code spending and posts session stop events directly to the local Agent Monitor dashboard. CX Codex ★ 1,198repo stars ccam-analytics ccam-analytics is a Claude Code hook that streams session events to Agent Monitor for telemetry tracking. It triggers whenever a main session or subagent stops. CX Codex ★ 1,198repo stars docs-markdown docs-markdown — a markdown documentation rule: command samples must run, project paths start at the root, and architecture notes have to match what the code does. CX Codex +1 ★ 1,198repo stars integration-operator integration-operator is a Claude Code subagent that manages CCAM alerts, webhooks, push notifications, and SSH sources. It confirms changes first and hides secrets. CX Codex ★ 1,198repo stars backend-reviewer The backend-reviewer subagent reviews backend routes and hooks for regressions, data integrity risks, and missing tests. It works with Claude Code and Codex. CX Codex ★ 1,198repo stars frontend-react frontend-react — a React frontend rule for Claude and Claude that keeps UI edits small: explicit prop types, existing state patterns, routes left alone. CX Codex +1 ★ 1,198repo stars platform-admin platform-admin manages settings, hooks, data imports, backups, and MCP for Claude Code Agent Monitor. Confirms writes before updating. CX Codex ★ 1,198repo stars frontend-reviewer The frontend-reviewer subagent reviews React UI changes for behavior regressions, state mismatches, and broken user flows. Use it after frontend edits. CX Codex ★ 1,198repo stars

More in the catalog

Project sponsors

Companies that keep this analytics open