Λογότυπο Shadow Frog Init

Shadow Frog Init

Οργανισμός
microsoft
shadow-frog-init

Initialize a shadow knowledge base for any codebase. Creates a .shadow/ directory that mirrors the source tree with markdown files for AI-discovered insights. Run this once per repo before using other shadow-frog skills. Refuses to overwrite an existing .shadow/ unless --reset is passed.

Επισκόπηση

Εκδότηςmicrosoft
ΑποθετήριοShadowFrog
Όνομα δεξιότηταςshadow-frog-init
Αστέρια
33
Forks
9
Συνοδευτικά αρχεία
2
Άδεια χρήσηςMIT
Σύνδεσμοι
  • Οδηγίες σε Markdown

    Ένα αρχείο SKILL.md που το μοντέλο φορτώνει όταν χρειάζεται, ώστε να καταναλώνει token μόνο όταν ένα αίτημα είναι πράγματι σχετικό.

  • Λειτουργεί με οποιοδήποτε LLM

    Οι δεξιότητες AI είναι απλό Markdown, όχι κώδικας για συγκεκριμένο πάροχο, επομένως αυτή η δεξιότητα λειτουργεί με GPT, Claude, Gemini, Grok ή ένα τοπικό μοντέλο.

  • 2 συνοδευτικά αρχεία

    Σενάρια, πρότυπα και υλικό αναφοράς που μπορεί να διαβάζει το μοντέλο καθώς εργάζεται. Τα αρχεία είναι μόνο για ανάγνωση και δεν εκτελούνται ποτέ.

  • Ανοιχτού κώδικα

    Δημοσιεύτηκε από microsoft στο GitHub. Διαβάστε το πηγαίο περιεχόμενο πριν εγκαταστήσετε τη δεξιότητα.

Εγκατάσταση

Εγκαταστήστε τη δεξιότητα AI Shadow Frog Init στο TypingMind για να τη χρησιμοποιείτε με οποιοδήποτε LLM ή προσθέστε τη σε άλλον πράκτορα AI που διαβάζει αρχεία SKILL.md.

1

Εγκατάσταση στο TypingMind

Το TypingMind εγκαθιστά μια δεξιότητα απευθείας από τον φάκελό της στο GitHub — διαβάζει το SKILL.md, συγκεντρώνει τα συνοδευτικά αρχεία σε πακέτο και αποθηκεύει το αποτέλεσμα τοπικά.

  1. Ανοίξτε την εφαρμογή και μεταβείτε στα Πρόσθετα → Δεξιότητες.
  2. Επιλέξτε «Εγκατάσταση από GitHub».
  3. Επικολλήστε το παρακάτω URL του φακέλου της δεξιότητας και επιβεβαιώστε.
    https://github.com/microsoft/ShadowFrog/tree/main/skills/shadow-frog-init
  4. Ενεργοποιήστε τη δεξιότητα σε κάθε συνομιλία όπου θέλετε να είναι διαθέσιμη.
Πρόσθετα → Δεξιότητες → Νέα δεξιότητα → Από URL του GitHub, έπειτα επικολλήστε το URL του φακέλου και πατήστε «Συνέχεια».
2

Εγκατάσταση σε άλλον πράκτορα AI

Κάθε πράκτορας AI που διαβάζει τη μορφή Agent Skills μπορεί να χρησιμοποιήσει αυτή τη δεξιότητα — αντιγράψτε τον φάκελο στον κατάλογο δεξιοτήτων του.

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-init .claude/skills/shadow-frog-init
Επανεκκινήστε το Claude Code μετά την αντιγραφή, ώστε να εντοπίσει τη νέα δεξιότητα.

Χρησιμοποιήστε τη στο TypingMind

Ενεργοποιήστε τη δεξιότητα Shadow Frog Init σε οποιαδήποτε συνομιλία στο TypingMind και το μοντέλο αναλαμβάνει τα υπόλοιπα. Το όνομα και η περιγραφή της περιλαμβάνονται στην προτροπή συστήματος και, μόλις προκύψει ένα σχετικό αίτημα, το μοντέλο φορτώνει μόνο του τις πλήρεις οδηγίες — δεν χρειάζεται ποτέ να την καλείτε χειροκίνητα και δεν καταναλώνει token μέχρι να χρησιμοποιηθεί πραγματικά.

Το μοντέλο φορτώνει αυτόματα τη δεξιότητα Shadow Frog Init μόλις λάβει ένα σχετικό αίτημα.

Λειτουργεί με οποιοδήποτε μοντέλο AI

