session-management

session-management is a skill for Claude Code, Codex from troyjthomas/ios-agent-skills. It costs 64 tokens per session (1,787 once invoked), scanned A, original, MIT.

A method for preserving project context across Claude Code sessions, including after a restart or an expired context window. Claude Code starts a new session without memory and relies on files such as CLAUDE.md.

In plain words
What is it for?
Use it when opening an existing project, resuming work, or noticing that context has become unreliable. It organizes always-needed rules in CLAUDE.md and keeps detailed material in separate files.
Why use it?
It reduces repeated explanations and helps prevent mistakes caused by missing or overloaded project instructions.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions CLAUDE.md; mentions Claude Code.

Good fit Use it when opening an existing project, resuming work, or noticing that context has become unreliable. It organizes always-needed rules in CLAUDE.md and keeps detailed material in separate files.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/troyjthomas/ios-agent-skills/session-management
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add troyjthomas/ios-agent-skills --skill session-management
Clone the repo
git clone --depth 1 https://github.com/troyjthomas/ios-agent-skills

Made for: Claude Code, Codex.

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-management

README.md
[![agentmods](https://agentmods.dev/badge/skills/troyjthomas/ios-agent-skills/session-management/github.svg)](https://agentmods.dev/skills/troyjthomas/ios-agent-skills/session-management)
Your own site
<a href="https://agentmods.dev/skills/troyjthomas/ios-agent-skills/session-management"><img src="https://agentmods.dev/badge/skills/troyjthomas/ios-agent-skills/session-management/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for session-management

Your own site · 80×15
<a href="https://agentmods.dev/skills/troyjthomas/ios-agent-skills/session-management"><img src="https://agentmods.dev/badge/skills/troyjthomas/ios-agent-skills/session-management.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 64 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,787 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.
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.00064 $0.01787
Opus 5 $0.00032 $0.00894
Sonnet 5 $0.00013 $0.00357
Haiku 4.5 $0.00006 $0.00179

Measured 9d ago against content hash 57f725096e89, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

session-management 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 9d 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.

skills/session-management/SKILL.md · 208 lines

How it starts

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

Session Management

Claude Code has no memory between sessions. Every new session starts blank and reads your CLAUDE.md. This skill ensures continuity.

Context Window Management

Claude Code's context window is large but finite. Everything loaded into it competes for attention. Overload it and quality drops.

The 500-Line Rule

Your CLAUDE.md should stay under 500 lines. This is the file loaded into every session. If it's too long, Claude Code starts ignoring rules at the bottom.

What belongs in CLAUDE.md (always loaded):

  • Core principles (native SwiftUI, iOS version, HIG)
  • Navigation structure
  • Architecture conventions
  • Custom components list
  • What NOT to do
  • Known gotchas
  • Build configuration
  • .pbxproj safety rule

What belongs in separate files (loaded when needed):

  • App spec (APP_SPEC.md)
  • Design system (DESIGN_SYSTEM.md)
  • Detailed component specs
  • Reference documentation

Per-Session Context Loading

At the start of each session, tell Claude Code what to focus on:

Read CLAUDE.md. Today we're working on the Settings flow.
Also read the Settings section of APP_SPEC.md. Ignore other
sections for now.

This focuses the context on what matters for THIS session rather than loading everything.

Signs of Context Overload

  • Claude Code starts ignoring rules from your CLAUDE.md
  • It builds custom components when native ones exist
  • It forgets the architecture pattern mid-session
  • Responses get slower or less precise
  • It repeats mistakes you've already corrected

Fix: Start a new session. Load only the CLAUDE.md and the specific section you're working on. Keep the scope narrow.

Session Continuity

The Problem

Claude Code sessions don't survive Mac restarts, long periods of inactivity, or network timeouts. When a session ends, all conversation context is lost. The code on disk is fine (it's committed to git), but Claude Code doesn't know what it was doing.

The Solution: Git as Your Checkpoint System

Your git history IS your session memory. Every commit message tells the next session what happened.

Read the full file on GitHub · 208 lines

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. 9d ago First seen · 208 lines · 64 tokens per session scan A 57f725096e89

Subscribe to this mod's changes

session-management is a skill published in the GitHub repository troyjthomas/ios-agent-skills (2 stars, last pushed 3mo ago), licensed MIT. It adds 64 tokens to every session and 1,787 once invoked, about $0.0003 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-31.

Related

Other skills, from other repositories

context-engineering

A project documentation framework that records a project's goals, requirements, roadmap, and current state in separate files. It also keeps those documents within set size limits for an AI coding agent.

hashgraph-online/awesome-codex-plugins · 73 tokens

error-experience-library

An error knowledge base that stores recurring error patterns, their causes, and the fixes that worked. It can search past entries and track whether each suggested fix succeeded.

hashgraph-online/awesome-codex-plugins · 46 tokens

mnemos

Task-scoped memory lifecycle — typed MnemoGraph prevents lossy context compaction by treating facts/decisions/code-refs/handoffs as distinct node types with per-type eviction policies.

alinaqi/maggy · 40 tokens

durable-session-state

Persist plans, scope decisions, evidence, and reviewer/critic verdicts to durable files during long or multi-phase tasks so work survives context compaction, session resumes, and handoffs. Use for swarm-mode tasks, before context grows large, when recording approval gates, and when resuming after compaction or a…

ZaxbyHub/opencode-swarm · 70 tokens

token-optimization

Use when the user says 'token optimization', 'save tokens', 'context window', 'reduce tokens', 'token stack', or 'TokenStack', or asks about extending context window capacity. Covers TokenStack, the built-in compression proxy that shrinks Claude Code tool output before it reaches the Anthropic API. Do NOT use for…

cwinvestments/memstack · 79 tokens

grimoire

Use when the user says 'update context', 'update claude', 'save library', or after significant project changes.

cwinvestments/memstack · 28 tokens