Skip to content
NewA realistic 3D head for a free swim cap editor
Nov 19, 2026·4 MIN READ
A Claude Code skill that tells me when I drift off the main thread

A Claude Code skill that tells me when I drift off the main thread

I jump between projects and side ideas all day. A small always-on skill now marks every side thread with one line, still does the work, and points me back to the task I started.

A typical session of mine starts with one task and ends with five. I check an app version in the store, then I get an idea for a new tool, then I fix the terminal colours, and the first task is still open somewhere above. Today I asked Claude Code for something that works in the background and tells me when I start to drift. I call it my ADHD skill. In the plugin it is ms-adhd.

Skill or hook

My first thought was a hook, because hooks run on every message without me asking. But a hook is a shell script. It can add text to the prompt, but it cannot judge whether "add a badge to the terminal" belongs to the task I started an hour ago. That judgement needs the model and the whole conversation.

So it is a skill, and it is always on: one line in my global CLAUDE.md lists it next to the other skills that run in every session. Claude Code reads that file at the start of a session, and from then on the skill checks every message.

flowchart LR
    A["New message"] --> B{"Main thread open?"}
    B -- no --> C["Becomes the new main thread"]
    B -- yes --> D{"Leads away from it?"}
    D -- no --> E["Normal reply"]
    D -- yes --> F["🧭 signal, then do it"]
    F --> G["🧭 Back to: next step"]

What it does

The main thread is the first real task of the session, or whatever I set with main: <topic>. When a new message leaves it, the reply starts with one line:

top of the reply
🧭 Side thread: logbook article about ms-adhd. Main thread: the terminal badge is done but not committed.

Then it does what I asked. It never refuses and never asks for permission, with one exception: if the side thread is big (several minutes of work, or changes in another repo), it asks "Do it now, or park it?" and waits. At the end of the reply comes a line that leads back, 🧭 Back to: <next step>.

The hard part was deciding what not to flag. A focus guard that fires on every message is just another notification I learn to ignore.

MessageSignal
Work on another repo or clientyes
A new idea or tool the task does not needyes
"While we are here" polishyes
A quick question with a short answerno
A step the task needs (a failing test, a login)no
My answer to a question the agent askedno
"New topic", said on purposeno, it becomes the main thread

When the skill is not sure, it stays quiet. One false alarm costs more trust than one missed tangent.

Parking, so nothing is lost

The point is not to stop side ideas. Some of them are good. So "park it" puts the side thread on a short list for the session, and the skill offers once to turn it into a GitHub issue in the repo it belongs to. When the main thread is finished, I see the parked list and pick the next thing.

main: topic

Sets the main thread by hand when the first message was only a warm-up.

where was I

Shows the main thread, the next step on it, and everything parked.

adhd off

Mutes the signals for the rest of the session. adhd on brings them back.

The first real signal

Right after the skill was committed, I moved on to the terminal: I wanted a big badge with the client name in every iTerm2 tab. The badge script was done and waiting for me to check it. Before I had looked, I asked for this article. The reply opened with a 🧭 line naming both things. That is exactly the case it was built for. The article was a deliberate switch, so it went ahead, but the open task was on screen and not forgotten.

An always-on skill lives in the instructions file, and in a very long session the model can lose sight of it. A short reminder injected by a UserPromptSubmit hook on every message would fix that. I have not added it yet.

What it took

One SKILL.md of about 70 lines, one line in CLAUDE.md and one row in the plugin README. Writing it took minutes. The thinking went into the "do not signal" list and the rule that it never blocks. Next time I build something like this I will start from the false alarms, not from the alarm.

Share
Mariusz Smenżyk
Written by

Mariusz Smenżyk

Builder for sport. Make. Test. Launch.

Related notes