Skip to content
Back to search

session-logger

MarketplaceWorks with Claude CodeGitHub

Crescentic's session-logger plugin for Claude Code.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/crescentic--claude-logger-lite/badge.svg)](/listings/crescentic--claude-logger-lite)

HTML

<a href="/listings/crescentic--claude-logger-lite"><img src="/api/listings/crescentic--claude-logger-lite/badge.svg" alt="findsafeskills safety rating" /></a>

Install

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Needs Node.js 22.18 or later on your `PATH`. The plugin is written in TypeScript, and Node runs it directly, so there's nothing to install or build. On an older Node the plugin does nothing and writes the reason to its debug log (see below).

Inside Claude Code:

/plugin marketplace add Crescentic/claude-logger-lite
/plugin install session-logger@session-logger

Or from a shell:

claude plugin marketplace add Crescentic/claude-logger-lite
claude plugin install session-logger@session-logger

You'll be asked to pick a scope. User scope logs every project you open; project scope logs only that project, and is written to the project's `.claude/settings.json` so teammates get it too.

To install from a local clone instead, pass its path to `marketplace add` in place of `Crescentic/claude-logger-lite`.

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

.claude-plugin/marketplace.json · Manifest · 12 lines
  1. {
  2. "name": "session-logger",
  3. "description": "Crescentic's session-logger plugin for Claude Code.",
  4. "owner": { "name": "Crescentic" },
  5. "plugins": [
  6. {
  7. "name": "session-logger",
  8. "source": "./",
  9. "description": "Writes a Markdown log of each Claude Code session."
  10. }
  11. ]
  12. }
