Context Manager logo

Context Manager

Community
Mark393295827
context-manager

Use when a long-running agent task needs context budgeting, checkpointing, compaction, retrieval, or capability-based model routing.

Overview

PublisherMark393295827
Repositorythird-brain-v7-skills
Skill namecontext-manager
Stars
141
Forks
22
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by Mark393295827 on GitHub. Read the source before you install it.

Installation

Install the Context Manager AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/Mark393295827/third-brain-v7-skills/tree/main/skills/context-manager
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Mark393295827/third-brain-v7-skills.git /tmp/third-brain-v7-skills
mkdir -p .claude/skills
cp -r /tmp/third-brain-v7-skills/skills/context-manager .claude/skills/context-manager
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Context Manager in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Context Manager on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Context Manager is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Context Manager

<skill_contract> An active objective, runtime context limits, decision-critical state, evidence, budgets, and durable storage. A bounded context manifest, checkpoint, compaction decision, and capability-routing receipt. The next decision can be resumed without losing constraints, permissions, provenance, or failure history. <non_goals>Task orchestration, vendor-specific routing, hidden truncation, or retaining history that cannot change a decision.</non_goals>

Treat context as RAM, durable storage as disk, and tools as retrieval. Pay only for information that changes the next decision or prevents an execution error.

Usage Template

Provide: objective, phase, runtime context limit, token/cost budget, active constraints, current evidence, durable state location, and expected next decisions.

Workflow

Measure available budget from runtime data; do not infer limits or prices from model names. Partition context into objective, constraints, active state, evidence, open unknowns, and history. Identify the next irreversible or high-cost decision.

<unknowns_gate>

If runtime limits or durable state are unavailable, choose a conservative explicit budget or return NEEDS_INPUT. Never silently drop constraints, approvals, source provenance, failed attempts, or user decisions.

</unknowns_gate>

Apply KEEP / SUMMARIZE / DROP / RETRIEVE:

  • KEEP: objective, acceptance criteria, permissions, active files, current state, fresh evidence, blockers.
  • SUMMARIZE: completed exploration, superseded plans, verbose tool output; retain decisions and locators.
  • DROP: duplicated prose, stale speculation, irrelevant logs, and reconstructible boilerplate.
  • RETRIEVE: load detailed references only when the next action needs them.

Checkpoint at phase boundaries or before compaction. Route work by capability requirements such as reasoning depth, tool use, latency, cost, multimodality, and context capacity; runtime policy selects the implementation. Keep stable prompt prefixes unchanged when caching is available.

Maintain one versioned shared-intent surface for objective, acceptance criteria, decisions, and non-code constraints. Give each worker a private context manifest containing only its required slice. Return summary, artifact locator/hash, decision, unknowns, and verifier receipt; do not treat chat replay as durable coordination. An independent critic receives the claim and raw artifact, not the builder's desired conclusion.

For Graph workflows, treat each node context as private RAM and each typed edge payload as a bounded transfer contract. Pass artifact locators, schemas, decisions, and verifier receipts; do not concatenate all branch histories into every successor. A join loads only the declared inputs needed for its decision.

Simulate the next action using only the checkpoint. It must recover objective, constraints, state, evidence, unknowns, last error, and next action without consulting lost chat. Compare estimated budget with runtime telemetry and correct drift.

<state_contract>

Persist {run_id, status, attempt, budget, evidence, unknowns, last_error, next_action} plus phase, shared-intent hash, worker context manifests, decisions, permissions, normalized termination reason, active resources, completed work, rejected approaches, artifact/retrieval pointers, and budget telemetry. Version checkpoints; never replace the only recoverable state.

</state_contract>

Failure Protocol

  • NEEDS_INPUT: no reliable limit or cost policy exists and the choice changes execution.
  • INSUFFICIENT_EVIDENCE: a proposed summary cannot preserve a material decision or locator; keep the source segment.
  • VERIFY_FAILED: checkpoint replay loses required state; restore the prior version and recompact.
  • BUDGET_STOP: reserve enough capacity for receipt and handoff, persist state, then stop.

Output Contract

Return status, result (budget plan or checkpoint), evidence (runtime telemetry and replay check), unknowns, and next_action with required retrieval pointers.

Edge Cases

  • Runtime pricing changes mid-project: recompute from current policy; preserve earlier estimates as historical evidence.
  • A long log contains one decisive error: keep the error signature and locator, summarize the surrounding output, and retain retrieval access.
  • A Graph join receives three branch transcripts: retrieve the declared output artifacts and receipts, not the full private context of every branch.
  • A subagent summary omits a non-code constraint: reject the handoff, reload the versioned shared-intent slice, and regenerate the summary before integration.

Success Metrics

  • A fresh agent can resume from the checkpoint without material context loss.
  • Context use stays within the declared runtime budget.
  • Routing depends on capabilities and policy, not fixed model names.

Quality Gates

  • Objective, constraints, permissions, evidence, and next action survive replay.
  • Shared intent and private worker contexts remain separated with bounded summary IPC.
  • Dropped content is duplicated, stale, or reconstructible.
  • Budget estimates cite current runtime data or explicit conservative assumptions.
  • Checkpoints are versioned and recoverable.

</skill_contract>

Frequently asked questions

What does the Context Manager AI skill do?

Use when a long-running agent task needs context budgeting, checkpointing, compaction, retrieval, or capability-based model routing.

Why use Context Manager on TypingMind?

Because you install it once and use it with any model. Context Manager is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Context Manager in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/Mark393295827/third-brain-v7-skills/tree/main/skills/context-manager. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Context Manager?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Context Manager?

As many as you like. As long as a model supports skills, you can use Context Manager with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Context Manager AI skill free?

Yes. It is published on GitHub by Mark393295827 under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