agentleFS
TsukiNi22TsukiNi22/ai-utils/skills/ai/session-log/SKILL.md

session-log

Skill1 starsChanged 20 days agoMITView on GitHub

Log the progress of the current Claude session to several places at once, each in its own way - Discord (a thread per session, mentions, a status edited in place, files), Telegram (a topic per session, sound only when needed, status edited in place), Slack, ntfy, Gotify, an API, a TCP / UDP socket, a file or folder (text, Markdown or JSON journal, a status file next to it); the request and each end of turn summarized by Haiku, steps, results, files and links sent by Claude, questions, permissions and errors by Claude Code hooks; what waits for the user calls them the way of the place. /session-log with targets starts it, /session-log stop ends it, nothing given = asked through interactive-questions (Discord recommended); its hooks are installed at the first launch once the user accepts, a refusal cancels. Use whenever the user wants to log, follow or mirror a session's progress to Discord, Telegram, Slack, a phone, a webhook, a file, an endpoint or a port, or summons /session-log.

21 other projects use a version of this.

Adopted by

Most recently taken up by

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-aiSkill

    ml-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-aiSkill

    replication

    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-devSkill

    alpha-research

    Also in 3 projects that use this

  • JaimeParkerSkill

    paper-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

  • JimLiuSkill

    pdf-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

  • KISHOR403Skill

    session-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

The file

We split this skill into the rules it gives an agent

