restart
Use when the user invokes /restart in Claude Code, $restart in Codex, asks you to restart yourself, or signals a planned shutdown.
Skill by matty-v
Chalk Labs
Need help deploying restart?
Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/matty-v-restart
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: agent-building
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/restart
What's inside
- Skill name
restart- Description
- Use when the user invokes /restart in Claude Code, $restart in Codex, asks you to restart yourself, or signals a planned shutdown. Saves a session summary and any new memories, commits + pushes the identity repo, sends a heads-up message, then exits cleanly so the next session can resume seamlessly.
- License
- Apache-2.0
- Instructions
- 106 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# /restart — Save state and shut down for planned restart
When invoked, do the following in order. If any step fails, **do not exit** — surface the error and wait for the user's instruction.
## Step 1: Review the current session in your context
You already have the full session in working memory. Identify:
- What was the user trying to accomplish in this session?
- What major actions or decisions happened?
- What's still in flight or unresolved?
- Which files, repos, or branches were touched and matter for picking up next time?
## Step 2: Save persistent memories
Run the `w` skill flow (review the conversation for memorable items, write them to `memory/` as new entries or updates to existing entries, refresh `MEMORY.md`). Skip if nothing new is worth saving.
## Step 3: Write `state/last-session-summary.md`
Write a markdown file at `~/dev/{{ .AgentName }}-agent/state/last-session-summary.md` with this structure:
```markdown
# Last Session Summary
**Session ended:** <ISO 8601 UTC timestamp>
**Channel ID:** <chat_id / channel ID from any inbound message in this session, or "unknown">
## What we were working on
<1–3 sentences>
## Key outcomes this session
- <bullet>
- <bullet>
## Open threads / next steps
- <bullet>
- <bullet>
## Active context
- Repos: <list>
- Branches: <list>
- Files in flight: <list>
## Notes for next session
<anything future-you should know — gotchas, half-finished thoughts, things the user cares about>
```
The `Channel ID` field is critical when the agent has an external channel (Telegram, Slack) — the resume handshake on next startup needs it to know where to send the heads-up message. Pull it from any inbound channel block in the current conversation. Skip the field if the agent is session-only.
## Step 4: Verify git state and push explicitly
Run:
```bash
cd ~/dev/{{ .AgentName }}-agent
git status
```
The auto-backup hook should have already committed `state/last-session-summary.md` as a side-effect of the Write tool. If `git status` shows anything uncommitted, commit it manually:
```bash
cd ~/dev/{{ .AgentName }}-agent
git add state/last-session-summary.md memory/
git commit -m "state: planned restart — session summary saved"
```
Then push and verify:
```bash
cd ~/dev/{{ .AgentName }}-agent
git push
```
If `git push` fails (network, auth, conflict), **do not exit**. Tell the user:
> "/restart blocked: git push failed with `<error>`. Holding here until you tell me how to proceed."
Wait for instruction.
## Step 5: Touch the save-complete sentinel (if Kyber is driving the restart)
If `/persist/var/run/` exists (Kyber pod), touch the sentinel so the controller knows the save is done and can proceed with the actual stop:
```bash
mkdir -p /persist/var/run 2>/dev/null
touch /persist/var/run/last-save.done 2>/dev/null
```
(No-op outside Kyber.)
## Step 6: Heads-up
Send one final message to the user via the agent's primary channel (Telegram, Slack, session text):
> "Session ended at `<time>`. Summary saved and pushed (`<short commit hash>`). Standing by for restart."
## Step 7: Exit cleanly
Once steps 1–6 are confirmed, exit the session. The next time `{{ .AgentName }}` starts, the Resume Handshake (in `AGENTS.md`) will read the summary and available continuity files and send the "{{ .AgentName }} online" message.From matty-v/kyber-agent-template, Apache-2.0.
More from matty-v/kyber-agent-template
- 0.524score
compact-memory
matty-v
Use when asked to compact, curate, or prune long-term memory, or when fired by the weekly memory-compaction job.
SkillBFreshness: BClaude Code +9 - 0.524score
sync-identity
matty-v
The standard, only-safe way to save any change to your own agent identity repo — SOUL, PRINCIPLES, AGENTS.md, skills/, docs/, memory/, state/.
SkillBFreshness: BClaude Code +9 - 0.520score
w
matty-v
Use when the user invokes /w in Claude Code, $w in Codex, or asks to save memories from the current session.
SkillBFreshness: BClaude Code +9 - 0.519score
wq
matty-v
Use when the user invokes /wq in Claude Code, $wq in Codex, or asks to save memories and exit.
SkillBFreshness: BClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Aug 21, 2026 (2 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- Apache-2.0
- Repository
- github.com/matty-v/kyber-agent-template
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from matty-v
- 0.524score
compact-memory
matty-v
Use when asked to compact, curate, or prune long-term memory, or when fired by the weekly memory-compaction job.
SkillBFreshness: BClaude Code +9 - 0.524score
sync-identity
matty-v
The standard, only-safe way to save any change to your own agent identity repo — SOUL, PRINCIPLES, AGENTS.md, skills/, docs/, memory/, state/.
SkillBFreshness: BClaude Code +9 - 0.520score
w
matty-v
Use when the user invokes /w in Claude Code, $w in Codex, or asks to save memories from the current session.
SkillBFreshness: BClaude Code +9 - 0.519score
wq
matty-v
Use when the user invokes /wq in Claude Code, $wq in Codex, or asks to save memories and exit.
SkillBFreshness: BClaude Code +9
Done for you
Rather not set it up yourself?
Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.
See how we build AI agents →Read the case studies
Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.
- launches shipped
- 50+
- launches shipped
- media placements
- 500+
- media placements
- founders on every account
- 2
- founders on every account
Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block
Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.
Get restart running in your business
Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.
Cite this page
restart skill. Agent Mart. https://agentmart.dev/skills/matty-v-restart (last updated 2026-10-24)