agentleFS
MicrosoftKnown publishermicrosoft/ShadowFrog/skills/shadow-frog-viewer/SKILL.md

shadow-frog-viewer

Skill37 starsChanged 13 days agoMITView on GitHub

Help users browse and visualize the shadow knowledge base: overview, search for files or symbols or text, view preferences, or see recent discoveries. Invoke when the user wants to see what's in the shadow, get an overview, or find specific knowledge.

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    No arguments defaults to --summary.

    line 43
  2. Very specific:

    Search/label/top ordering uses it only after source trust and verification status.

    line 46
  3. Distinctive:

    If the Python script fails to execute (wrong Python version, missing file, permission error, etc.), fall back to these shell commands:

    line 107
  4. Very specific:

    If the shadow is empty or has no discoveries, suggest running /shadow-frog-dream to populate it

    line 147

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

ShadowFrog Viewer

User-facing inspection of .shadow/ content. Prerequisite: .shadow/ exists. Agents navigate the Markdown files/symbols directly; this viewer is not a required retrieval interface.

Primary: Python Helper Script

The companion script shadow-viewer.py lives in the same directory as this SKILL.md file. To find and run it:

# Project install (Copilot CLI):
python3 .github/skills/shadow-frog-viewer/shadow-viewer.py [options]
# Or for Claude Code:
python3 .claude/skills/shadow-frog-viewer/shadow-viewer.py [options]

Available Views

CommandWhat it shows
--summaryOverview: counts, source/status/label breakdown, per-file table, cross-cutting titles (default)
--search QUERYUniversal search — matches file names, symbol names, and discovery text. Includes cross-cutting and preferences
--prefsProject-wide preferences
--recent [N]N most recent discoveries with full content (default: 10)
--labels LABELDiscoveries filtered by label (e.g., bug, security, bug,performance)
--top FILETop actionable discoveries for FILE — concise output (default: 3 entries, ~600 chars) suitable for the preToolUse hook. Includes both per-file shadow entries and any _cross/ discoveries that reference FILE. Verified discoveries rank first.
--check-invariantsAudit structural integrity — bidirectional cross-references, label/source/category enum compliance, heading format, no-orphan-back-pointer. Exits 0 if clean, 1 with one violation per line. Run after dream reconciliation or before commit.

No arguments defaults to --summary.

Discovery views display the visible Markdown citation_score (missing means 0). Search/label/top ordering uses it only after source trust and verification status; refuted claims remain last. Reading, searching, and automatic previews do not increment counts. The agent explicitly records deliberately consulted entries with the core shadow-cite.py helper once per task. --recent is based on shadow file modification time, which includes citation updates, not discovery creation time.

Options

FlagEffect
--shadow-dir DIROverride .shadow/ location (default: auto-detect from CWD)
--top-labels LABELSComma-separated label filter for --top (default: bug,security). Empty string disables label filtering.
--top-limit NMax discoveries to show in --top (default: 3)
--top-max-chars NHard cap on --top total output length (default: 600). Use 0 for no cap.

Examples

# Search file names, symbols, discoveries, cross-cutting entries, and preferences
python3 shadow-viewer.py --search "token expiry"

# Security and performance issues
python3 shadow-viewer.py --labels security,performance

# Broaden the per-file label filter and show up to 5 entries
python3 shadow-viewer.py --top src/auth.py --top-labels bug,security,performance --top-limit 5

Dream Lineage Visualization

The companion script dream-lineage.py generates an interactive HTML visualization of the dream experiment tree. It reads _dreams/_index.md and experiment reports to produce a self-contained HTML file.

# (Claude Code users: replace .github/skills with .claude/skills below)

# Generate dream-lineage.html in the current directory
python3 .github/skills/shadow-frog-viewer/dream-lineage.py

# Custom output path
python3 .github/skills/shadow-frog-viewer/dream-lineage.py -o my-lineage.html

# Explicit shadow directory
python3 .github/skills/shadow-frog-viewer/dream-lineage.py --shadow-dir /path/to/.shadow

The HTML groups compounding chains and fresh experiments, includes a full lineage tree, and supports expanding each experiment's report. Experiment names and test-count metadata render as literal text, not HTML; escaping happens at rendering time without changing the stored metadata.

Pass stderr back to the agent even when generation exits 0. Required directory, index, or output failures emit ERROR and exit 1; malformed optional metadata or omitted rows emit WARNING with the affected path/field and produce a partial view. Repair the indicated input or permissions and rerun the same command. Missing optional artifacts and safely escaped text are not errors. The helper does not invoke a model or retry automatically.

Fallback: Shell One-Liners

If the Python script fails to execute (wrong Python version, missing file, permission error, etc.), fall back to these shell commands:

Summary

Note: shell discovery counts are approximate (may include cross-reference links).

echo "Files: $(find .shadow -name '*.md' -not -path '*/_cross/*' -not -path '*/_meta/*' -not -path '*/_dreams/*' -not -name '_index.md' -not -name '_prefs.md' | wc -l | tr -d ' ')"
echo "Discoveries: $(find .shadow -name '*.md' -not -path '*/_cross/*' -not -path '*/_meta/*' -not -path '*/_dreams/*' -not -name '_index.md' -not -name '_prefs.md' -exec grep -c '^\- ' {} \; 2>/dev/null | awk '{s+=$1} END {print s+0}')"
echo "Cross-cutting: $(ls .shadow/_cross/*.md 2>/dev/null | wc -l | tr -d ' ')"
python3 -c "import json; d=json.load(open('.shadow/_meta/state.json')); print(f'Last update: {d[\"last_update_at\"]} ({d[\"last_update_type\"]})')"

Search

grep -rn "QUERY" .shadow/ --include="*.md"

Preferences

cat .shadow/_prefs.md

Recent

# macOS
find .shadow -name '*.md' -not -path '*/_meta/*' -exec stat -f '%m %N' {} \; | sort -rn | head -10 | while read ts f; do echo "$(date -r "$ts" '+%Y-%m-%d %H:%M') $f"; done

# Linux
find .shadow -name '*.md' -not -path '*/_meta/*' -printf '%T@ %p\n' | sort -rn | head -10 | while read ts f; do echo "$(date -d @"${ts%%.*}" '+%Y-%m-%d %H:%M') $f"; done

Responding to the User

  • Preserve --top output as-is; it is intentionally compact and pre-formatted for the preToolUse hook.
  • If the shadow is empty or has no discoveries, suggest running /shadow-frog-dream to populate it

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.