Οι δεξιότητες AI είναι απλές οδηγίες Markdown και όχι κώδικας για συγκεκριμένο πάροχο, οπότε η δεξιότητα Shadow Frog Init δεν περιορίζεται στο μοντέλο για το οποίο γράφτηκε. Εγκαταστήστε τη μία φορά στο TypingMind και χρησιμοποιήστε τη με GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama ή ένα τοπικό μοντέλο που εκτελείτε εσείς — πάντα με τα δικά σας κλειδιά API.

  • Φόρτωση μόνο όταν χρειάζεται

    Η προτροπή συστήματος περιλαμβάνει μόνο το όνομα και την περιγραφή. Οι οδηγίες ανακτώνται με το πρώτο σχετικό αίτημα, οπότε μια δεξιότητα που δεν χρησιμοποιείται δεν έχει κόστος.

  • Αλλάξτε μοντέλα κατά τη συνομιλία

    Επειδή η δεξιότητα αποτελείται από οδηγίες και όχι από κώδικα, η αλλαγή μοντέλου δεν επηρεάζει τη λειτουργία της — το επόμενο μοντέλο διαβάζει το ίδιο αρχείο SKILL.md.

Οδηγίες δεξιότητας

Αυτό είναι το περιεχόμενο του αρχείου SKILL.md που φορτώνει το μοντέλο. Διαβάστε το πριν από την εγκατάσταση — μια δεξιότητα αποτελείται από οδηγίες που θα ακολουθήσει το μοντέλο σας.

ShadowFrog Init

Creates .shadow/ directory with symbol-organized shadow files for every source file. Run once per repo. For existing knowledge, use update or a read-only backend migration preview; never reset merely to change extractors.

Primary: Python Helper Script

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

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

Run from the repo/worktree root. The helper auto-detects it with git rev-parse --show-toplevel. If Git cannot resolve or access the root (for example, inside a container), use --root to bypass detection:

bash
# If auto-detect fails, pass the root explicitly:
python3 .github/skills/shadow-frog-init/shadow-init.py --root "$(pwd)"

Options

FlagEffect
--root DIRRepository root (default: auto-detect via git)
--resetDelete existing .shadow/ and recreate
--dry-runShow what would be created without writing
--symbol-backend regex|astredRegex by default; existing shadows inherit state.json configuration
--astred-command PATHOverride the executable; otherwise use SHADOWFROG_ASTRED_COMMAND, setup configuration, or PATH
--astred-timeout SECONDSPositive batch timeout; default 180
--astred-project PATHBuild-derived C/C++ project inside --root; defaults to recorded project or .astred.project.json
--symbols-onlyPrint the shared extraction inventory as JSON; do not write .shadow/
--preview-migrationPrint inventory plus proposed address changes; do not write .shadow/

What it does

The helper discovers sources with git ls-files, applies .shadow/.shadowignore, extracts symbols, and creates symbol-organized per-file shadows plus _index.md, _prefs.md, _meta/state.json, and .shadowignore. It reports file/symbol counts and detected languages.

After creating .shadow/, complete Post-init steps. The helper does not choose the version-control mode.

Optional Astred backend

Astred is an optional Python and C/C++ declaration backend, not an LLM analysis replacement or a required ShadowFrog dependency. Install the optional Astred.Tools release using python install-astred.py (Linux: python3) from the ShadowFrog checkout; setup defaults to the latest stable release, with optional --version <exact-version> for reproducibility. See setup and authentication. Do not copy Astred source or binaries into the skills package.

For a new shadow, after configuring the executable:

powershell
python .github\skills\shadow-frog-init\shadow-init.py --symbol-backend astred

This batches Python files through Astred's treeerr -- bljson command chain: the AST error check must succeed before the shared graph is exported as bljson v2. Checking export error blocks alone is insufficient because the AST can contain errors absent from the graph. This is not Python compiler validation: Tree-sitter may recover missing tokens without producing an error node (for example, def broken(: can still export broken). Review source changes and migration candidates rather than treating an inventory as proof of valid syntax. The inventory includes named classes, functions/methods (with full lexical scope), and direct module-level uppercase assignment targets, including tuple unpacking. Parameters, local variables, anonymous functions, references, docstring examples, and discard targets such as _ are not symbol addresses. Repeated declarations are retained; they do not acquire artificial graph-ID suffixes.

