session-log
Skill0 starsChanged 4 months agoMITView on GitHub
Dump the raw JSONL session log as a human-readable transcript. Use when user says "session log", "セッションログ", "生ログ見せて", "経緯見せて", or wants to inspect what happened earlier (tool calls, results, assistant replies) in the current or a specific Claude Code session.
- Reads credentials
21 other projects use a version of this.
Adopted by
Most recently taken up by
- flonat/flonat-researchtheir own version, first seen Nov 3, 2026
- newkirkjosh/skillstheir own version, first seen Oct 25, 2026
- AN0099/toothpaste-kittheir own version, first seen Oct 24, 2026
- sunnysxg/claude_skillstheir own version, first seen Oct 20, 2026
- tderoussel/agent-skillstheir own version, first seen Oct 20, 2026
- jacobgreenwald21/claude-skillstheir own version, first seen Oct 15, 2026
Used with
Projects with it also use ml-training-recipe, replication and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
getcompanion-aiSkillml-training-recipe
Find implementable ML training recipes from papers, datasets, docs, and code. Use when the user wants to fine-tune, train, reproduce, or choose a practical ML method, dataset, hyperparameter setup, or benchmark recipe.
Also in 3 projects that use this
getcompanion-aiSkillreplication
Plan a replication of a paper, claim, or benchmark, and execute only after an explicit environment choice. Use when the user asks to replicate results, reproduce an experiment, verify a claim empirically, or build a replication package.
Also in 3 projects that use this
brainbytes-devSkillalpha-research
Also in 3 projects that use this
JaimeParkerSkillpaper-code-audit
Perform three-way cross-validation of a research paper by comparing the original paper text (via Zotero), official code implementation (via Git), and personal Obsidian notes. Use this skill whenever the user wants to "audit a paper", "verify paper claims against code", "cross-check notes with implementation", "triangulate paper + code + notes", "find discrepancies between paper and code", or mentions wanting a deep, structured comparison of a paper's claims against its implementation and their own notes. Also trigger when the user asks to "analyze this paper thoroughly" with code available, or when they want to systematically reconcile what the paper says, what the code does, and what their notes claim.
Also in 3 projects that use this
JimLiuSkillpdf-explore
Use this skill when the user has attached a PDF, paper, report, or other document and the answer needs content from more than one place in it: summarize the methods or any other section, compare sections, find where a topic is discussed, read a value or label off a figure or chart, or find/list/extract every instance of something across the whole document (datasets, benchmarks, citations, figures, table rows, accession numbers — including appendices). Skip it only for a single lookup of 1–4 pages quoted in your very next response — `read_file(pages=[...])` attaches pages as images that are dropped from context after one turn, so multi-section answers end up re-reading the same ranges repeatedly. Parses the PDF once in the Python kernel: `pdf_pages` (pages as persistent text), `pdf_outline` (TOC), `pdf_scan` (rank pages by relevance), `pdf_map`/`pdf_extract` (per-page summary / structured fields via parallel haiku calls). For PDF creation/manipulation, use reportlab/pypdf directly.
Also in 3 projects that use this
KISHOR403Skillsession-search
This skill should be used when searching Claude Code session transcripts with semantic understanding. Triggers on queries like "find sessions about X", "when did I work on Y", "search previous conversations". Supports natural language queries with synonym matching.
Also in 4 projects that use this
- +1 more from getcompanion-ai
Other versions21 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 21
- advaitpaliwal/feynman★ 10ksame name
- companion-inc/feynman★ 10ksame name
- getcompanion-ai/feynman★ 10ksame name
- michalparkola/tapestry-skills-for-claude-code★ 557same name
- michalparkola/tapestry-skills★ 538same name
- searlsco/prove_it★ 198same name
- flonat/flonat-research★ 150same name
- Felpix-Studios/social-science-research★ 8same name
- cyberfly/agent-skills★ 3same name
- gufranco/claude-engineering-rules★ 3same name
11 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository27 other files it gives its agents.
- brainstormingSkill
- codexSkill
- cognitive-rhythm-writingSkill
- commitSkill
- compressSkill
- create-skillSkill
- crit-reviewSkill
- cross-reviewSkill
- decompressSkill
- herdr-fork-popupSkill
- herdr-forkSkill
- init-rulesSkill
- install-skillsSkill
- japanese-tech-writingSkill
- launch-unitySkill
- llm-wikiSkill
- parallel-dispatchSkill
- pbcopySkill
- refactor-docSkill
- subagent-driven-developmentSkill
- sync-skillSkill
- test-driven-developmentSkill
- user-journeySkill
- using-git-worktreesSkill
- writing-plansSkill
- x-searchSkill
- yahoo-realtime-searchSkill
The file
Files
session-log - セッション生ログ可視化
~/.claude/projects/<proj>/<uuid>.jsonl に保存されている Claude Code の生セッションログを、人間が読める形に整形して出力する。
重要: シークレットのマスク(必読)
出力する内容に API キー / アクセストークン / パスワード / 秘密鍵 / .env の値 など機密情報と思われる文字列が含まれていたら、必ず **** で塗りつぶしてからユーザーに表示すること。整形後のテキストはそのまま PR / Issue / Slack / ブログに貼られる可能性があり、生ログを横流しすると事故になる。
マスク対象は出力されるすべてのブロック: tool_result の中身はもちろん、tool_use.input(コマンドラインに API キーや Authorization: Bearer を直書きしているケースが多く、見落とすと事故になる)、user メッセージ本文(ユーザーが secret を貼り付けていることがある)、assistant.text も対象。整形構造のどこに出てきても塗る。
検出対象の例(疑わしきはマスク):
- API キー prefix:
sk-...,sk-ant-...,pk-...,ghp_...,gho_...,ghs_...,xox[bp]-...,AKIA[0-9A-Z]{16},AIza[0-9A-Za-z_-]{35},xai-... - 認証ヘッダ:
Authorization: Bearer <...>,Authorization: Basic <...>,X-Api-Key: <...>,Cookie: <...> - 代入形式:
password=...,token=...,secret=...,api_key=...,PRIVATE_KEY=... - ブロック:
-----BEGIN ... PRIVATE KEY-----〜-----END ... PRIVATE KEY----- - ファイル:
.env/.env.*/credentials.json/id_rsa等の中身全文 - 接続文字列:
postgres://user:password@host/db,mysql://,mongodb://,redis://等のユーザー情報部 - その他: 32 文字以上の高エントロピー英数字列で文脈的にトークンに見えるもの
マスク方法:
- 値部分を
****に置換する。識別性が欲しければ prefix だけ残す(例:sk-ant-****,ghp_****,AKIA****)。prefix は トークン種別が識別できる程度(3〜8 文字目安) に留め、それ以上は残さない - ブロック型は
-----BEGIN ... PRIVATE KEY-----\n****\n-----END ... PRIVATE KEY-----に短縮 .env行はKEY=****の形にする(KEY 名は残す)- 接続文字列は user 部分は残してパスワード部のみ
****にする(例:postgres://dbuser:****@db.example.com:5432/myapp)。URL 全体を塗ってもよい Authorization: Bearer <token>はAuthorization: Bearer ****の形- false positive(実は機密でないものを塗る)は許容。false negative(漏らす)は不可。迷ったら塗る
いつ使うか
- ユーザーが「さっきのBashの経緯見せて」「直前のセッションログ見たい」などと言ったとき
- 自分(Claude)が「前のターンで何を実行したか」を取り戻したいとき
- Skill/slash command 開発のため、実際に流れたツール呼び出しを確認したいとき
引数
--session <uuid|prefix>: 特定のセッションを指定(UUID全体 or 先頭数文字)--list: 現在の project dir 配下のセッション一覧だけ出す--full: tool_result を省略せずそのまま全部出す(デフォルトは長すぎる場合カット)--tools-only: ユーザー発話とアシスタント返答を省き、tool_use / tool_result だけ出す--max-chars N: tool_result の最大文字数(デフォルト 2000,--full指定時は無制限)
引数なしなら「現在のプロジェクトの最新セッション」を整形して出す。
手順
1. プロジェクトディレクトリを特定
現在の cwd を -Users-trapple--claude 形式に変換する。変換ルール:
/ → -
. → -実装:
PROJ=$(pwd | tr '/.' '--')
PROJ_DIR="$HOME/.claude/projects/$PROJ"$PROJ_DIR が存在しない場合は、cwd フィールドで全セッションを grep して該当するものを探す(フォールバック):
if [ ! -d "$PROJ_DIR" ]; then
PROJ_DIR=$(grep -lF "\"cwd\":\"$(pwd)\"" ~/.claude/projects/*/*.jsonl 2>/dev/null \
| head -1 | xargs -I{} dirname {})
fi2. セッションファイルを決定
--session <x>があれば$PROJ_DIR/<x>*.jsonlで先頭一致(prefix で OK)- 無ければ
ls -t "$PROJ_DIR"/*.jsonl | head -1で最新 --listならls -lt "$PROJ_DIR"/*.jsonlを出して終了
3. jq で整形出力
基本ワンライナー(そのまま貼って使える形):
SESSION=<path-to-jsonl>
MAX=2000 # --full なら 0 = 無制限
jq -r --argjson max "$MAX" '
def clip(s): if $max == 0 or (s|length) <= $max
then s
else s[0:$max] + "\n…(truncated, " + ((s|length)-$max|tostring) + " more chars)" end;
if .type=="user" and (.message.content|type)=="string" then
"\n========== USER ==========\n" + .message.content + "\n"
elif .type=="assistant" then
(.message.content // [] | map(
if .type=="thinking" then "---------- THINKING ----------\n" + (.thinking // "(empty)")
elif .type=="text" then "---------- ASSISTANT ----------\n" + .text
elif .type=="tool_use" then "---------- TOOL_USE: " + .name + " ----------\n" + clip(.input|tostring)
else empty end) | join("\n\n"))
elif .type=="user" and (.message.content|type)=="array" then
(.message.content | map(
if .type=="tool_result" then "---------- TOOL_RESULT ----------\n" + clip((.content // "")|tostring)
else empty end) | join("\n\n"))
else empty end
' "$SESSION"--tools-only の場合は user(string) と assistant.text の分岐を empty に置き換えればよい。
4. 補足情報
最後にセッションのメタ情報を一行で添える(ユーザーが「どのセッション?」と分かるように):
jq -sr '"\n# session: \(.[0].sessionId) cwd: \(.[0].cwd) branch: \(.[0].gitBranch // "-") events: \(length)"' "$SESSION"-s(slurp)で全イベントを配列にしてから、メタ情報は .[0] から取り、events は配列全体の length を使う。.[0] | length の形にすると最初のオブジェクトのキー数になってしまうので注意。
観測済みの仕様メモ
- イベントタイプ:
user/assistant/system/attachment/file-history-snapshot/permission-mode/last-prompt userのmessage.contentは string(素の入力) と array(tool_result ブロック) の2パターンあるassistantのmessage.contentはthinking/text/tool_useの配列thinkingブロックはローカルJSONLでは本文が空のことが多い(Opus の思考トークンは残らない)tool_result.contentは巨大になりうる(数MB級もある)ので、デフォルトは--max-charsで抑える- サブエージェント経由の子セッションは
isSidechain: trueで別ファイル<uuid>/ディレクトリ下に保存される - ログは
chmod 600でローカル保存、クラウド同期はされない
ユーザーへの返し方
- 整形出力は必ずシークレットをマスクしてから見せる(冒頭「シークレットのマスク」節参照)。生の jq 出力をそのままユーザーに渡すのは禁止
- 実行コマンド(jq ワンライナー)と整形出力を両方見せる(ユーザーが後で自分でも叩けるように)。実行コマンド自体にシークレットは入らないが、整形出力側はマスク後を表示
- 長大な場合は冒頭だけ本文表示、残りは「
$SESSIONに保存済み(未マスクなので外部に貼らないこと)」と示して終了 - 「さっきのエラーの原因だけ知りたい」のような要求なら、出力を grep してから見せる(grep 結果もマスク対象)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

