
Product
Introducing Repository Access Permissions and Custom Roles
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.
claude-session-gists
Advanced tools
Effect-TS utilities for extracting and archiving Claude Code sessions
Archive your Claude Code conversations alongside your commits for complete decision provenance.
Important design and implementation decisions happen in Claude Code conversations. Link these conversations to your commits so you can understand the "why" behind every code change.
Using npm:
npm install -g claude-session-gists
Using pnpm:
pnpm add -g claude-session-gists
gh auth login
Or set a personal access token:
export GITHUB_TOKEN=ghp_your_token_here
Install Husky in your project:
pnpm add -D husky
pnpm exec husky init
Create .husky/prepare-commit-msg:
#!/usr/bin/env bash
COMMIT_MSG_FILE=$1
COMMIT_SOURCE=$2
# Skip for merge/squash/amend
if [ "$COMMIT_SOURCE" = "merge" ] || [ "$COMMIT_SOURCE" = "squash" ] || [ -n "$3" ]; then
exit 0
fi
# Create gist and save URL
GIST_TRAILER=$(claude-session-gists create --commit --since last-commit 2>/dev/null | grep "^Claude-Session:" | tail -1)
if [ -n "$GIST_TRAILER" ]; then
echo "" >> "$COMMIT_MSG_FILE"
echo "$GIST_TRAILER" >> "$COMMIT_MSG_FILE"
echo "$GIST_TRAILER" > /tmp/claude-session-gists-gist-url
fi
Create .husky/post-commit:
#!/usr/bin/env bash
# Link commit to gist
if [ -f /tmp/claude-session-gists-gist-url ]; then
GIST_URL=$(cat /tmp/claude-session-gists-gist-url | sed 's/Claude-Session: //')
rm -f /tmp/claude-session-gists-gist-url
[ -n "$GIST_URL" ] && claude-session-gists link-commit --gist "$GIST_URL" 2>/dev/null
fi
Make them executable:
chmod +x .husky/prepare-commit-msg .husky/post-commit
That's it! Now every commit will automatically:
# List sessions for current project directory
claude-session-gists list
# List sessions from all projects
claude-session-gists list --all
# List sessions matching a project name
claude-session-gists list --project myproject
# Export most recent session from current project
claude-session-gists export --format markdown
# Create a gist from current project's session
claude-session-gists create --since last-commit
# Create a gist from a specific project
claude-session-gists create --project myproject
# Link a commit to an existing gist
claude-session-gists link-commit --gist <gist-url>
Note: By default, all commands scope to sessions from your current working directory. Use
--allto see all projects or--projectto filter by name.
The package includes a /search-sessions slash command for use within Claude Code conversations.
Usage in Claude Code:
/search-sessions <query>
Examples:
/search-sessions error handling
/search-sessions API design
/search-sessions authentication
What it does:
This makes it easy to find and reference past design decisions and conversations directly from Claude Code.
git commit -m "feat: Add user authentication"Claude-Session: https://gist.github.com/... to the commit messagegit pushFor library usage with Effect-TS, see the API documentation.
MIT © Clay Roach
Built with Effect-TS 💜
FAQs
Effect-TS utilities for extracting and archiving Claude Code sessions
We found that claude-session-gists demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.

Product
Socket Firewall blocks malicious VS Code and Open VSX extensions before install, protecting developers from compromised editor marketplaces.