end-agent-session
Skill0 starsChanged 5 months agoMITView on GitHub
Use when the user wants to unload a currently active agent persona and return to the default orchestrator. Clears the agent's behavioral overlay and announces the transition.
In this repository34 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- architectureSkill
- code-reviewSkill
- debugSkill
- dep-auditSkill
- deploy-checklistSkill
- documentationSkill
- incident-responseSkill
- likec4-dslSkill
- load-agentSkill
- manual-testSkill
- market-scanSkill
- new-agentSkill
- new-goal-loopSkill
- nexus-microSkill
- nexusSkill
- nexus-sprintSkill
- orchestration-cost-policySkill
- persona-forgeSkill
- project-onboardSkill
- prompt-refinerSkill
- public-readinessSkill
- release-prepSkill
- render-mermaidSkill
- secrets-syncSkill
- standupSkill
- system-designSkill
- tech-debtSkill
- testing-strategySkill
- tmux-session-captureSkill
- tsdocSkill
- web-ui-automation-componentsSkill
- web-ui-automation-surveySkill
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 9 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 24
No arguments are expected.
- Distinctive: line 28
Run the state check command:
- Distinctive: line 34
If no agent is currently active, inform the user that no agent session is loaded and stop here.
- Distinctive: line 35
If an agent is active, note the agent name and division from the output and proceed.
- Distinctive: line 41
Before deleting state, capture the agent name and division from the Phase 1 result.
- Distinctive: line 69
Do NOT skip the state check in Phase 1.
- Distinctive: line 70
Do NOT continue speaking in the agent's persona after the teardown block has been emitted.
- Distinctive: line 71
Do NOT delete state before reading the agent name.
- Distinctive: line 72
Do NOT proceed to Phase 2 if Phase 1 shows no active agent.
≈ “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.
Files
End Agent Session
Unload the currently active SUMMON agent persona and return to the default orchestrator. Clears the behavioral overlay and confirms the transition in a neutral tone.
User Input
$ARGUMENTSNo arguments are expected. If arguments are provided, ignore them and proceed with the teardown flow.
Phase 1: Check State
Run the state check command:
uv run ${CLAUDE_PLUGIN_ROOT}/scripts/summon.py state check- If no agent is currently active, inform the user that no agent session is loaded and stop here. Do not proceed to Phase 2.
- If an agent is active, note the agent name and division from the output and proceed.
Phase 2: Teardown
Step 1: Record Agent Identity
Before deleting state, capture the agent name and division from the Phase 1 result. You need these for the teardown announcement.
Step 2: Delete State
Run:
uv run ${CLAUDE_PLUGIN_ROOT}/scripts/summon.py state deleteStep 3: Announce Teardown
Output the following block, replacing {agent-name} with the name captured in Step 1:
=== AGENT SESSION ENDED ===
The agent session for {agent-name} has been terminated.
Return to your default orchestrator persona. The behavioral instructions
between the previous AGENT SESSION ACTIVE markers are no longer in effect.
=== END SESSION TERMINATION ===Step 4: Confirm to User
Confirm to the user in a neutral tone that the agent session has ended and you have returned to default behavior. Do NOT use the agent's character, voice, or mannerisms in this confirmation -- speak as the plain orchestrator.
Anti-Patterns
- Do NOT skip the state check in Phase 1. Always verify an agent is loaded before attempting teardown.
- Do NOT continue speaking in the agent's persona after the teardown block has been emitted.
- Do NOT delete state before reading the agent name. The name is needed for the announcement.
- Do NOT proceed to Phase 2 if Phase 1 shows no active agent.
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
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.

