Maintaining Project Context logo

Maintaining Project Context

Organization
ed3dai
maintaining-project-context

Use when completing development phases or branches to identify and update CLAUDE.md or AGENTS.md files that may have become stale - analyzes what changed, determines affected contracts and documentation, and coordinates updates

Overview

Publishered3dai
Repositoryed3d-plugins
Skill namemaintaining-project-context
Stars
249
Forks
33
Bundled files
Instructions only
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 ed3dai on GitHub. Read the source before you install it.

Installation

Install the Maintaining Project Context 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.
  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/ed3dai/ed3d-plugins.git /tmp/ed3d-plugins
mkdir -p .claude/skills
cp -r /tmp/ed3d-plugins/plugins/ed3d-extending-claude/skills/maintaining-project-context .claude/skills/maintaining-project-context
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Maintaining Project Context 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 Maintaining Project Context 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 Maintaining Project Context 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.

Maintaining Project Context

REQUIRED SUB-SKILL: Use ed3d-extending-claude:writing-claude-md-files for all context file creation and updates.

Core Principle

Context files (CLAUDE.md or AGENTS.md) document contracts and architectural intent. When code changes contracts, the documentation must update. Stale documentation is worse than no documentation.

Trigger: End of development phase, branch completion, or any work that changed contracts, APIs, or domain structure.

Format Detection (MANDATORY FIRST STEP)

Before any updates, detect what format this repository uses:

bash
# Check for AGENTS.md at root
ls -la AGENTS.md 2>/dev/null

# Check for CLAUDE.md at root
ls -la CLAUDE.md 2>/dev/null
Root AGENTS.md?FormatAction
YesAGENTS.md-canonicalUpdate AGENTS.md files, create companion CLAUDE.md
NoCLAUDE.md-canonicalUpdate CLAUDE.md files directly

Key principle: We use OUR format structure (Purpose, Contracts, Dependencies, Invariants, etc.) regardless of filename. AGENTS.md is just for cross-platform AI agent compatibility.

AGENTS.md-Canonical Repos

When the repo uses AGENTS.md:

  1. Read AGENTS.md first before making any updates
  2. Write content to AGENTS.md using our standard structure
  3. Create companion CLAUDE.md next to each AGENTS.md with exactly this content:
markdown
Read @./AGENTS.md and treat its contents as if they were in CLAUDE.md

When to Update Context Files

Change TypeUpdate Required?What to Update
New domain/moduleYesCreate domain context file
API/interface changeYesContracts section
Architectural decisionYesKey Decisions section
Invariant changeYesInvariants section
Dependency changeYesDependencies section
Bug fix (no contract change)No-
Refactor (same behavior)No-
Test additionsNo-

The Process

Step 1: Identify What Changed

Diff against the base (branch start or phase start):

bash
# Get changed files
git diff --name-only <base-sha> HEAD

# Get detailed changes
git diff <base-sha> HEAD --stat

Categorize changes:

  • Structural: New directories, moved files
  • Contract: Changed exports, interfaces, public APIs
  • Behavioral: Changed invariants, guarantees
  • Internal: Implementation details only

Step 2: Map Changes to Context Files

For each significant change, determine which context file should document it:

Change LocationContext File Location
Project-wide patternRoot context file
New domain<domain>/ context file (create)
Existing domain contract<domain>/ context file (update)
Cross-domain dependencyBoth affected domains

Hierarchy rule: Information belongs at the lowest level where it applies. Domain-specific contracts go in domain files, not root.

For AGENTS.md-canonical repos: When creating new domain context files, create both AGENTS.md (with content) and CLAUDE.md (companion pointer).

Step 3: Verify Contracts Still Hold

For each affected context file, verify:

  1. Contracts section: Do exposes/guarantees/expects match current code?
  2. Dependencies section: Are uses/used-by/boundary accurate?
  3. Invariants section: Are all invariants still enforced?
  4. Key Decisions section: Any new decisions to document?
bash
# Find domain's public exports
grep -r "export" <domain>/index.ts

# Find domain's imports (dependencies)
grep -r "from '\.\." <domain>/

Step 4: Update or Create Context Files

For updates:

  1. Read existing file first (especially for AGENTS.md)
  2. Update freshness date via date +%Y-%m-%d
  3. Update affected sections
  4. Remove stale content
  5. Verify under token budget (<100 lines for domain files)

For new domains (CLAUDE.md-canonical repos):

  1. Create <domain>/CLAUDE.md using template from writing-claude-md-files
  2. Document purpose, contracts, dependencies, invariants
  3. Set freshness date

For new domains (AGENTS.md-canonical repos):

  1. Create <domain>/AGENTS.md using template from writing-claude-md-files
  2. Document purpose, contracts, dependencies, invariants
  3. Set freshness date
  4. Create companion <domain>/CLAUDE.md:
    markdown
    Read @./AGENTS.md and treat its contents as if they were in CLAUDE.md

Step 5: Commit Documentation Updates

bash
git add <affected CLAUDE.md files>
git commit -m "docs: update project context for <branch-name>"

Decision Tree

Has code changed?
├─ No → Skip (nothing to update)
└─ Yes → Detect format first (AGENTS.md at root?)
    └─ What changed?
        ├─ Only tests/internal details → Skip
        └─ Contracts/APIs/structure → Continue
            ├─ New domain created?
            │   ├─ AGENTS.md repo → Create AGENTS.md + companion CLAUDE.md
            │   └─ CLAUDE.md repo → Create CLAUDE.md
            ├─ Existing domain changed?
            │   └─ Update domain context file (read first!)
            └─ Project-wide pattern changed?
                └─ Update root context file

Quick Reference

Always update when:

  • New public exports added
  • Interface signatures changed
  • Invariants added/removed
  • Dependencies changed
  • Architectural decisions made

Never update for:

  • Internal refactoring
  • Bug fixes that don't change contracts
  • Test file changes
  • Comment/documentation-only changes

Common Mistakes

MistakeFix
Updating for every changeOnly update for contract changes
Forgetting freshness dateAlways use date +%Y-%m-%d
Documenting implementationDocument contracts and intent
Putting domain info in rootUse domain context files for domain contracts
Skipping verificationRead the code, confirm contracts hold
Skipping format detectionAlways check for AGENTS.md first
Writing AGENTS.md without readingAlways read existing content before updating
Forgetting companion CLAUDE.mdAGENTS.md repos need both files

Integration Points

Called by:

  • project-claude-librarian agent - Uses this skill to coordinate updates
  • executing-an-implementation-plan (Step 5b) - After all tasks complete
  • finishing-a-development-branch (Step 4b) - Before merge/PR

Uses:

  • writing-claude-md-files - For actual context file creation/updates (works for both CLAUDE.md and AGENTS.md)

Frequently asked questions

What does the Maintaining Project Context AI skill do?

Use when completing development phases or branches to identify and update CLAUDE.md or AGENTS.md files that may have become stale - analyzes what changed, determines affected contracts and documentation, and coordinates updates

Why use Maintaining Project Context on TypingMind?

Because you install it once and use it with any model. Maintaining Project Context 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 Maintaining Project Context in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/ed3dai/ed3d-plugins/tree/main/plugins/ed3d-extending-claude/skills/maintaining-project-context. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Maintaining Project Context?

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 Maintaining Project Context?

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

Is the Maintaining Project Context AI skill free?

It is published on GitHub by ed3dai. Check the repository for licensing terms. 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 👇