Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions graphify/skill-agents.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ If no path was given, use `.` (current directory). Do not ask the user for a pat

If the path argument starts with `https://github.com/` or `http://github.com/`, treat it as a GitHub URL - run Step 0 before anything else, then continue with the resolved local path.

Follow these steps in order. Do not skip steps.
Run the steps in order. Skip a step only where explicitly instructed.

### Step 0 - GitHub repos and multi-path merge (only if a URL or several paths)

Expand Down Expand Up @@ -160,16 +160,14 @@ Skip this step entirely if `detect` returned zero `video` files. When the corpus

This step has two parts: **structural extraction** (deterministic, free) and **semantic extraction** (LLM, costs tokens).

> **graphify needs no API key. Never ask the user for one, and never block on one.** Code is extracted structurally (AST) with no LLM and no key at all — a code-only corpus (the common `/graphify .` on a repo) skips semantic extraction entirely, so it needs nothing here: go straight to Part A and skip Part B. Semantic extraction (only for docs, papers, and images) uses Gemini **only if** `GEMINI_API_KEY`/`GOOGLE_API_KEY` is already set; otherwise the host agent itself is the LLM. graphify does **not** read `ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, or any other provider key. If you catch yourself about to prompt for, wait on, or stop because of a missing API key, that is a misread of this skill — proceed without one.
> **graphify needs no API key. Never ask the user for one, and never block on one.** Code is extracted structurally (AST) with no LLM or key; for a code-only corpus, run Part A and follow Part B's fast path to write the empty semantic file before Part C. This skill's semantic extraction route uses Gemini when `GEMINI_API_KEY`/`GOOGLE_API_KEY` is already set; otherwise the host agent itself is the LLM. The headless CLI supports other configured providers through `graphify.llm.detect_backend()`; this skill's Gemini check does not select those providers. On a host that dispatches subagents, follow Part B for uncached docs, papers, and images. On a host that cannot dispatch subagents, extract those inline yourself. Proceed without waiting for credentials.

**Before semantic extraction:** check whether `GEMINI_API_KEY` or `GOOGLE_API_KEY` is set. If neither is set, print this one-liner to the user:
> Tip: set `GEMINI_API_KEY` or `GOOGLE_API_KEY` to use Gemini for semantic extraction (`pip install 'graphifyy[gemini]'`).

Print it once, then continue — do not wait for the user to supply a key. If `GEMINI_API_KEY` or `GOOGLE_API_KEY` IS set, use `graphify.llm.extract_corpus_parallel(files, backend="gemini")` for semantic extraction instead of dispatching subagents. The default Gemini model is `gemini-3-flash-preview`; set `GRAPHIFY_GEMINI_MODEL` or pass `--model` in headless CLI flows to override it.

> **No other API keys are read.** When `GEMINI_API_KEY`/`GOOGLE_API_KEY` are unset, semantic extraction falls to the host agent itself — the running session is the LLM. On a host that dispatches subagents (e.g. Claude Code), dispatch them as written in Part B. On a host that runs the CLI directly in a terminal and cannot dispatch subagents, do not stall: a code-only corpus has no semantic work, so write the empty semantic file (Part B "Fast path") and continue to Part C; for a corpus with docs/papers/images, either set a Gemini key or extract those inline yourself, but in no case prompt for `ANTHROPIC_API_KEY` — that prompt is a misread of this skill.

**Run Part A (AST) and Part B (semantic) in parallel. Dispatch all semantic subagents AND start AST extraction in the same message. Both can run simultaneously since they operate on different file types. Merge results in Part C as before.**
**When Part B needs host-agent dispatch and the host supports subagents, start the semantic subagents and Part A (AST) in the same message. Both can run simultaneously since they operate on different file types. Respect Part B's fast path and cache check before dispatching. Merge results in Part C as before.**

Note: Parallelizing AST + semantic saves 5-15s on large corpora. AST is deterministic and fast; start it while subagents are processing docs/papers.

Expand Down Expand Up @@ -211,7 +209,7 @@ Path('graphify-out/.graphify_semantic.json').write_text(json.dumps({'nodes':[],'
"
```

**MANDATORY: You MUST use the Agent tool here. Reading files yourself one-by-one is forbidden - it is 5-10x slower. If you do not use the Agent tool you are doing this wrong.**
**For host-agent semantic extraction, use the platform's dispatch mechanism described in Step B2 (the Agent tool on Claude Code), one subagent per chunk; parallel dispatch is 5-10x faster than reading files yourself. Skip dispatch when the Part B fast path applies or a configured Gemini backend handles semantic extraction. On a host that cannot dispatch subagents, use the inline fallback described above.**

Before dispatching subagents, print a timing estimate:
- Load `total_words` and file counts from `graphify-out/.graphify_detect.json`
Expand Down
10 changes: 4 additions & 6 deletions graphify/skill-amp.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ If no path was given, use `.` (current directory). Do not ask the user for a pat

