From 4009be3586658b58b7dae9f27042255beda199aa Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 8 Oct 2026 15:40:53 +0000 Subject: [PATCH] docs(statusline): describe the session cost comment on linked PRs When the ShellTime GitHub App is installed on the repository, ShellTime's server comments on each PR the mod links with the session's cost, tokens, time, model, prompts and lines changed, plus a link to the session. It edits that comment 30 minutes and 24 hours later. The comment leaves out USD amounts for users who hide their AI cost, only goes on PRs opened by a GitHub account linked to the user, and is not re-posted once deleted. The mod and CLI are unchanged; the server does the work. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_012CKCiQAwSSCboscCPfwoR4 --- README.md | 2 +- plugins/shelltime-statusline/README.md | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c1f1ba1..9dd32bc 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ Quota and context turn yellow from 50% and red from 80%. The costs, quota and ag Before you run `shelltime init`, it still shows git, model, session cost, quota and context. Daily cost and agent time show `-`, and nothing is sent to ShellTime. The line refreshes as the conversation moves on, not while the session is idle. -When Claude opens a pull request with `gh pr create`, the mod links that PR to the session on shelltime.xyz. This goes through the `shelltime` CLI and its daemon. +When Claude opens a pull request with `gh pr create`, the mod links that PR to the session on shelltime.xyz. This goes through the `shelltime` CLI and its daemon. If the repository has the ShellTime GitHub App installed, ShellTime also comments on the PR with the session's tokens, cost and time, and a link to the session. The [mod's README](plugins/shelltime-statusline/README.md) has every segment's colors and where each number comes from. diff --git a/plugins/shelltime-statusline/README.md b/plugins/shelltime-statusline/README.md index a2aa994..bdea0db 100644 --- a/plugins/shelltime-statusline/README.md +++ b/plugins/shelltime-statusline/README.md @@ -67,6 +67,27 @@ The CLI hands the URLs to the ShellTime daemon, which sends them to ShellTime, a - If the CLI can't be found, or is too old to have `cc pr`, nothing is linked. Errors from the CLI itself (not logged in, server unreachable) go to `~/.shelltime/log.log`. - This runs from a `PostToolUse` hook, in the background, after the tool returns. It never delays or changes the Bash result Claude sees. +### Session cost comment + +If the ShellTime GitHub App is installed on the repository, ShellTime comments on each linked github.com PR, as the app. The comment shows: + +- the session's cost in USD +- tokens: total, input, output, cache read and cache write +- duration and active time +- the model +- prompts and lines changed +- a link to the session on shelltime.xyz, which only you can open + +The comment is posted a couple of minutes after the PR is linked. ShellTime edits the same comment 30 minutes and 24 hours later, so it ends with the whole session's numbers. + +- If you turned off showing your AI cost publicly on shelltime.xyz, the comment leaves out the USD amounts. +- Delete the comment and it is not posted again. +- Only PRs opened by a GitHub account linked to your ShellTime account get a comment. If you signed in to ShellTime without GitHub, link your GitHub account first. +- Without the app on the repository, nothing is posted. +- Nothing is posted for GitHub Enterprise hosts. + +The mod and the CLI do nothing extra for this: ShellTime's server posts the comment once the PR is linked. + ## Terminal If `~/.claude/settings.json` also has a `statusLine` running `shelltime cc statusline`, the terminal shows both lines. Keep both, or remove one.