Back to the catalog

worktale-claude-code-plugin

Automatically narrates your coding sessions into a daily work journal. When you type /worktale, the AI agent starts capturing the "why" behi

Open source Repository Open in the app JSON README (API)

About

Automatically narrates your coding sessions into a daily work journal. When you type /worktale, the AI agent starts capturing the "why" behind every commit — intent, decisions, trade-offs, and problems solved. After each git commit, it runs `worktale note` to append a 1-2 sentence narrative to your local Worktale journal. At end of day, run `worktale digest` to see your full story: AI-narrated context alongside commit stats, module activity, and streaks. All data stays local in a SQLite database on your machine. Requires the Worktale CLI (npm install -g worktale).

Details

Kind
Plugins
Topic
Developer tools
Publisher
worktale
Origin
marketplace
Category
ferramentas
Last push
2026-04-17T13:00:32Z
Repository state
ativo
Language
JavaScript
License
MIT
Added
2026-08-30 01:48:58
Updated
2026-08-30 01:48:58
Origin id
worktale/worktale-plugin/worktale-claude-code-plugin

README

# Worktale Plugin for Claude Code

**AI session tracking for your daily work journal.**

Git captures the *what*. This plugin captures the *why* and the *how*.

When you activate `/worktale` in Claude Code:

1. After every commit, the agent appends a 1–2 sentence narrative note to your daily [Worktale](https://worktale.org) journal.
2. At session end, a `SessionEnd` hook parses the transcript and records aggregate metrics to Worktale: **provider, model, tokens, cost, tools used, MCP servers, and duration**.

All data stays local. Metrics live in your Worktale SQLite DB; cloud sync is opt-in via `worktale publish`.

## Install

```bash
/plugin marketplace add worktale/worktale-plugin
/plugin install worktale-plugin@worktale-plugin
```

Requires the [Worktale CLI](https://www.npmjs.com/package/worktale) **v1.4.0+**:

```bash
npm install -g worktale@latest
cd your-repo
worktale init
```

## Usage

```
/worktale
```

The agent confirms narration is active. After every commit, it runs:

```bash
worktale note "Fixed race condition in job queue — claim query wasn't using SELECT FOR UPDATE"
```

At session end, the hook automatically runs:

```bash
worktale session add \
  --provider anthropic \
  --tool claude-code \
  --model <detected-model> \
  --input-tokens <sum-from-transcript> \
  --output-tokens <sum-from-transcript> \
  --cost <computed-from-rates> \
  --tools-used Read,Edit,Bash,... \
  --mcp-servers <detected> \
  --duration <session-seconds>
```

## View your data

```bash
worktale today      # Today's sessions + narrative
worktale session list
worktale session stats
worktale dash       # Interactive TUI
```

## How tokens/cost are computed

The hook reads `transcript_path` from the `SessionEnd` payload, parses the JSONL, and sums `usage.input_tokens`, `usage.output_tokens`, `usage.cache_read_input_tokens`, and `usage.cache_creation_input_tokens` across every assistant message. Cost is computed from a built-in Anthropic rate table (Opus/Sonnet/Haiku 4.x). Unknown models report $0 for cost but full token counts.

## License

MIT

More