If the path argument starts with `https://github.com/` or `http://github.com/`, treat it as a GitHub URL - run Step 0 before anything else, then continue with the resolved local path.

Follow these steps in order. Do not skip steps.
Run the steps in order. Skip a step only where explicitly instructed.

### Step 0 - GitHub repos and multi-path merge (only if a URL or several paths)

Expand Down Expand Up @@ -160,16 +160,14 @@ Skip this step entirely if `detect` returned zero `video` files. When the corpus

This step has two parts: **structural extraction** (deterministic, free) and **semantic extraction** (LLM, costs tokens).

> **graphify needs no API key. Never ask the user for one, and never block on one.** Code is extracted structurally (AST) with no LLM and no key at all — a code-only corpus (the common `/graphify .` on a repo) skips semantic extraction entirely, so it needs nothing here: go straight to Part A and skip Part B. Semantic extraction (only for docs, papers, and images) uses Gemini **only if** `GEMINI_API_KEY`/`GOOGLE_API_KEY` is already set; otherwise the host agent itself is the LLM. graphify does **not** read `ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, or any other provider key. If you catch yourself about to prompt for, wait on, or stop because of a missing API key, that is a misread of this skill — proceed without one.
> **graphify needs no API key. Never ask the user for one, and never block on one.** Code is extracted structurally (AST) with no LLM or key; for a code-only corpus, run Part A and follow Part B's fast path to write the empty semantic file before Part C. This skill's semantic extraction route uses Gemini when `GEMINI_API_KEY`/`GOOGLE_API_KEY` is already set; otherwise the host agent itself is the LLM. The headless CLI supports other configured providers through `graphify.llm.detect_backend()`; this skill's Gemini check does not select those providers. On a host that dispatches subagents, follow Part B for uncached docs, papers, and images. On a host that cannot dispatch subagents, extract those inline yourself. Proceed without waiting for credentials.

**Before semantic extraction:** check whether `GEMINI_API_KEY` or `GOOGLE_API_KEY` is set. If neither is set, print this one-liner to the user:
> Tip: set `GEMINI_API_KEY` or `GOOGLE_API_KEY` to use Gemini for semantic extraction (`pip install 'graphifyy[gemini]'`).

Print it once, then continue — do not wait for the user to supply a key. If `GEMINI_API_KEY` or `GOOGLE_API_KEY` IS set, use `graphify.llm.extract_corpus_parallel(files, backend="gemini")` for semantic extraction instead of dispatching subagents. The default Gemini model is `gemini-3-flash-preview`; set `GRAPHIFY_GEMINI_MODEL` or pass `--model` in headless CLI flows to override it.

> **No other API keys are read.** When `GEMINI_API_KEY`/`GOOGLE_API_KEY` are unset, semantic extraction falls to the host agent itself — the running session is the LLM. On a host that dispatches subagents (e.g. Claude Code), dispatch them as written in Part B. On a host that runs the CLI directly in a terminal and cannot dispatch subagents, do not stall: a code-only corpus has no semantic work, so write the empty semantic file (Part B "Fast path") and continue to Part C; for a corpus with docs/papers/images, either set a Gemini key or extract those inline yourself, but in no case prompt for `ANTHROPIC_API_KEY` — that prompt is a misread of this skill.

**Run Part A (AST) and Part B (semantic) in parallel. Dispatch all semantic subagents AND start AST extraction in the same message. Both can run simultaneously since they operate on different file types. Merge results in Part C as before.**
**When Part B needs host-agent dispatch and the host supports subagents, start the semantic subagents and Part A (AST) in the same message. Both can run simultaneously since they operate on different file types. Respect Part B's fast path and cache check before dispatching. Merge results in Part C as before.**

Note: Parallelizing AST + semantic saves 5-15s on large corpora. AST is deterministic and fast; start it while subagents are processing docs/papers.

Expand Down Expand Up @@ -211,7 +209,7 @@ Path('graphify-out/.graphify_semantic.json').write_text(json.dumps({'nodes':[],'
"
```

**MANDATORY: You MUST use the Agent tool here. Reading files yourself one-by-one is forbidden - it is 5-10x slower. If you do not use the Agent tool you are doing this wrong.**
**For host-agent semantic extraction, use the platform's dispatch mechanism described in Step B2 (the Agent tool on Claude Code), one subagent per chunk; parallel dispatch is 5-10x faster than reading files yourself. Skip dispatch when the Part B fast path applies or a configured Gemini backend handles semantic extraction. On a host that cannot dispatch subagents, use the inline fallback described above.**

Before dispatching subagents, print a timing estimate:
- Load `total_words` and file counts from `graphify-out/.graphify_detect.json`
Expand Down
10 changes: 4 additions & 6 deletions graphify/skill-claw.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ If no path was given, use `.` (current directory). Do not ask the user for a pat

