agentleFS
shakhruzshakhruz/mila-core/skills/mila-session/SKILL.md

mila-session

Skill3 starsChanged 13 days agoApache-2.0View on GitHub

Use when starting or restarting a Claude Code session with the mila-telegram plugin, or a silent channel (receiver, bridge, journal): one command, health check, repair.

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

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

    After any restart → mila status: the cursor must catch up with the journal size.

    line 73

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “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

When to use (full): Start or resume a Claude Code session with the mila-telegram plugin using one short command, and check channel health. Use when starting or restarting a session, diagnosing a silent channel (receiver, bridge, journal), or repairing it without restarting the session.

mila — one command for the session

The real launch line is unreadable and nobody types it by hand:

claude --dangerously-load-development-channels plugin:mila-telegram@mila-marketplace --continue

mila wraps it, and brings the channel up first if it is down.

Commands

CommandWhat it does
milaresume the last session (--continue) with the plugin
mila newstart a fresh session
mila pickchoose a session from the list (--resume)
mila statuschannel health: receiver · bridge · journal
mila fixrestart the receiver, leaving the session alone
mila helpusage

Anything after the command is passed to claude as-is: mila new --model opus.

Before launch

It checks the receiver daemon and starts it via the process supervisor if it is down. The order matters: the daemon must be running before the session starts — while no session exists it keeps collecting inbound messages into the journal, so nothing is lost.

Reading mila status

Three links in the chain, each fails differently:

  • receiver (receiver.ts, RECEIVER_DAEMON=1) — polls Telegram and appends to the journal. Down → inbound messages are lost for good.
  • bridge (bun server.ts) — part of the session's MCP server, replays the journal into the session. It lives only as long as the session does. Dead bridge with a live receiver is silent deafness: messages are accepted but never reach the model.
  • journal — cursor compared to the size of events.jsonl. A gap while the receiver is alive is the tell-tale sign of a dead bridge.

Seeing inbound messages in the session

With the daemon running, the session no longer polls Telegram — the bridge replays the journal via mcp.notification. Those replayed notifications are not reliably rendered in the terminal, so an inbound message can arrive unseen.

Two mechanisms close that gap, and they share one marker file (inbound/seen, a byte offset), so nothing is reported twice:

  • UserPromptSubmit hook (telegram-inbox-feed.py) — on every user turn it reads the journal and prints anything unread as <channel …> blocks, the same shape the upstream plugin produces. This is what makes messages visible in the session itself.
  • mila inbox — prints unread messages on demand and marks them seen.

Bot-to-bot chatter is filtered out by sender name; only humans surface.

What to do when

  • Channel silent, receiver up → look at the bridge. If it is dead, restart the session (mila); no edit fixes it.
  • Replies not going out → mila status; the session sends through the plugin's reply tool, there is no separate sender.
  • After any restart → mila status: the cursor must catch up with the journal size. That is the only check proving the backlog was replayed.

Why it exists

A dead bridge once cost the owner 34 minutes of writing into silence: the receiver was healthy, the journal was filling up, and from the outside the channel looked exactly like a working one. mila status makes that state visible in a second.

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.