← sources

How do you keep a skill active after context compaction?

source: reddit (reddit:ClaudeAI)published 2026-10-26 07:45ingested 2026-10-27 02:36

retained text

I've been building an open-source Claude Code skill that's supposed to stay "on" for the whole session: it adds short learning notes under the code as I build.

It works fine at the start, but after compaction Claude tends to forget it's active and just stops following the skill's rules.

My current fix is a hook that re-injects a short reminder while the skill is active. It works, but it feels like a workaround.

How are you handling this?

Curious what's worked for people with long sessions.

document fetched 2026-10-27 00:23 · canonical https://reddit.com/r/ClaudeAI/comments/1xfqg0c/how_do_you_keep_a_skill_active_after_context