session-refresh

session-refresh is a skill for Claude Code from leopu00/job-hunter-team. It costs 151 tokens per session (4,632 once invoked), scanned A, original, MIT.

An administrative workflow for refreshing long-running AI agent sessions when their context becomes too full. It records a concise retrospective, updates a daily journal and recreates the session with continuity.

In plain words
What is it for?
Checking session context usage, deciding which sessions need refreshing, recording progress and handing work to a newly created session.
Why use it?
It helps agents continue useful work without losing important history when their conversation context grows too large.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions Codex.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is Bash(tmux *), Bash(python3 *), Bash(bash /app/.launcher/start-agent.sh *), Bash(jht-tmux-send *), Bash(/app/agents/_skills/tmux-send/jht-tmux-send *), Bash(slee.

Good fit Checking session context usage, deciding which sessions need refreshing, recording progress and handing work to a newly created session.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/leopu00/job-hunter-team
agentmods
npx agentmods add skills/leopu00/job-hunter-team/session-refresh

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for session-refresh

README.md
[![agentmods](https://agentmods.dev/badge/skills/leopu00/job-hunter-team/session-refresh.svg)](https://agentmods.dev/skills/leopu00/job-hunter-team/session-refresh)
Your own site
<a href="https://agentmods.dev/skills/leopu00/job-hunter-team/session-refresh"><img src="https://agentmods.dev/badge/skills/leopu00/job-hunter-team/session-refresh.svg" alt="Measured on agentmods" height="20"></a>
Per session 151 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,632 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00151 $0.04632
Opus 5 $0.00076 $0.02316
Sonnet 5 $0.00030 $0.00926
Haiku 4.5 $0.00015 $0.00463

Measured 8d ago against content hash 9222f6cb15f3, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

session-refresh scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/_skills/session-refresh/SKILL.md · 185 lines

How it starts

The opening of the file, as written. The whole thing — 185 lines — stays where its author put it; the contents beside it link to each section on GitHub.

session-refresh — clear agent context, keep continuity

You (the Dottore) are spawned at a scheduled slot (+30min from the work-window start, or at mid window). Your job this round is not liveness-pinging — it is to refresh the context of the active agent sessions: each long-running session accumulates a bloated context window; you summarize what it did, persist it, then recreate the session fresh and hand back the continuation.

Why this exists: the old Dottore burned ~51% of team budget pinging [HEALTH] every 2h with zero useful checks. This round is rare (2×/window) and produces a durable, dense journal of the team's work.

Step 0 — window start (the analytics window)

WIN_START=$(python3 -c "import sys; sys.path.insert(0,'/app'); from shared.skills.working_hours import current_window_bounds as b; w=b(); print(w[0].isoformat() if w else '')")
# 24/7 (no window): fall back to the last 6h
[ -z "$WIN_START" ] && WIN_START=$(python3 -c "import datetime; print((datetime.datetime.now(datetime.timezone.utc)-datetime.timedelta(hours=6)).isoformat())")
ROUND_ID=$(date -u +%Y%m%dT%H%M%SZ)
DAY=$(date -u +%F)
JOURNAL=/jht_home/logs/doctor-retrospective.jsonl
ROUND_HEADS_UP_SENT=0

Step 1 — list sessions + age, decide order

tmux list-sessions -F '#{session_name}|#{session_created}'
  • Order: worker sessions FIRST (SCOUT-N · ANALISTA-N · SCORER-N · SCRITTORE-N · CRITICO-S*), coordinators LAST and with care (ASSISTENTE · MENTOR · SENTINELLA · CAPITANO). "With care" means capture their state well and compact them — NOT skip them (they are the top consumers; see Rules). Never refresh DOTTORE / DOCTOR-WATCHDOG (yourself / the scheduler).
  • FRESH skip (cheap pre-filter before the context check): age = now - session_created. If age < 40 min → SKIP entirely (nothing to summarize yet, and refreshing would throw away a session that just started). Log action=skipped_fresh. Everything that survives this pre-filter goes through Step 1.4 (TTL) and then Step 1.5 (context check) — that >50% measurement, not age, is what decides the ordinary refresh.

Read the full file on GitHub · 185 lines

Files

What ships with it

6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 185 lines · 151 tokens per session scan A 9222f6cb15f3

Subscribe to this mod's changes

session-refresh is a skill published in the GitHub repository leopu00/job-hunter-team (49 stars, last pushed yesterday), licensed MIT. It adds 151 tokens to every session and 4,632 once invoked, about $0.0008 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.