For C/C++, first capture a clean component build with Astred TraceBld in the correct compiler/Razzle environment and generate .astred.project.json with AstProj, or import an existing compilation database with AstProj. Pass --astred-project <relative-path> for a non-default project. It must live inside --root and cover every discovered native source/header; unreferenced headers need an appropriate translation unit or explicit project entry. Keep %REPO% and folder mappings aligned with --root; a project generated for an entire enlistment is not automatically rebased for a component. The original project is passed unchanged so includes, defines, forced headers, and shared compiler settings remain intact. Scope VFS-backed OS work to a small component, not the entire enlistment; never discover flags by recursively scanning or hydrating the OS tree.

Native symbols include namespaces, classes/structs/unions/enums and forward declarations, typedefs, macros, and function declarations/definitions. Semantic ownership preserves out-of-line constructors, destructors, methods, and operators as dotted addresses such as device.cpp::Os.Device.Run. Included SDK/dependency files are parsed but do not get shadows unless discovered inside the selected root. Identical header interpretations are deduplicated; overloads at different source positions remain repeated headings, not graph-ID-suffixed addresses.

Other languages continue using the existing regex extractors, explicitly reported on stderr and in symbol_backend.fallback_languages. Astred failures do not silently fall back to regex. Missing tools, timeouts, incompatible or malformed exports, graph errors, incomplete file coverage, and source changes fail extraction. Astred preflight completes before init creates or resets a shadow. Temporary graphs are deleted; error-report uploads are disabled.

Astred initialization records this optional metadata in _meta/state.json:

json
"symbol_backend": {
  "name": "astred",
  "normalizer_version": 2,
  "astred_version": "<reported version>",
  "astred_release": "<reported release including build identity>",
  "project": "<repository-relative native project path, when C/C++ is present>",
  "project_sha256": "<native project SHA-256, when C/C++ is present>",
  "fallback_languages": ["<languages other than Python and C/C++>"]
}

The machine-local executable path and credentials are not persisted in .shadow. The setup script saves the executable path in per-user configuration outside the repository, automatically discovered unless overridden by the environment or --astred-command. _meta/symbols.json caches the validated inventory, keyed by source SHA-256, backend release, and normalizer version. Updates reuse unchanged Python files and batch only cache misses. A Python-only full cache hit does not invoke Astred. Native projects are always reparsed, including their dependencies: a header can change declarations in otherwise unchanged source files. Updates inherit the recorded project path; changing the project or its contents requires --preview-migration and reviewed metadata adoption. On extraction, the installed tool's reported release must match the recorded metadata. Corrupt caches fail visibly; remove only _meta/symbols.json to regenerate, not the knowledge tree.

Preview an existing shadow without losing discoveries

powershell
python .github\skills\shadow-frog-init\shadow-init.py --preview-migration --symbol-backend astred

The JSON contains the new inventory and migration.files: scope-change candidates, added addresses, retained_unmatched existing sections, ambiguous matches, and orphaned files. Unique leaf-name matches are suggestions, not proof of a rename. This command bypasses the old cache/version pin so it can also preview a tool, normalizer, or native project configuration change. It never changes headings, discoveries, trust metadata, citation scores, cross-references, cache, or state.

Review and apply confirmed changes through /shadow-frog-update, including every affected shadow even if its source file is unchanged. Keep unmatched/ambiguous discoveries and historical anchors until resolved; do not delete them because the new extractor no longer emits a heading. There is deliberately no automatic migration/apply command in this first integration. --reset deletes knowledge and is not a migration mechanism.

Fallback: Manual Init

If the Python script fails (wrong Python version, missing file, etc.), follow these steps manually, then complete Post-init steps. An explicitly selected Astred backend must be repaired or deliberately changed after migration review; do not use this fallback to conceal extraction failure.

1. Check preconditions

bash
git rev-parse --is-inside-work-tree  # must be a git repo
test -d .shadow && echo "exists"     # if exists, ask user: reset or skip

2. Discover source files

bash
git ls-files --cached --others --exclude-standard

Include patterns (auto-detect from repo contents): *.py, *.js, *.ts, *.tsx, *.jsx, *.java, *.go, *.rs, *.rb, *.cpp, *.c, *.h, *.cs, *.swift, *.kt, *.scala, *.php, *.sh, *.bash, *.zsh, *.yaml, *.yml, *.toml, *.json, Makefile, Dockerfile, docker-compose*.yml

Default excludes (always applied): node_modules/, vendor/, venv/, .venv/, __pycache__/, *.min.js, *.min.css, *.map, *.lock, dist/, build/, target/, out/, .shadow/, binary files

After discovering files, filter them through .shadow/.shadowignore (if it exists). The ignore file uses .gitignore syntax.

3. Create directories

bash
mkdir -p .shadow/_cross .shadow/_meta .shadow/_dreams
# For each source file, create parent dirs: mkdir -p .shadow/<dir>/