README.md · README · 153 lines
  1. # session-logger
  2. [![CI](https://github.com/Crescentic/claude-logger-lite/actions/workflows/ci.yml/badge.svg)](https://github.com/Crescentic/claude-logger-lite/actions/workflows/ci.yml)
  3. [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
  4. A Claude Code plugin that keeps a Markdown log of each session in the project it
  5. ran in: which files Claude read or changed, which shell commands it ran, and
  6. the git status when the session ended. One file per session, written as the
  7. session goes, so a crashed or still-running session still has a log.
  8. Use it to:
  9. - **Review what an agent did** before you commit, especially after a long or
  10. unattended session.
  11. - **Keep an audit trail** of the commands run in a repository.
  12. - **Hand work over**: attach a session log to a pull request so reviewers see
  13. how a change was made.
  14. No dependencies, no network calls, no prompts or replies recorded.
  15. ```
  16. docs/sessions/logs/2026-11-13_0714_de810c3a.md
  17. ```
  18. ~~~markdown
  19. ---
  20. session_id: "de810c3a-05d0-453e-ad4b-df24433d92b4"
  21. cwd: "D:\\work\\my-app"
  22. git_repo: "acme/my-app"
  23. git_branch: "feat/login"
  24. started: "2026-11-13T07:14:25.937Z"
  25. ended: "2026-11-13T07:31:02.118Z"
  26. last_activity: "2026-11-13T07:31:02.118Z"
  27. ---
  28. # Claude Code Session: my-app
  29. ## Files Touched
  30. - `07:14:30` read `package.json`
  31. - `07:16:12` edit `src/login.ts`
  32. ## Commands Run
  33. - `07:17:40` `npm test` — Run the tests
  34. ## Session End
  35. **Ended:** 2026-11-13T07:31:02.118Z (prompt_input_exit)
  36. **Final git status:**
  37. ```
  38. M src/login.ts
  39. ```
  40. ~~~
  41. Times are UTC.
  42. ## Install
  43. Needs Node.js 22.18 or later on your `PATH`. The plugin is written in
  44. TypeScript, and Node runs it directly, so there's nothing to install or build.
  45. On an older Node the plugin does nothing and writes the reason to its debug log
  46. (see below).
  47. Inside Claude Code:
  48. ```
  49. /plugin marketplace add Crescentic/claude-logger-lite
  50. /plugin install session-logger@session-logger
  51. ```
  52. Or from a shell:
  53. ```
  54. claude plugin marketplace add Crescentic/claude-logger-lite
  55. claude plugin install session-logger@session-logger
  56. ```
  57. You'll be asked to pick a scope. User scope logs every project you open;
  58. project scope logs only that project, and is written to the project's
  59. `.claude/settings.json` so teammates get it too.
  60. To install from a local clone instead, pass its path to
  61. `marketplace add` in place of `Crescentic/claude-logger-lite`.
  62. ## Settings
  63. Set these as environment variables, or in the `env` block of
  64. `~/.claude/settings.json` (or a project's `.claude/settings.json`).
  65. | Variable | Default | What it does |
  66. | --- | --- | --- |
  67. | `SESSION_LOGGER_DIR` | `docs/sessions/logs` | Where logs go. Relative paths are from the git root (or the working directory outside git). |
  68. | `SESSION_LOGGER_GITIGNORE` | on | The log folder gets a `.gitignore` holding `*`, so logs stay out of commits. Set to `0` to commit them. |
  69. | `SESSION_LOGGER_MAX_COMMAND` | `500` | Longest command text kept, in characters. |
  70. | `SESSION_LOGGER_DISABLE` | off | Set to `1` to turn logging off. |
  71. ## What it records, and what it doesn't
  72. - **Files:** `Read`, `Write`, `Edit`, `MultiEdit`, `NotebookEdit`. Paths inside
  73. the project are shown relative to its root.
  74. - **Commands:** `Bash` and `PowerShell`, with Claude's description of each.
  75. - **Not recorded:** your prompts, Claude's replies, tool output, searches
  76. (`Grep`, `Glob`), web fetches, MCP tools, or tool calls that failed.
  77. Commands are written as Claude ran them, so a token pasted into a command lands
  78. in the log. That is why the log folder ignores itself in git by default.
  79. ## How it works
  80. Four hooks call `scripts/hook.mjs`, which loads `scripts/logger.ts`: `SessionStart`, `PostToolUse` (for the
  81. tools above), `Stop` (after each reply, to update `last_activity`) and
  82. `SessionEnd`. Each event is appended to a small file in
  83. `~/.claude/session-logger/sessions/`, and the Markdown log is rebuilt from
  84. it, so hooks that fire at once (parallel tool calls) don't lose entries. Those
  85. event files are deleted after 30 days.
  86. - A session that started before the plugin was installed gets a log from its
  87. first tracked tool call, marked "logging began mid-session".
  88. - When a session that already has a log starts again under the same session
  89. id (after `/compact`, for example), it keeps writing to that log, and the
  90. restart is listed under **Restarted**. A command that starts a new session
  91. id starts a new log.
  92. - If a session's event file is gone but its log isn't (it was idle for more
  93. than 30 days and then resumed, or `CLAUDE_CONFIG_DIR` changed), it keeps
  94. writing to the same log. Earlier entries are kept, and the point where it
  95. picked up is listed under **Continued**.
  96. - A session that never ended cleanly shows "Not ended yet" and its last
  97. activity.
  98. - **Final git status** is `clean` only when git confirmed it. If it couldn't
  99. be read, the log says why: not a git repository, git not found, timed out,
  100. or the project folder no longer exists.
  101. - Nothing is logged for a session whose working folder doesn't exist, and the
  102. plugin never creates a project folder just to hold a log.
  103. - The hook never fails or slows a session on purpose: errors are swallowed,
  104. and it always exits 0. Problems go to
  105. `~/.claude/hooks-logs/<date>.jsonl` (`level: "ERROR"` or `"SKIP"`).
  106. ## Contributing
  107. Contributions are welcome. See [CONTRIBUTING.md](CONTRIBUTING.md) for setup and
  108. ground rules, and look for issues labelled **good first issue**. Please report
  109. security problems privately, as described in [SECURITY.md](SECURITY.md).
  110. ```
  111. npm install # TypeScript, for type checking only
  112. npm run check # type check, then node --test
  113. claude --plugin-dir /path/to/claude-logger-lite # try it in one session
  114. claude plugin validate /path/to/claude-logger-lite
  115. ```
  116. ## License
  117. [MIT](LICENSE)

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.