context-lifecycle

context-lifecycle is a skill for Claude Code, Codex from hashgraph-online/awesome-codex-plugins. It costs 46 tokens per session (1,866 once invoked), scanned A, original, Apache-2.0.

A context-management system for long, multi-step Claude Code sessions. It keeps summaries, full archived details, and project notes so important information can survive context compression, which shortens older conversation content to make room for new work.

In plain words
What is it for?
Use it to organise working memory, create session summaries, archive full conversation details, maintain project memory across sessions, and recall information during long tasks.
Why use it?
Long sessions can lose key decisions, tool results, or code details when the available conversation space fills up. This approach preserves the important parts and allows older details to be retrieved when needed.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: reads .claude/ paths; mentions Claude Code.

Good fit Use it to organise working memory, create session summaries, archive full conversation details, maintain project memory across sessions, and recall information during long tasks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/hashgraph-online/awesome-codex-plugins/context-lifecycle
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 hashgraph-online/awesome-codex-plugins --skill context-lifecycle
Clone the repo
git clone --depth 1 https://github.com/hashgraph-online/awesome-codex-plugins

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 context-lifecycle

README.md
[![agentmods](https://agentmods.dev/badge/skills/hashgraph-online/awesome-codex-plugins/context-lifecycle.svg)](https://agentmods.dev/skills/hashgraph-online/awesome-codex-plugins/context-lifecycle)
Your own site
<a href="https://agentmods.dev/skills/hashgraph-online/awesome-codex-plugins/context-lifecycle"><img src="https://agentmods.dev/badge/skills/hashgraph-online/awesome-codex-plugins/context-lifecycle.svg" alt="Measured on agentmods" height="20"></a>
Per session 46 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,866 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.00046 $0.01866
Opus 5 $0.00023 $0.00933
Sonnet 5 $0.00009 $0.00373
Haiku 4.5 $0.00005 $0.00187

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

Security

Grade A, and why

context-lifecycle 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 3d 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.

plugins/Colin4k1024/tsp/skills/context-lifecycle/SKILL.md · 165 lines

How it starts

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

Context Lifecycle Skill

管理 Claude Code 长时多轮任务中的上下文生命周期,避免压缩导致关键细节丢失。

架构概览

┌──────────────────────────────────────────────────────┐
│                 上下文窗口 (200K tokens)                │
│                                                        │
│  ┌──────────┐ ┌──────────┐ ┌────────────┐ ┌────────┐ │
│  │  System   │ │  Ledger  │ │  Working   │ │ Buffer │ │
│  │  (10%)    │ │  (10%)   │ │  (65%)     │ │ (15%)  │ │
│  │ protected │ │ protected│ │ 主工作区    │ │ 溢出区  │ │
│  └──────────┘ └──────────┘ └────────────┘ └────────┘ │
└──────────────────────────────────────────────────────┘
         ↕ 渐进压缩                ↕ 按需召回
┌──────────────────────────────────────────────────────┐
│  L1: 摘要 + L2 引用   →   L2: 全文归档 (索引)         │
│  (替换 L0 原文)             (~/.claude/memory/)       │
│                                                        │
│  L3: 项目记忆 (跨会话)  →  docs/memory/ + Phase Ledger │
└──────────────────────────────────────────────────────┘

四层记忆模型

层级 名称 位置 内容 生命周期
L0 工作记忆 上下文窗口 当前对话、工具结果、代码 当前会话
L1 摘要记忆 上下文窗口 (替换 L0) 压缩摘要 + L2 归档引用 当前会话
L2 详情归档 ~/.claude/memory/sessions/{sid}/ 完整原文、关键词索引 本地持久
L3 项目记忆 docs/memory/ Phase Ledger、决策日志、经验 跨会话持久

渐进压缩策略

压缩基于 Working Zone 使用率,而非整体上下文使用率:

Working 使用率 压缩级别 操作
< 60% 保持 L0 原文
60% L0→L1 摘要工具结果、旧对话,原文归档到 L2
75% L1→L2 摘要 L1 内容,更老的摘要归档到 L2
90% L2→L3 紧急压缩,决策提升到项目记忆

阶段感知优先级

压缩时的保留/归档决策受当前任务阶段影响:

阶段 优先保留 优先归档
Planning 需求、边界、约束 探索性讨论
Design 架构决策、接口契约 备选方案分析
Implementation 当前文件、测试结果 设计讨论
Testing 测试结果、缺陷 实现细节
Review 评审结论、修改建议 测试细节

核心组件

库模块 (scripts/lib/)

模块 职责
phase_tracker.py 任务阶段状态机,多信号检测(命令 / handoff / 工具启发)
phase_ledger.py 阶段交接账页,在阶段切换时生成结构化 Markdown
context_budget.py 四分区预算模型,Zone-aware 压缩级别判定
context_archiver.py L2 归档写入、关键词索引、去重、批量归档
context_recall.py 按需召回:关键词 / 阶段 / 类型 / 决策多维检索
context_priority.py 上下文元素优先级评分(已有)

Read the full file on GitHub · 165 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. 3d ago First seen · 165 lines · 46 tokens per session scan A 876121d23ec9

Subscribe to this mod's changes

context-lifecycle is a skill published in the GitHub repository hashgraph-online/awesome-codex-plugins (956 stars, last pushed today), licensed Apache-2.0. It adds 46 tokens to every session and 1,866 once invoked, about $0.0002 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-09-05.

Related

Other skills, from other repositories

search

Search 2500+ curated ChatGPT and LLM open-source repositories. Use when the user asks to find tools, libraries, or repos related to ChatGPT, LLMs, RAG, agents, langchain, NLP, AI development, or any open-source AI tooling.

taishi-i/awesome-ChatGPT-repositories · 57 tokens

vellum-memory-v3-migration

One-time migration of an existing memory-v2 concept corpus into the memory-v3 section-grain "wiki" — topical articles with a stand-alone lead and queryable sections — with loss-proof staging, assistant-reviewed authoring, and a retrieval-eval gate before cutover.

vellum-ai/vellum-assistant · 63 tokens

levelup-specify

Extract Context Directive Records (CDRs) from the current session after completing work. Identifies reusable patterns (rules, personas, examples, evals) and captures directive compliance cases for team-ai-directives.

tikalk/adlc-team-skills · 46 tokens

cross-session-handoff

Read, write, snapshot, and lock .arcgentic/state.yaml across planner, dev, audit, and optional test sessions.

Arch1eSUN/Arcgentic · 31 tokens

hunt-xxe

Hunting skill for xxe vulnerabilities. Built from 4 public bug bounty reports. Use when hunting xxe on any target.

adriannoes/awesome-agentic-ai · 31 tokens

detecting-process-injection-techniques

Detects and analyzes process injection techniques used by malware including classic DLL injection, process hollowing, APC injection, thread hijacking, and reflective loading. Uses memory forensics, API monitoring, and behavioral analysis to identify injection artifacts. Activates for requests involving process…

adriannoes/awesome-agentic-ai · 78 tokens