4. Create .shadow/.shadowignore

Uses .gitignore syntax. Seed with sensible defaults:

gitignore
# Directories
node_modules/
vendor/
venv/
.venv/
__pycache__/
dist/
build/
target/
out/

# Generated / minified
*.min.js
*.min.css
*.map
*.lock

# Binary
*.png
*.jpg
*.gif
*.ico
*.woff
*.woff2
*.ttf
*.eot
*.pdf
*.zip
*.tar.gz

# The shadow itself
.shadow/

# ShadowFrog's own install artifacts (project install copies these here)
.github/skills/shadow-frog*/
.github/hooks/scripts/shadow-frog-*
.claude/skills/shadow-frog*/
.claude/hooks/scripts/shadow-frog-*

5. Create _prefs.md

markdown
# Preferences

_No preferences recorded yet._

This file stores project-wide user preferences and conventions that are not tied to any specific file or symbol. It is populated by /shadow-frog-update when the user shares general directives. New preference/discovery entries use citation_score: 0; empty placeholders are not knowledge entries and do not have scores.

6. Create _meta/state.json

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

7. Generate per-file shadows

For each source file, extract symbols and create a shadow with this structure:

markdown
# Shadow: <path/to/file.py>

**Language**: <lang> | **Lines**: <N> | **Last modified**: <date>

## File-Level

_No discoveries yet._

## `class <ClassName>`

### `<ClassName.method>`

_No discoveries yet._

## `<function_name>`

_No discoveries yet._

## Cross-References

_No cross-cutting discoveries yet._

Rules:

  • Every class, function, method gets a ##/### heading
  • Symbol name is the stable anchor — no line numbers in headings
  • ## Cross-References section is always last
  • Extract symbols using language-appropriate static analysis (AST, tree-sitter, regex)
  • If static analysis is not feasible, create ## File-Level only; other skills fill in symbols later

8. Generate _index.md

markdown
# Shadow Index

> Generated by shadow-frog-init on <date>
> Total files: N | Symbols: M | Discoveries: 0 | Cross-cutting: 0

| File | Language | Symbols | Discoveries |
|------|----------|---------|-------------|
| src/auth.py | Python | 5 (UserAuth, authenticate_user, ...) | 0 |

Post-init Steps

After creating .shadow/ with either path:

Version-Control Mode

Ask the user: "Should .shadow/ be committed (shared with your team via git) or gitignored (local to your machine only)?"

Before they decide, make the trade-off explicit:

Committed (shared) — full functionality:

  • The whole team shares one knowledge base; discoveries compound across people.
  • shadow-frog-dream works — autonomous experiments commit .shadow/ artifacts onto dream branches, push them, and reconcile merges them back.
  • shadow-frog-meditate and the viewer work normally.

Gitignored (local only) — reduced functionality:

  • Your shadow stays private to your machine and never leaves the repo.

  • shadow-frog-init, shadow-frog-update, shadow-frog-meditate, and the viewer all still work (they operate on the local filesystem).

  • shadow-frog-dream will NOT work. Dreams move .shadow/ through git (commit → push → reconcile from the remote); a gitignored .shadow/ is silently skipped by git add, so discoveries never reach the remote and are lost. dream-setup.py detects this and refuses to start with a clear error rather than failing silently.

  • If gitignored: add .shadow/ to .gitignore.

Report

Print: files discovered, languages detected, total symbols. Tell the user to edit .shadow/.shadowignore to exclude unwanted paths, such as vendored/generated files or tool configs. Suggest /shadow-frog-update for deeper analysis or after code changes, and /shadow-frog-dream for autonomous exploration if .shadow/ is committed.

Συνοδευτικά αρχεία

Το μοντέλο τα διαβάζει όποτε χρειάζεται, όσο η δεξιότητα είναι φορτωμένη. Διατίθενται ως αρχεία για ανάγνωση και δεν εκτελούνται ποτέ.

Συχνές ερωτήσεις

Τι κάνει η δεξιότητα AI Shadow Frog Init;

Initialize a shadow knowledge base for any codebase. Creates a .shadow/ directory that mirrors the source tree with markdown files for AI-discovered insights. Run this once per repo before using other shadow-frog skills. Refuses to overwrite an existing .shadow/ unless --reset is passed.

Γιατί να χρησιμοποιήσετε τη δεξιότητα Shadow Frog Init στο TypingMind;

