Shadow Frog Update logo

Shadow Frog Update

Organization
microsoft
shadow-frog-update

Update the shadow knowledge base after code changes and from conversational insights. Detects what changed via git diff, refreshes per-file shadows, captures knowledge shared by the user during the session, and updates cross-cutting discoveries. Invoke manually with /shadow-frog-update; the preToolUse hook will remind the agent when the shadow is behind HEAD.

Overview

Publishermicrosoft
RepositoryShadowFrog
Skill nameshadow-frog-update
Stars
33
Forks
9
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 microsoft on GitHub. Read the source before you install it.

Installation

Install the Shadow Frog Update 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/microsoft/ShadowFrog/tree/main/skills/shadow-frog-update
  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/microsoft/ShadowFrog.git /tmp/ShadowFrog
mkdir -p .claude/skills
cp -r /tmp/ShadowFrog/skills/shadow-frog-update .claude/skills/shadow-frog-update
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Shadow Frog Update 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 Shadow Frog Update 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 Shadow Frog Update 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.

ShadowFrog Update

Updates .shadow/ from two sources: code changes (git diff) and conversational knowledge (what the user said during the session). Prerequisite: .shadow/ exists.

Triggers

  1. Hook reminder: preToolUse injects a staleness warning when .shadow/_meta/state.json#last_commit differs from HEAD. The hook only reminds — it does NOT auto-run update.
  2. Manual: user invokes /shadow-frog-update

Phase 1: Detect Changes

bash
# Read last_commit defensively: it may be missing, or the literal "none"
# when init ran without git (e.g. inside a container). `git diff none HEAD`
# would abort with "fatal: bad revision 'none'", and a missing key would
# make $LAST_COMMIT empty so `git diff HEAD` silently reports the wrong set.
LAST_COMMIT=$(python3 -c "import json,sys; print(json.load(sys.stdin).get('last_commit','none'))" < .shadow/_meta/state.json 2>/dev/null || echo "none")
if git rev-parse --verify "$LAST_COMMIT" >/dev/null 2>&1; then
    git diff --name-only "$LAST_COMMIT" HEAD   # committed changes since last update
else
    echo "WARNING: state.json has no usable last_commit — falling back to a full re-scan."
fi
git diff --name-only HEAD                       # uncommitted changes
git diff --name-only --cached                   # staged changes

Categorize: modified, added, deleted, renamed.

Phase 2: Update Per-File Shadows (Symbol-Level)

Use the same extraction interface as init, rather than inventing a separate symbol scanner. From the project root:

powershell
python .github\skills\shadow-frog-init\shadow-init.py --symbols-only
# Claude Code: use .claude\skills\shadow-frog-init\shadow-init.py instead.

This prints JSON without changing .shadow/. It inherits the optional symbol_backend configuration from _meta/state.json (absent means regex). For Astred, run python install-astred.py (Linux: python3) from the ShadowFrog checkout once; setup defaults to latest stable, with optional --version <exact-version>. The executable is discovered from per-user setup configuration. SHADOWFROG_ASTRED_COMMAND or --astred-command override it; do not store its path in shared metadata. Unchanged Python files reuse _meta/symbols.json; changed Python files are batched through the pinned backend. C/C++ uses the recorded build-derived Astred project (or --astred-project). Native projects are always reparsed, even without source diffs, because headers can change declarations in unchanged translation units. Keep the configured compiler environment, includes, defines, and forced headers available; setup alone does not generate an OS build project. Other languages explicitly use regex. Stop on extraction failure; a failed inventory does not mean that all symbols disappeared. Use each record's qualified_name for file::symbol references and heading for Markdown headings.

When adopting Astred, upgrading its release/normalizer, or changing the native project/compile settings, first run --preview-migration --symbol-backend astred with the intended executable. Treat all affected shadow files as changed, even without a source diff. Also compare freshly extracted native symbols for unchanged source files after header changes; source hashes alone are insufficient. Review scope-change candidates; do not assume same-leaf names prove identity. Preserve unmatched/ambiguous sections and their discoveries as history until resolved. Apply only confirmed mappings, updating Also involves: and _cross/ **Refs**: consistently, without changing trust metadata or citation scores. Never use --reset to migrate. This is a reviewed agent workflow, not an automatic knowledge-rewriting command.

For each changed file, update its shadow at the symbol level:

Symbol changeAction
AddedAdd the appropriate ##/### heading
RemovedMark the section REMOVED; keep discoveries for history
RenamedMove discoveries to the updated heading
ModifiedCheck whether discoveries still hold

Only mark source: user discoveries stale if the symbol is completely removed.

Lightweight update (auto/hook): re-extract symbols, update headings, flag stale. Deep update (manual/dream): read diffs, generate new discoveries, verify existing ones.

Phase 3: Capture Conversational Knowledge

When the user shares knowledge during the session, write it immediately. Do not batch for later.

Capture warnings, gotchas, design intent, history, deprecations, contracts, and conventions. Representative examples:

SignalExampleCategory
Warning"Don't change the retry logic, it's subtle"warning
Design intent"We use this pattern because the API is unreliable"intent
Convention"Always use the helper in utils.py, not raw SQL"convention

Write as:

markdown
- <user's words, as close to verbatim as possible>
  _(verified, source: user, citation_score: 0)_

For knowledge emerging from collaborative work (debugging, refactoring, test failures):

markdown
- <what was discovered and how>
  _(verified, source: interaction, citation_score: 0)_

Anchor to the specific file::symbol. source: user and source: interaction are always verified.

