Shadow Frog Updateのロゴ

Shadow Frog Update

組織
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.

概要

公開者microsoft
リポジトリShadowFrog
スキル名shadow-frog-update
スター
33
フォーク
9
同梱ファイル
指示のみ
ライセンスMIT
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 指示だけで完結

    モデルに必要なものはすべて指示に含まれているため、別途同期するファイルはありません。

  • オープンソース

    microsoftがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキルShadow Frog UpdateをTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/microsoft/ShadowFrog/tree/main/skills/shadow-frog-update
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

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
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでShadow Frog Updateを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあると、モデルが自動的にShadow Frog Updateを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Shadow Frog Updateは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、未使用のスキルにはコストがかかりません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

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)

よくある質問

AIスキル「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.

TypingMindでShadow Frog Updateを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Shadow Frog Updateはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにShadow Frog Updateをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/microsoft/ShadowFrog/tree/main/skills/shadow-frog-updateを貼り付けてください。TypingMindがSKILL.mdを読み込み、チャットごとに有効にできるスキルとしてインストールします。

Shadow Frog Updateを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストが合致したときにこのスキルを読み込めます。

Shadow Frog Updateは何個のAIモデルで使えますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもShadow Frog Updateを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Shadow Frog Update」は無料ですか?

はい。microsoftがGitHubでMITライセンスの下で公開しています。支払いが必要なのは、利用したトークンに対する、ご自身が契約するAIプロバイダーへの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