Επειδή την εγκαθιστάτε μία φορά και τη χρησιμοποιείτε με οποιοδήποτε μοντέλο. Η Shadow Frog Init είναι απλό Markdown και όχι κώδικας ειδικά για κάποιον πάροχο, επομένως η ίδια δεξιότητα λειτουργεί με GPT-5, Claude, Gemini, Grok ή ένα τοπικό μοντέλο — και μπορείτε να αλλάξετε μοντέλο κατά τη διάρκεια της συνομιλίας χωρίς να διακοπεί η λειτουργία της. Το TypingMind λειτουργεί με τα δικά σας κλειδιά API, οπότε πληρώνετε απευθείας τους παρόχους αντί για συνδρομή ανά θέση χρήστη, ενώ οι δεξιότητες και οι συνομιλίες σας παραμένουν στον δικό σας χώρο αποθήκευσης.

Πώς εγκαθιστώ τη Shadow Frog Init στο TypingMind;

Στο TypingMind, ανοίξτε Πρόσθετα → Δεξιότητες → Εγκατάσταση από το GitHub και επικολλήστε το https://github.com/microsoft/ShadowFrog/tree/main/skills/shadow-frog-init. Το TypingMind διαβάζει το αρχείο SKILL.md, συγκεντρώνει τα συνοδευτικά αρχεία και εγκαθιστά τη δεξιότητα, την οποία μπορείτε να ενεργοποιείτε ανά συνομιλία.

Ποια μοντέλα AI μπορούν να χρησιμοποιήσουν τη δεξιότητα Shadow Frog Init;

Οποιοδήποτε μοντέλο συνδέετε στο TypingMind. Οι δεξιότητες AI είναι απλές οδηγίες Markdown και όχι κώδικας ειδικά για κάποιον πάροχο, επομένως τα GPT, Claude, Gemini, Grok και τα τοπικά μοντέλα μπορούν όλα να φορτώσουν αυτή τη δεξιότητα όταν ένα αίτημα αντιστοιχεί σε αυτή.

Με πόσα μοντέλα AI μπορώ να χρησιμοποιήσω τη Shadow Frog Init;

Με όσα θέλετε. Εφόσον ένα μοντέλο υποστηρίζει δεξιότητες, μπορείτε να χρησιμοποιήσετε τη Shadow Frog Init με αυτό — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama και άλλα — όλα στο TypingMind με τα δικά σας κλειδιά API.

Είναι δωρεάν η δεξιότητα AI Shadow Frog Init;

Ναι. Δημοσιεύεται στο GitHub από τον χρήστη microsoft με την άδεια χρήσης MIT. Πληρώνετε μόνο τον δικό σας πάροχο AI για τα token που χρησιμοποιείτε.

Τι είναι οι δεξιότητες AI;

Μια δεξιότητα AI είναι ένα επαναχρησιμοποιήσιμο πακέτο οδηγιών που διδάσκει σε ένα μοντέλο AI πώς να εκτελεί μια συγκεκριμένη εργασία. Ακολουθεί την ανοιχτή μορφή Agent Skills: ένα αρχείο SKILL.md με όνομα και περιγραφή, μαζί με τυχόν σενάρια κώδικα, πρότυπα ή αρχεία αναφοράς που μπορεί να χρειαστεί το μοντέλο. Το μοντέλο διαβάζει τις οδηγίες μόνο όταν το αίτημά σας αντιστοιχεί στη δεξιότητα, οπότε μια εγκατεστημένη δεξιότητα δεν κοστίζει τίποτα μέχρι να χρησιμοποιηθεί.

Σε τι διαφέρουν οι δεξιότητες AI από τα πρόσθετα ή τους συνδέσμους MCP;

Ένα πρόσθετο ή ένας σύνδεσμος MCP παρέχει στο μοντέλο νέα εργαλεία που μπορεί να καλέσει — κώδικα που εκτελείται κάπου και επιστρέφει ένα αποτέλεσμα. Μια δεξιότητα AI παρέχει αντί γι’ αυτό γνώσεις και διαδικασίες στο μοντέλο: πώς να προσεγγίσει μια εργασία, ποια βήματα να ακολουθήσει και ποια χαρακτηριστικά έχει ένα καλό αποτέλεσμα. Οι δεξιότητες είναι απλό Markdown, επομένως δεν χρειάζονται διακομιστή, κλειδί API ή περιβάλλον εκτέλεσης και λειτουργούν με οποιοδήποτε μοντέλο.

Προβολή όλων

Στήστε δικό σας χώρο εργασίας AI τώρα

Εγγραφείτε στο ενημερωτικό μας δελτίο για να ενημερώνεστε για νέες λειτουργίες και μελλοντικές κληρώσεις δώρων 👇