2 rules. 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 16 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Every target: Connexion établie at start, Connexion rétablie when this session already logged there, Fin du log (duration, steps, errors, …

    line 52
  2. Very specific:

    Never a secret, a key, a token, the content of a private file (log.py also hides the usual secret patterns), never the whole diff: names …

    line 120

“Common” is measured: kept by at least 6 in 10 of the 16 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Session log: the progress of this session, sent where the user wants

SKILL_DIR = the directory of this file. log.py = python3 SKILL_DIR/scripts/log.py (Python 3 only, claude for the Haiku summaries). It needs a shell on the user's computer (Claude Code, the desktop app, claude-cluster); claude.ai on the web cannot run it: say so and stop there. Outbound only: to receive requests from another session, session-link.

1. Read what is given

/session-log <info> <info>... - each info is a target, an option or a command:

GivenMeans
stop, close, off, fin (+ s2)stop every target (or that one): section 5
status, listlog.py list: the targets of this session and the last errors
uninstalllog.py hooks uninstall: the hooks out of ~/.claude/settings.json
clearlog.py clear: delete what this session's log posted where a sender may (Discord, Telegram), even after a stop
a Discord webhook URL (https://discord.com/api/webhooks/...)Discord
https://api.telegram.org/bot<token>/sendMessage?chat_id=<id>Telegram (a bot)
a Slack / Mattermost webhook, https://ntfy.sh/<topic>, a Gotify …/message?token=…that service (read from the address, or `#format=slackntfygotify`)
another https://...an API: one JSON record per event (#format=text: the readable lines)
tcp://HOST:PORT, udp://HOST:PORT (ip:port + the word tcp / udp)a socket: one JSON line per event (#format=text: coloured readable lines)
a path: ~/logs/work.log (aligned text), work.md (a Markdown journal), x.jsonl (JSON lines), ~/logs/ (a folder: a Markdown journal + a copy of each file sent)a file / a folder (a status file rewritten next to it)
discord, telegram, ntfy, file, api, tcp, udp alonethat kind, its value asked (section 2)
`level=minimalkeyall, mention=here<id>role:<id>no, name=<name>`options (per target: after #, ex: <url>#mention=1234,level=all)

Other options after #: thread=<id> (write in that Discord thread / Telegram topic), thread=no (none), ping=question+permission+... (the kinds that call the user), maxmb=N (attachments: Discord 10, ntfy 15), upload (JSON API: files in a multipart body), header=Authorization:Bearer X (API, several with ;), color=yes|no (ANSI: a text socket yes, a .log no), bell (a text socket rings on what calls), emoji=no, avatar=<url>|no, format=....

Each destination in its own way

The same facts per event (icon, label, text, the progress of an Étape n/m, the choices of a question, the counters at the end, whether it waits for the user), rendered the way of each place:

DestinationGrouped by sessionCalls the user (questions, permissions, idle, done, blocking error, end)Live statusFiles, linksclear
Discorda thread per session in a forum channel, reused@here / <@id> / role, with a text the phone showsa dashboard message edited in placeattached, image shown inside; link as 🔗 github.com › user › repoyes
Telegrama topic per session in a forum supergroup (made, reused), else the session name on each messagesound and notification; the rest silent; <@id> link when an id is givena message edited in placephotos / documents with the text as caption; <a> linkyes
Slack / Mattermostthe session in a context line<!here> / <@U…> / user group(level all: status messages)path; <url|github.com › …>no
ntfy (phone)the session in the titlepriority 5 (question, permission, idle) / 4 (done, error, end), the rest 2 (no sound)—each file attached; click + an « Ouvrir » buttonno
Gotify (phone)the session in the titlepriority 8, the rest 2—path; a click opens the linkno
JSON API, socket JSON, .jsonlsession, name in each recordattention: true, priority: highstatus in each record; .status.json next to a .jsonlfiles (name, size, sha256), link_label; uploadno
.log, socket format=texta banner per session (« Connexion rétablie » when it comes back)◀ à toi (yellow on a socket, bell rings)<log>.status rewritten📎 path, 🔗 label urlno (a file is the user's)
.md, a foldera heading per session👉 à toi<log>.status.md rewritten (one block per session)image shown, files copied (folder), linksno

Every target: Connexion établie at start, Connexion rétablie when this session already logged there, Fin du log (duration, steps, errors, files) at the end; the progress line has the shape of the Discord one (━━━━━━━━──────── 2/4 · 50 %).

2. Ask what is missing (interactive-questions, never guessed)

Nothing given: one popup -

  1. Où logger (multi): Discord webhook (Recommended) · Telegram (bot) · Fichier sur la machine · Téléphone (ntfy); Other for Slack, Gotify, an API, a socket.
  2. Détail: Étapes clés (Recommended) (the request, each step, errors, questions, the end and the files) · Minimal (start, end, errors, questions; the steps only in the status) · Tout (every error, the status changes too).

Then the values, each asked when not given (an option Je la colle (Other) to paste it):

  • Discord: the webhook URL - channel settings > Integrations > Webhooks > New webhook > Copy URL. start finds by itself, without posting anything, what the webhook writes into (forum / text channel) and whether it still exists (a deleted webhook fails at once and is left out). One thread per session by default: in a forum channel the thread is made at the first message, remembered (~/.local/state/session-log/threads.json) and used again - with the same status message - whenever this session logs there again (a new start, a resumed session); a thread deleted or locked is replaced by a new one. A text channel cannot get a thread from a webhook (Discord error 220003): recommend a forum channel, or a thread made by hand with #thread=<its id> (right click > Copy Thread ID).
  • Telegram: a bot (BotFather > /newbot > the token) and the chat: the user writes to the bot (or adds it to a group), then https://api.telegram.org/bot<token>/getUpdates shows the chat id. A forum supergroup (topics on) with the bot as an admin allowed to manage topics gets one topic per session, reused; elsewhere the messages carry the session name. The token is a password: kept 0600, never shown.
  • ntfy: a topic name hard to guess (anyone who knows it reads it): https://ntfy.sh/<topic> or a self-hosted server (#header=Authorization:Bearer tk_…); the user subscribes to it in the ntfy app.
  • Mention (Discord, Slack, Telegram), asked with the URL: @here (Recommended) · Un ID (Other: the user's ID, or role:<id>) · Pas de mention -> #mention=here (the default), #mention=<id>, #mention=role:<id>, #mention=no. On Discord, @here in a thread only notifies the thread's members: in a forum, the user follows the post, or gives their ID (a mention adds them to the thread) - start warns about it. ntfy and Gotify call by priority, Telegram by sound: no ID needed. A webhook only sends: answering stays in the terminal.
  • File: the path (default ~/.local/state/session-log/logs/<project>.log), .md for a journal, .jsonl for JSON lines, a folder for copies.
  • API / Slack / Gotify: the URL, a header if it needs a key, whether files are uploaded.
  • Socket: host, port, TCP or UDP, JSON or text. Any target outside this computer receives summaries of the requests: say it once. Every URL or token is a password: never written in a repository or a shared place, kept 0600.

Hooks, checked at each launch (before anything else, stop and list excepted): log.py hooks show (exit 3 = missing). Missing -> ask in the same popup as the rest: Installer les hooks (Recommended) · Annuler, saying what it does: they go in ~/.claude/settings.json (a backup settings.json.bak-session-log next to it) for UserPromptSubmit, the AskUserQuestion questions, PermissionRequest, Notification, PostToolUseFailure, Stop, StopFailure, SessionEnd; they do nothing in a session without a running log. Accepted -> log.py hooks install, then go on. Refused -> cancel: no log is started, one line says so (log.py start refuses to run without them anyway). Installed now: this session sees them once the user opens /hooks (or from the next session) - say it; until then only what Claude sends leaves.

3. Start

log.py hooks show || log.py hooks install    # only after the user accepted (section 2)
log.py start <target> [<target>...] [--name "<project> · <task>"] [--level key] [--text "<what this session is about>"]

Each target gets its first message at once and prints ok (with where the session writes: the Discord thread / Telegram topic, new / reused / given, the kind of chat) or FAIL <why> (a wrong URL or token, a deleted webhook, a closed port): a target that fails is left out; fix it and start it again. start again later adds targets to the running log. Tell the user in one line what is logged where.

4. While working (what Claude sends)

The hooks send by themselves: the request (summarized by Haiku), the questions (they call the user), the permissions asked (the tool and the command, they call), the errors of the tools (one per minute at key, the others counted, they do not call), the end of each turn (summarized by Haiku), the idle session (it calls), the end of the session. Claude adds what only it knows - one short line each, in the user's language:

log.py send "Étape 2/4 : parser écrit et testé"                       # a step: "n/m" gives the progress line everywhere
log.py status "Rendu Blender en cours (≈ 6 min)"                      # a long step starting: the live status only
log.py send "Rapport prêt" --file out/report.pdf                      # a result file (attached / copied where possible)
log.py send "Maquette" --kind info --link https://claude.ai/...       # an artefact, a PR, a page: its link
log.py send "Fait : ... ; reste : ..." --kind done                    # the end of the task: what, where, what is left
log.py send "Bloqué : ... (raison)" --kind error                      # an error that stops the work (it calls)
  • The key steps only (one Bash call each), never a message about the logging itself.
  • Never a secret, a key, a token, the content of a private file (log.py also hides the usual secret patterns), never the whole diff: names and results.

5. Stop

/session-log stop -> log.py stop [s2] --text "<short summary of the session>": a last message 💤 Fin du log (duration since the first start, steps, errors, files), the status turns to Arrêté, then that target (or all) stops; the end of the session stops it too. /session-log clear -> log.py clear: the messages the log of this session posted on Discord (the webhook's) and Telegram (the bot's; within 48 h in a group) are deleted - their ids are kept in posted.jsonl (0600); it then lists what stays (Slack, ntfy, Gotify, sockets cannot be undone by the sender; the files are the user's to delete). The hooks stay installed and idle (no running log = nothing done); /session-log uninstall -> log.py hooks uninstall removes them.

How it works

  • State: ~/.local/state/session-log/<session id>/ (config.json 0600, the queue, errors.log, status.json); the session is $CLAUDE_CODE_SESSION_ID, the hooks get it from Claude Code, so several sessions log at the same time. threads.json remembers per target and session the thread / topic, the status message and that it logged there.
  • One queue per session and one worker in the background: the events leave in order, the session never waits; rate limits (Discord, Telegram) are waited for; a failing target is written to errors.log (log.py list), the others go on.
  • Haiku: claude -p --model haiku in a separate process (no tools, no saved session, never a fork), only for a text longer than ~220 characters; it fails -> the text cut short. --no-summary at start turns it off.
  • The live status: a message edited in place on Discord and Telegram; next to a log file, a status file rewritten at each event with one block per session that logs there (boards.json keeps them a week); in each JSON record.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.