auto-compact-topic-shift
Use when you need to detect topic shifts in conversation and automatically trigger context compaction. Universal skill for all Pantheon gods.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when you need to detect topic shifts in conversation and automatically trigger context compaction. Universal skill for all Pantheon gods.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Use when the user says 'set up a report', 'create a digest', 'I want a daily/weekly summary of', 'monitor X and report on Y', or any request for scheduled information synthesis. Produces a Conductor workflow + rules for scheduled reports and digests.
Use when the user says 'when X happens, do Y', 'set up a rule for', 'react to', or any request to define an event-driven trigger. Produces a Conductor reaction rule YAML and saves it to ~/pantheon/conductor/rules/.
Use when the user says 'set up a webhook', 'connect X service to Pantheon', 'receive notifications from Y', or any request to bring external events into the Pantheon. Produces a webhook integration config and rule, saved to ~/pantheon/conductor/webhooks/ and ~/pantheon/conductor/rules/.
Use when the user says 'set up a pipeline', 'create a workflow', 'I need a multi-god process', or any request to chain multiple gods into a repeatable sequence. Produces a Conductor workflow YAML and saves it to ~/pantheon/conductor/workflows/.
Conductor handoff and acknowledgement protocol for Pantheon gods
Use after a design spec is written, before any implementation begins. Runs a structured assessment of holes, risks, pros/cons, system conflicts, overhead, and a go/no-go verdict. Must be completed before build handoff.
| name | auto-compact-topic-shift |
| description | Use when you need to detect topic shifts in conversation and automatically trigger context compaction. Universal skill for all Pantheon gods. |
| version | 1.0.0 |
| author | Pantheon |
| license | MIT |
| metadata | {"hermes":{"tags":["pantheon","universal","topic-shift","compaction","session-management"],"related_skills":[],"config":{"auto_compact_topic_shift":{"auto_threshold":{"description":"Confidence threshold (0.0-1.0) above which to auto-trigger compaction without asking","type":"float","default":0.75},"suggest_threshold":{"description":"Confidence threshold (0.0-1.0) above which to suggest a topic shift to the user","type":"float","default":0.4},"compaction_style":{"description":"What to do on detection: 'compress' (compact context in-place) or 'new_session' (signal for a fresh session)","type":"string","default":"compress"},"enabled":{"description":"Master toggle — set false to disable topic-shift detection","type":"boolean","default":true}}}}} |
Purpose: Automatically detect when the user shifts topics mid-conversation and trigger context compaction — keeping session context clean and avoiding token waste.
This is a universal Pantheon skill designed for all gods (Hermes, Hephaestus, Apollo, and any future god). Load it in your SOUL.md or profile config to get topic-shift awareness in every session.
Conversations naturally drift between topics. Without detection, the old topic's context stays in the window — wasting tokens, diluting focus, and making the god less responsive. This skill teaches you to:
After every exchange, maintain a compact "current topic" label in your working context — a short phrase (3-8 words) describing the active subject.
Examples:
"Pantheon knowledge graph layer implementation""Debugging the MCP server import error""Apollo's lyric-writing workflow setup"Derive this label from the last 3-5 exchanges. If you've just started a session, the first user message defines the initial topic.
When a new user message arrives:
confidence = analyze_shift(current_topic, new_message)
Your shift confidence score factors:
Total confidence is a weighted sum: (lexical × 0.4) + (semantic × 0.4) + (structural × 0.2)
if confidence >= auto_threshold (0.75):
→ AUTO-TRIGGER: Compact context, acknowledge shift, start fresh focus
elif confidence >= suggest_threshold (0.40):
→ SUGGEST: "Looks like we're shifting topics — mind if I compress and refocus?"
else:
→ CONTINUE: Update current topic label, respond normally
compress (default)When auto-triggering:
new_sessionWhen auto-triggering:
Configure per-god via their config.yaml under skills.auto_compact_topic_shift:
skills:
auto_compact_topic_shift:
auto_threshold: 0.75 # auto-trigger at 75% confidence
suggest_threshold: 0.40 # suggest at 40% confidence
compaction_style: compress # 'compress' or 'new_session'
enabled: true # master toggle
If not set, defaults from the skill frontmatter apply.
False positives on follow-up questions — A user asking "how does that connect to X?" is NOT a topic shift; it's a connection request. Check that the message introduces genuinely new entities/subject matter, not just a broadening of the current topic.
Over-triggering on short messages — A one-word response like "cool" or "okay" is not a topic shift. Skip analysis on messages under 5 words unless they contain explicit structural cues ("anyway", "new topic").
Under-triggering after long context — After 50+ exchanges, even subtle shifts should trigger because the context window is already strained. Lower your effective thresholds by 10% when conversation history exceeds 30 exchanges.
Conflicting with built-in compression — The agent already has compression.enabled and compression.threshold for token-based compression. This skill is for semantic topic-shift detection, not token management. They complement each other.
God-specific confusion — If you're a single-purpose god (e.g., Apollo focused on lyric writing), topic shifts are rare. Raise auto_threshold to 0.90 to avoid false triggers. If you're a generalist god (Hermes), keep defaults.
Don't compress mid-task — If the user's topic shift is followed by "and now let me explain further about X", delay compaction until the user has finished their full statement. Only act on a complete user turn.
/skills or response behavior)enabled: false stops all detection