If the path argument starts with `https://github.com/` or `http://github.com/`, treat it as a GitHub URL - run Step 0 before anything else, then continue with the resolved local path.

Follow these steps in order. Do not skip steps.
Run the steps in order. Skip a step only where explicitly instructed.

### Step 0 - GitHub repos and multi-path merge (only if a URL or several paths)

Expand Down Expand Up @@ -160,16 +160,14 @@ Skip this step entirely if `detect` returned zero `video` files. When the corpus

This step has two parts: **structural extraction** (deterministic, free) and **semantic extraction** (LLM, costs tokens).

> **graphify needs no API key. Never ask the user for one, and never block on one.** Code is extracted structurally (AST) with no LLM and no key at all — a code-only corpus (the common `/graphify .` on a repo) skips semantic extraction entirely, so it needs nothing here: go straight to Part A and skip Part B. Semantic extraction (only for docs, papers, and images) uses Gemini **only if** `GEMINI_API_KEY`/`GOOGLE_API_KEY` is already set; otherwise the host agent itself is the LLM. graphify does **not** read `ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, or any other provider key. If you catch yourself about to prompt for, wait on, or stop because of a missing API key, that is a misread of this skill — proceed without one.
> **graphify needs no API key. Never ask the user for one, and never block on one.** Code is extracted structurally (AST) with no LLM or key; for a code-only corpus, run Part A and follow Part B's fast path to write the empty semantic file before Part C. This skill's semantic extraction route uses Gemini when `GEMINI_API_KEY`/`GOOGLE_API_KEY` is already set; otherwise the host agent itself is the LLM. The headless CLI supports other configured providers through `graphify.llm.detect_backend()`; this skill's Gemini check does not select those providers. On a host that dispatches subagents, follow Part B for uncached docs, papers, and images. On a host that cannot dispatch subagents, extract those inline yourself. Proceed without waiting for credentials.

**Before semantic extraction:** check whether `GEMINI_API_KEY` or `GOOGLE_API_KEY` is set. If neither is set, print this one-liner to the user:
> Tip: set `GEMINI_API_KEY` or `GOOGLE_API_KEY` to use Gemini for semantic extraction (`pip install 'graphifyy[gemini]'`).

Print it once, then continue — do not wait for the user to supply a key. If `GEMINI_API_KEY` or `GOOGLE_API_KEY` IS set, use `graphify.llm.extract_corpus_parallel(files, backend="gemini")` for semantic extraction instead of dispatching subagents. The default Gemini model is `gemini-3-flash-preview`; set `GRAPHIFY_GEMINI_MODEL` or pass `--model` in headless CLI flows to override it.

> **No other API keys are read.** When `GEMINI_API_KEY`/`GOOGLE_API_KEY` are unset, semantic extraction falls to the host agent itself — the running session is the LLM. On a host that dispatches subagents (e.g. Claude Code), dispatch them as written in Part B. On a host that runs the CLI directly in a terminal and cannot dispatch subagents, do not stall: a code-only corpus has no semantic work, so write the empty semantic file (Part B "Fast path") and continue to Part C; for a corpus with docs/papers/images, either set a Gemini key or extract those inline yourself, but in no case prompt for `ANTHROPIC_API_KEY` — that prompt is a misread of this skill.

**Run Part A (AST) and Part B (semantic) in parallel. Dispatch all semantic subagents AND start AST extraction in the same message. Both can run simultaneously since they operate on different file types. Merge results in Part C as before.**
**When Part B needs host-agent dispatch and the host supports subagents, start the semantic subagents and Part A (AST) in the same message. Both can run simultaneously since they operate on different file types. Respect Part B's fast path and cache check before dispatching. Merge results in Part C as before.**

Note: Parallelizing AST + semantic saves 5-15s on large corpora. AST is deterministic and fast; start it while subagents are processing docs/papers.

Expand Down Expand Up @@ -211,7 +209,7 @@ Path('graphify-out/.graphify_semantic.json').write_text(json.dumps({'nodes':[],'
"
```

**MANDATORY: You MUST use the Agent tool here. Reading files yourself one-by-one is forbidden - it is 5-10x slower. If you do not use the Agent tool you are doing this wrong.**
**For host-agent semantic extraction, use the platform's dispatch mechanism described in Step B2 (the Agent tool on Claude Code), one subagent per chunk; parallel dispatch is 5-10x faster than reading files yourself. Skip dispatch when the Part B fast path applies or a configured Gemini backend handles semantic extraction. On a host that cannot dispatch subagents, use the inline fallback described above.**

Before dispatching subagents, print a timing estimate:
- Load `total_words` and file counts from `graphify-out/.graphify_detect.json`
Expand Down
10 changes: 4 additions & 6 deletions graphify/skill-codex.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ If no path was given, use `.` (current directory). Do not ask the user for a pat

