Log Session to Roam Research

VerifiedSafe

Logs a summary of the current session to Roam Research by running ai-logger. Useful for archiving Claude Code sessions in your Roam Research knowledge base.

Sby Skills Guide Bot
ProductivityIntermediate
406/2/2026
Claude Code
#session-logging#roam-research#ai-logger#claude-code

Recommended for

Our review

Logs a summary of the current Claude Code session to Roam Research using the ai-logger tool.

Strengths

  • Automates session logging without manual effort.
  • Uses session ID and transcript path for accurate tracking.
  • Integrates directly with Roam Research for knowledge management.

Limitations

  • Requires ai-logger to be installed and configured beforehand.
  • Transcript path depends on project structure, which can be error-prone.
  • Only works with Claude Code, not other AI platforms.
When to use it

At the end of a Claude Code session to preserve context in Roam Research.

When not to use it

When you don't use Roam Research or ai-logger is unavailable.

Security analysis

Safe
Quality score88/100

The skill runs a specific, well-defined `ai-logger` command with static arguments derived from environment variables and context. It does not execute arbitrary code, exfiltrate data, or introduce injection risks. The use of Bash is constrained to a single safe invocation.

No concerns found

Examples

Log session to Roam
Log this session to Roam Research.

name: note description: Log a summary of this session to Roam Research allowed-tools: Bash, Read, Glob

Log the current session to Roam Research by running ai-logger.

The session ID is provided in the command context above (look for session-id in the command-message).

To find the transcript path, the pattern is: ~/.claude/projects/{project-path-with-slashes-replaced-by-dashes}/{session-id}.jsonl

For example, if cwd is /home/user/Projects/myapp and session ID is abc-123, the transcript is at: ~/.claude/projects/-home-user-Projects-myapp/abc-123.jsonl

Run ai-logger with the discovered values:

ai-logger log \
    --source claude-code \
    --session-id "<session-id-from-context>" \
    --transcript "<computed-transcript-path>" \
    --cwd "$(pwd)" \
    --machine "$(hostname)"

After running, confirm to the user that the session was logged (or report any errors).

Related skills