context-upgrade

context-upgrade is a skill for Claude Code from fending/context-engineering. It costs 37 tokens per session (2,094 once invoked), scanned A, original, MIT.

A guide for expanding an agent project’s context setup from a simpler level to a more complete one. It preserves existing instructions while adding the next layer of context, skills, or hooks when appropriate.

In plain words
What is it for?
Use it to inspect AGENTS.md files and related settings, choose an upgrade path, and transition from minimal context to fuller or layered project instructions.
Why use it?
It helps an agent keep project knowledge as the setup grows instead of losing existing guidance during reorganization.

Skill for Claude Code

Written for Claude Code: PreToolUse hook event. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions Claude Code.

Part of the context-setup plugin — 5 skills shipped together

Good fit Use it to inspect AGENTS.md files and related settings, choose an upgrade path, and transition from minimal context to fuller or layered project instructions.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/fending/context-engineering/context-upgrade
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 fending/context-engineering --skill context-upgrade
Clone the repo
git clone --depth 1 https://github.com/fending/context-engineering

Made for: Claude Code.

Or install context-setup, the plugin that ships this one along with the rest of its 5 skills.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/fending/context-engineering/context-upgrade/github.svg)](https://agentmods.dev/skills/fending/context-engineering/context-upgrade)
Your own site
<a href="https://agentmods.dev/skills/fending/context-engineering/context-upgrade"><img src="https://agentmods.dev/badge/skills/fending/context-engineering/context-upgrade/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 context-upgrade

Your own site · 80×15
<a href="https://agentmods.dev/skills/fending/context-engineering/context-upgrade"><img src="https://agentmods.dev/badge/skills/fending/context-engineering/context-upgrade.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 37 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,094 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.00037 $0.02094
Opus 5.5 $0.00015 $0.00838
Sonnet 5.5 $0.00007 $0.00419
Haiku 4.5 $0.00004 $0.00209

Measured 1mo ago against content hash abbfd4697479, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

context-upgrade 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 1mo 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/context-setup/skills/context-upgrade/SKILL.md · 171 lines

How it starts

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

DEPRECATION NOTICE: You are running context-setup from fending/context-engineering, which is no longer maintained. The active version is at ordovera/ordovera-plugins. To migrate, run:

  1. /plugin marketplace add ordovera/ordovera-plugins
  2. /plugin install context-setup@ordovera-plugins

Then remove the old marketplace: /plugin marketplace remove context-engineering

Print this notice to the user before proceeding with the skill.

Context Upgrade

Guide a transition from your current context level to the next one without losing existing content.

What This Skill Does

  1. Detect current level by reading existing context files:

    • No context files found -- equivalent to running scaffold
    • Single AGENTS.md under ~60 lines -- minimal level
    • Single AGENTS.md over ~60 lines -- full level
    • AGENTS.md + context/ directory or multiple AGENTS.md files -- cascading level
    • Check for .claude/skills/ and .claude/settings.json hooks to assess skills/hooks layers
  2. Identify the appropriate upgrade path based on current level and project signals.

  3. Execute the upgrade with the user's confirmation, preserving all existing content.

Upgrade Paths

No Context to Minimal

Equivalent to running /context-setup:context-scaffold at the minimal level. Generate AGENTS.md from project analysis with sections: project description, tech stack, commands, code standards, Do NOT. Create CLAUDE.md symlink.

Minimal to Full Single File

Read the existing AGENTS.md. Identify which full-level sections are missing. The full level adds these sections beyond minimal:

  • Project Structure -- directory layout with descriptions. Generate from filesystem scan.
  • Architecture -- application layers and data flow. Populate what's inferable from framework and directory conventions; bracket-placeholder the rest.
  • Auth and Permissions -- auth mechanism, session handling, roles. Populate from detected auth packages; bracket-placeholder specifics.
  • Data Model -- core models and relationships. Populate from schema files if present (Prisma, SQLAlchemy models, etc.); bracket-placeholder otherwise.
  • API Conventions -- URL structure, request/response format, error handling. Populate from detected route structure; bracket-placeholder conventions.

Read the full file on GitHub · 171 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. 1mo ago First seen · 171 lines · 37 tokens per session scan A abbfd4697479

Subscribe to this mod's changes

context-upgrade is a skill published in the GitHub repository fending/context-engineering (12 stars, last pushed 6mo ago), licensed MIT. It adds 37 tokens to every session and 2,094 once invoked, about $0.0001 per session on Opus 5.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.

Related

Other skills, from other repositories

thread

Manage persistent context threads for cross-session work.

buildomator/buildomator · 10 tokens

cortadel

Cortadel is a self-hosted, bi-temporal graph memory server for AI agents — one .NET container exposing a REST API and an MCP endpoint over FalkorDB or Memgraph, with intent-aware writes (store/invalidate/delete-entity/touch/resolve), LLM-verified dedup with a negation guard, and hybrid BM25+vector+RRF retrieval…

cortadel/cortadel · 178 tokens

forget

Retract or permanently erase a Cortadel memory. Use when the user says "forget that...", "X is no longer true", "that's outdated", "delete this memory", or "permanently remove ". Default path is a natural-language retraction that keeps history queryable; hard, unrecoverable deletion only happens on an explicit…

cortadel/cortadel · 77 tokens

history

Reconstruct what Cortadel memory said as of a past date, or trace a fact's supersession chain (what replaced or invalidated it, and when). Use when the user asks what they believed on a given date, wants to see superseded/historical versions of a fact, or asks how something changed over time. mem0 has no equivalent …

cortadel/cortadel · 81 tokens

remember

Write one fact to Cortadel memory right now, with scoping control the automatic Stop-hook capture doesn't give you. Use when the user says "remember that...", "save this", "note that...", "store this fact", or explicitly asks to record a decision, preference, or convention outside of normal end-of-turn capture.

cortadel/cortadel · 67 tokens

recall

Search Cortadel memory deliberately — broader, filtered, or budgeted retrieval beyond what the automatic per-prompt recall gives. Use when the user asks to look something up in memory, search past context, or wants results scoped by project/tag/type — e.g. "search my memories for X", "what do we know about Y", "recall…

cortadel/cortadel · 77 tokens