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
19 changes: 14 additions & 5 deletions graphify/skill-agents.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,14 +154,23 @@ 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 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 a CLI backend **only if** one of its keys is already set — the same `graphify.llm.detect_backend()` auto-detection `graphify extract` uses, covering every backend and registered custom provider, not just Gemini (#2513); otherwise the host agent itself is the LLM. graphify reads keys already present in the environment; it never asks for one. 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.

**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]'`).
**Before semantic extraction:** ask the library which backend the CLI would use:

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.
```bash
$(cat graphify-out/.graphify_python) -c "
from graphify.llm import detect_backend
print(detect_backend() or '')
"
```

If it prints nothing (no key 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]'`) — any other backend key from the README works too.

Print it once, then continue — do not wait for the user to supply a key. If a backend WAS detected, use `graphify.llm.extract_corpus_parallel(files, backend="NAME")` (substitute the detected name) for semantic extraction instead of dispatching subagents. The backend's default model applies — e.g. gemini → `gemini-3-flash-preview`, a custom provider → its registered `default_model`; the backend's model env var (`GRAPHIFY_GEMINI_MODEL`, `OPENAI_MODEL`, ...) or `--model` in headless CLI flows overrides it. Exception: if the detected backend has no vision support (`graphify.llm.BACKENDS["NAME"].get("vision")` is falsy), still dispatch image chunks to subagents per Part B — routing images through a non-vision backend silently drops the pixel data.

> **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.
> **Keys are detected, never requested.** When `detect_backend()` finds no backend, 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 backend key or extract those inline yourself, but in no case prompt for one — 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.**

Expand Down
19 changes: 14 additions & 5 deletions graphify/skill-amp.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,14 +154,23 @@ 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 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 a CLI backend **only if** one of its keys is already set — the same `graphify.llm.detect_backend()` auto-detection `graphify extract` uses, covering every backend and registered custom provider, not just Gemini (#2513); otherwise the host agent itself is the LLM. graphify reads keys already present in the environment; it never asks for one. 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.

**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]'`).
**Before semantic extraction:** ask the library which backend the CLI would use:

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.
```bash
$(cat graphify-out/.graphify_python) -c "
from graphify.llm import detect_backend
print(detect_backend() or '')
"
```

If it prints nothing (no key 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]'`) — any other backend key from the README works too.

Print it once, then continue — do not wait for the user to supply a key. If a backend WAS detected, use `graphify.llm.extract_corpus_parallel(files, backend="NAME")` (substitute the detected name) for semantic extraction instead of dispatching subagents. The backend's default model applies — e.g. gemini → `gemini-3-flash-preview`, a custom provider → its registered `default_model`; the backend's model env var (`GRAPHIFY_GEMINI_MODEL`, `OPENAI_MODEL`, ...) or `--model` in headless CLI flows overrides it. Exception: if the detected backend has no vision support (`graphify.llm.BACKENDS["NAME"].get("vision")` is falsy), still dispatch image chunks to subagents per Part B — routing images through a non-vision backend silently drops the pixel data.

> **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.
> **Keys are detected, never requested.** When `detect_backend()` finds no backend, 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 backend key or extract those inline yourself, but in no case prompt for one — 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.**

Expand Down
19 changes: 14 additions & 5 deletions graphify/skill-claw.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,14 +154,23 @@ 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 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 a CLI backend **only if** one of its keys is already set — the same `graphify.llm.detect_backend()` auto-detection `graphify extract` uses, covering every backend and registered custom provider, not just Gemini (#2513); otherwise the host agent itself is the LLM. graphify reads keys already present in the environment; it never asks for one. 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.

**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]'`).
**Before semantic extraction:** ask the library which backend the CLI would use:

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.
```bash
$(cat graphify-out/.graphify_python) -c "
from graphify.llm import detect_backend
print(detect_backend() or '')
"
```

If it prints nothing (no key 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]'`) — any other backend key from the README works too.

Print it once, then continue — do not wait for the user to supply a key. If a backend WAS detected, use `graphify.llm.extract_corpus_parallel(files, backend="NAME")` (substitute the detected name) for semantic extraction instead of dispatching subagents. The backend's default model applies — e.g. gemini → `gemini-3-flash-preview`, a custom provider → its registered `default_model`; the backend's model env var (`GRAPHIFY_GEMINI_MODEL`, `OPENAI_MODEL`, ...) or `--model` in headless CLI flows overrides it. Exception: if the detected backend has no vision support (`graphify.llm.BACKENDS["NAME"].get("vision")` is falsy), still dispatch image chunks to subagents per Part B — routing images through a non-vision backend silently drops the pixel data.

> **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.
> **Keys are detected, never requested.** When `detect_backend()` finds no backend, 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 backend key or extract those inline yourself, but in no case prompt for one — 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.**

Expand Down
Loading