If the path argument starts with `https://github.com/` or `http://github.com/`, treat it as a GitHub URL - run Step 0 before anything else, then continue with the resolved local path.

Follow these steps in order. Do not skip steps.
Run the steps in order. Skip a step only where explicitly instructed.

### Step 0 - GitHub repos and multi-path merge (only if a URL or several paths)

Expand Down Expand Up @@ -160,16 +160,14 @@ Skip this step entirely if `detect` returned zero `video` files. When the corpus

This step has two parts: **structural extraction** (deterministic, free) and **semantic extraction** (LLM, costs tokens).

> **graphify needs no API key. Never ask the user for one, and never block on one.** Code is extracted structurally (AST) with no LLM and no key at all — a code-only corpus (the common `/graphify .` on a repo) skips semantic extraction entirely, so it needs nothing here: go straight to Part A and skip Part B. Semantic extraction (only for docs, papers, and images) uses Gemini **only if** `GEMINI_API_KEY`/`GOOGLE_API_KEY` is already set; otherwise the host agent itself is the LLM. graphify does **not** read `ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, or any other provider key. If you catch yourself about to prompt for, wait on, or stop because of a missing API key, that is a misread of this skill — proceed without one.
> **graphify needs no API key. Never ask the user for one, and never block on one.** Code is extracted structurally (AST) with no LLM or key; for a code-only corpus, run Part A and follow Part B's fast path to write the empty semantic file before Part C. This skill's semantic extraction route uses Gemini when `GEMINI_API_KEY`/`GOOGLE_API_KEY` is already set; otherwise the host agent itself is the LLM. The headless CLI supports other configured providers through `graphify.llm.detect_backend()`; this skill's Gemini check does not select those providers. On a host that dispatches subagents, follow Part B for uncached docs, papers, and images. On a host that cannot dispatch subagents, extract those inline yourself. Proceed without waiting for credentials.

**Before semantic extraction:** check whether `GEMINI_API_KEY` or `GOOGLE_API_KEY` is set. If neither is set, print this one-liner to the user:
> Tip: set `GEMINI_API_KEY` or `GOOGLE_API_KEY` to use Gemini for semantic extraction (`pip install 'graphifyy[gemini]'`).

Print it once, then continue — do not wait for the user to supply a key. If `GEMINI_API_KEY` or `GOOGLE_API_KEY` IS set, use `graphify.llm.extract_corpus_parallel(files, backend="gemini")` for semantic extraction instead of dispatching subagents. The default Gemini model is `gemini-3-flash-preview`; set `GRAPHIFY_GEMINI_MODEL` or pass `--model` in headless CLI flows to override it.

> **No other API keys are read.** When `GEMINI_API_KEY`/`GOOGLE_API_KEY` are unset, semantic extraction falls to the host agent itself — the running session is the LLM. On a host that dispatches subagents (e.g. Claude Code), dispatch them as written in Part B. On a host that runs the CLI directly in a terminal and cannot dispatch subagents, do not stall: a code-only corpus has no semantic work, so write the empty semantic file (Part B "Fast path") and continue to Part C; for a corpus with docs/papers/images, either set a Gemini key or extract those inline yourself, but in no case prompt for `ANTHROPIC_API_KEY` — that prompt is a misread of this skill.

**Run Part A (AST) and Part B (semantic) in parallel. Dispatch all semantic subagents AND start AST extraction in the same message. Both can run simultaneously since they operate on different file types. Merge results in Part C as before.**
**When Part B needs host-agent dispatch and the host supports subagents, start the semantic subagents and Part A (AST) in the same message. Both can run simultaneously since they operate on different file types. Respect Part B's fast path and cache check before dispatching. Merge results in Part C as before.**

Note: Parallelizing AST + semantic saves 5-15s on large corpora. AST is deterministic and fast; start it while subagents are processing docs/papers.

Expand Down Expand Up @@ -211,7 +209,7 @@ Path('graphify-out/.graphify_semantic.json').write_text(json.dumps({'nodes':[],'
"
```

**MANDATORY: You MUST use the Agent tool here. Reading files yourself one-by-one is forbidden - it is 5-10x slower. If you do not use the Agent tool you are doing this wrong.**
**For host-agent semantic extraction, use the platform's dispatch mechanism described in Step B2 (the Agent tool on Claude Code), one subagent per chunk; parallel dispatch is 5-10x faster than reading files yourself. Skip dispatch when the Part B fast path applies or a configured Gemini backend handles semantic extraction. On a host that cannot dispatch subagents, use the inline fallback described above.**

Before dispatching subagents, print a timing estimate:
- Load `total_words` and file counts from `graphify-out/.graphify_detect.json`
Expand Down
Loading