Auto-Placement

Users will not specify where to store their knowledge. You must find the correct location. Procedure:

  1. Parse the user's statement for code references — file names, function names, class names, module names, variable names, error messages, CLI flags.
  2. If the knowledge is a project-wide preference or convention with no code references (e.g., "always use snake_case", "no backward compatibility", "prefer small PRs") → write to _prefs.md.
  3. If explicit references found → look up those file::symbol paths in _index.md and the corresponding shadow files.
  4. If no explicit references → use context:
    • What file is the user currently viewing or editing?
    • What files were recently modified in this session?
    • Search shadow files: grep -rl "<keyword>" .shadow/ --include="*.md"
  5. If multiple candidate locations → pick the most specific symbol that the knowledge applies to. Prefer a single file::symbol over file-level.
  6. If the knowledge spans 3+ files → create a _cross/<slug>.md entry and add back-pointers to each involved file's ## Cross-References. For 2-file discoveries, use per-file entries with Also involves: instead.
  7. If no matching location exists (e.g., the user mentions a concept not yet in the shadow) → place at the file-level ## File-Level section of the most relevant file, or create a new _cross/ entry for repo-wide knowledge.

Never ask the user "where should I put this?" — always resolve placement yourself.

Phase 4: Extract Session Insights

At session end or manual trigger, review the session for:

  1. Files modified and why
  2. Patterns revealed by the changes
  3. Unrecorded conversational knowledge (user statements not yet shadowed)
  4. Cross-cutting discoveries (create in _cross/<slug>.md if 3+ files involved)

Phase 5: Handle Structural Changes

Added files:

  1. Check .shadow/.shadowignore — skip if the file matches an ignore pattern
  2. Create .shadow/<path>/<file>.md with symbol-organized template
  3. Add ## Cross-References section
  4. Add to _index.md

Deleted files:

  1. Add ORPHANED marker to shadow header
  2. Keep shadow (discoveries explain history)
  3. Mark [REMOVED] on any _cross/ refs pointing to this file
  4. Update _index.md

Renamed files:

  1. Move .shadow/<old>.md to .shadow/<new>.md
  2. Update all _cross/ **Refs**: entries (old path → new path)
  3. Update all Also involves: in other per-file shadows
  4. Update _index.md
  5. Preserve all discoveries

Phase 6: Verify and Dedup

Follow the dedup and writing rules in /shadow-frog — read before write, merge or update existing entries, fix bad format in place.

Verify exploration discoveries using the observe-based or do-based methods in /shadow-frog § Verification. source: user and source: interaction → always verified; only re-verify if the underlying code changes.

Phase 7: Verify Reference Integrity

Check the five core invariants (full 7-invariant set in /shadow-frog):

  • Every _cross/<slug>.md ref has a back-pointer in per-file ## Cross-References
  • Every ## Cross-References entry has a corresponding _cross/<slug>.md
  • No duplicate cross-cutting filenames
  • All Also involves: use file::symbol notation
  • No duplicate discoveries (same behavioral claim at same symbol)

Repair any violations before proceeding.

Phase 8: Update Metadata

Preserve dream_cycles_completed from the existing state — only dream-reconcile.py increments it. Also preserve optional symbol_backend metadata. After a successful update, save the validated extraction inventory (without its optional migration section) to _meta/symbols.json; refresh fallback_languages from that report. For a reviewed backend/version migration, adopt the report's symbol_backend only after all affected headings and references are reconciled. Never publish new backend metadata or replace a good cache after a failed extraction or incomplete migration.

json
{
  "version": 1,
  "initialized_at": "<preserved>",
  "last_update_at": "<now ISO>",
  "last_commit": "<full 40-char HEAD SHA>",
  "last_update_type": "init|auto|manual|dream|meditate",
  "total_files": N,
  "total_symbols": N,
  "total_discoveries": N,
  "dream_cycles_completed": <preserved>
}

Refresh _index.md with current counts.

Discovery Writing Rules

See /shadow-frog § Discovery Format for the verbatim per-file, cross-cutting, and preference formats. Rules to keep in mind during update sessions:

  • Start new claims/preferences with citation_score: 0; preserve the score when updating the same knowledge. Citation-only edits do not add discoveries.
  • Record deliberately consulted existing entries once per task using the core shadow-cite.py helper, not a retrieval requirement or a second hidden store.
  • Be behavioral: "silently returns None on expired tokens" not "handles token expiration"
  • source: user and source: interaction → always verified, use user's own words
  • source: exploration → mark uncertain unless verified by code reading or tests
  • If 3+ files involved → create in _cross/<slug>.md instead, add back-pointers
  • If project-wide preference with no file reference → write to _prefs.md
  • Slug naming: kebab-case derived from title (e.g., "Token expiry config split" → token-expiry-config-split.md)

Frequently asked questions

What does the Shadow Frog Update AI skill do?

Update the shadow knowledge base after code changes and from conversational insights. Detects what changed via git diff, refreshes per-file shadows, captures knowledge shared by the user during the session, and updates cross-cutting discoveries. Invoke manually with /shadow-frog-update; the preToolUse hook will remind the agent when the shadow is behind HEAD.

Why use Shadow Frog Update on TypingMind?

Because you install it once and use it with any model. Shadow Frog Update 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 Shadow Frog Update in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/microsoft/ShadowFrog/tree/main/skills/shadow-frog-update. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Shadow Frog Update?

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 Shadow Frog Update?

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

Is the Shadow Frog Update AI skill free?

Yes. It is published on GitHub by microsoft 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 👇