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
25 changes: 24 additions & 1 deletion .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -1670,6 +1670,29 @@
"security",
"compliance"
]
},
{
"name": "antigravity",
"source": "./plugins/antigravity",
"description": "A local NotebookLM for Claude Code. /agy:notebook sweeps a whole folder of documents (PDFs, scans, images, docx) through Google's Antigravity CLI (agy / Gemini 3.x, multimodal) and writes per-document summaries, a relevance index, a cited master synthesis, a timeline and an entity sheet; /agy:notebook-ask answers questions over them with citations — keeping the heavy reading off Claude's context. Also transcribes audio/video (/agy:transcribe, /agy:media), deep web research, browser-walkthrough recording, web scraping, document-to-markdown and design review. No Node runtime.",
"version": "0.7.0",
"author": {
"name": "Marcos Nahuel Albornoz",
"email": "contact@traidai.com"
},
"category": "Documentation",
"homepage": "https://github.com/MarcosNahuel/antigravity-plugin-cc",
"keywords": [
"notebooklm",
"document-analysis",
"rag",
"audio-transcription",
"video-summarization",
"multimodal",
"deep-research",
"gemini",
"agy"
]
}
]
}
}
57 changes: 57 additions & 0 deletions plugins/antigravity/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"name": "antigravity",
"version": "0.7.0",
"description": "Antigravity plugin for Claude Code with TRAID Design System: 5 canonical HTML templates (traid-dark, traid-light, stripe-press, notion-docs, magazine) for branded report generation from markdown. Plus audio & video transcription (/agy:transcribe, /agy:media), a local NotebookLM (/agy:notebook — sweep a folder of documents into objective-driven summaries + a relevance index + a cited master synthesis, with all heavy reading offloaded to agy), quick one-shot prompts, git-diff code review, deep web research with citations, code rescue, task delegation, browser walkthrough recording, structured web scraping, document-to-markdown conversion, and visual/UX design review via Google Antigravity CLI (agy / Gemini 3.x). Fifteen slash commands — /agy:notebook, /agy:notebook-ask, /agy:transcribe, /agy:media, /agy:model, /agy:report, /agy:ask, /agy:review, /agy:research, /agy:rescue, /agy:record, /agy:scrape, /agy:doc-to-md, /agy:design-review, /agy:setup — with `--background` support on long-running modes, --template and --images (native/external/none) on /agy:report, full issue #76 handling (write_file workaround + transcript.jsonl recovery + headless auth-timeout detection + stdin-hang fix), and Windows rename-bug mitigation (pre-flight .tmp sweep + retry on output-file miss). No Node.js runtime.",
"author": {
"name": "Marcos Nahuel Albornoz",
"email": "contact@traidai.com",
"url": "https://github.com/MarcosNahuel"
},
"homepage": "https://github.com/MarcosNahuel/antigravity-plugin-cc",
"repository": "https://github.com/MarcosNahuel/antigravity-plugin-cc",
"license": "MIT",
"keywords": [
"claude-code",
"claude-code-plugin",
"antigravity",
"agy",
"gemini",
"gemini-3-5",
"deep-research",
"web-search",
"research-tool",
"ai-agents",
"llm-tools",
"agentic-engineering",
"anthropic",
"subagent",
"task-delegation",
"browser-recording",
"screencast",
"demo-video",
"web-scraping",
"structured-extraction",
"pdf-to-markdown",
"docx-to-markdown",
"multimodal-conversion",
"design-review",
"ux-audit",
"visual-audit",
"code-review",
"git-diff",
"background-tasks",
"html-report",
"infographic",
"imagen",
"markdown-to-html",
"windows-mitigation",
"design-system",
"traid-brand",
"template-gallery",
"notebooklm",
"notebooklm-alternative",
"document-summary",
"local-rag",
"expediente"
]
}
1,099 changes: 1,099 additions & 0 deletions plugins/antigravity/agents/agy-rescue.md

Large diffs are not rendered by default.

37 changes: 37 additions & 0 deletions plugins/antigravity/commands/ask.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
description: One-shot prompt to Antigravity (agy) — quick question, returns response verbatim. No file persistence to docs/.
argument-hint: "[--background] <prompt>"
context: fork
allowed-tools: Bash, Write
---

Route this to the `antigravity:agy-rescue` subagent in MODE: ask.

Raw user request:
$ARGUMENTS

Routing rules:

- If the request contains `--background`, invoke the subagent with `run_in_background: true`. Strip the flag from the forwarded prompt.
- Otherwise run the subagent in the foreground.
- What remains after stripping `--background` IS the prompt. Trim whitespace.

Pass this header block to the subagent followed by the prompt:

```
MODE: ask
INTENSITY:
MODEL:
RESUME: false
WRITE_FILE:
USER_TEXT:
<cleaned prompt>
```

Operating rules:

- The subagent wraps the prompt with a `write_file` instruction (bug #76 workaround — see https://github.com/google-antigravity/antigravity-cli/issues/76). Agy writes the answer to a temp file, the subagent reads it back, returns the content verbatim.
- Present the response as-is. No commentary, no paraphrase.
- If the user did not supply a prompt, ask once: "What do you want to ask Antigravity?"
- If agy reports it is missing or unauthenticated, tell the user to run `/agy:setup`.
- For multi-step or long-running work, suggest `/agy:rescue` instead (carries the same write-to-file workaround but with a longer timeout and the option to resume conversations).
76 changes: 76 additions & 0 deletions plugins/antigravity/commands/design-review.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
---
description: Run a UX/visual design audit of a URL using Antigravity (agy). Captures desktop + mobile screenshots, scores 10 dimensions (hierarchy, typography, color, spacing, a11y, etc.), benchmarks against industry. Saves to docs/agy/design-reviews/.
argument-hint: "<url> [focus instructions]"
context: fork
allowed-tools: Bash, Write
---

Route this to the `antigravity:agy-rescue` subagent in MODE: design-review.

Raw user request:
$ARGUMENTS

## Routing rules

1. **Parse the URL**: the first whitespace-separated token of `$ARGUMENTS` that starts with `http://` or `https://` IS the URL. If the user wrote it without a scheme, prepend `https://`. If no URL is found, ask once: "What URL should I review the design of?".

2. **Focus**: everything else in `$ARGUMENTS` is optional natural-language emphasis (e.g., "focus on the checkout flow on mobile", "compare against MercadoLibre seller backend"). Empty by default = full 10-dimension review at both viewports.

3. **Slug**: build from URL host + first path segment (lowercase, non-alphanumeric → `-`, collapse repeats, trim to 60 chars).

4. **Date**: today in `YYYY-MM-DD`.

5. **Paths** (relative to current working directory):
- `OUTPUT_DIR` = `docs/agy/design-reviews/`
- `WRITE_FILE` = `docs/agy/design-reviews/<date>-<slug>.md`

6. **Pre-flight** (ONE `Bash` call):
```bash
mkdir -p docs/agy/design-reviews
```

7. **Hand off**: pass this header to the subagent:

```
MODE: design-review
URL: <url>
FOCUS: <natural-language focus or empty>
CWD: <absolute path>
WRITE_FILE: docs/agy/design-reviews/<date>-<slug>.md
```

## Operating rules

- The subagent invokes agy with `--add-dir <CWD>` and a long timeout (`12m0s`) because design reviews involve browser navigation + multiple viewports + multimodal vision analysis.
- The subagent reports:
1. Saved report path.
2. First ~30 lines (executive summary + design score).
3. Paths to captured screenshots (desktop + mobile).
- Present that to the user as-is.
- If the URL is blocked, returns non-200, or browser session crashes, surface the error verbatim.

## What the review covers

Default 10-dimension audit:
1. Visual hierarchy
2. Typography (fonts, sizes, line-height, contrast)
3. Color system (palette, WCAG contrast, gradient usage)
4. Spacing & layout (grid, white space, alignment)
5. Interactive elements (button states, form affordance, micro-interactions)
6. Brand & tone (does design match the value-prop?)
7. Accessibility (alt text, focus indicators, ARIA, color contrast)
8. UX heuristics (Nielsen's 10)
9. Mobile/responsive behavior
10. Competitive context (if `--focus` includes a category, agy compares against industry standards)

Ends with:
- 3 concrete strengths
- 3 highest-leverage improvements (ordered by ROI)
- Overall design score /10

## Notes

- Uses agy's browser subagent under the hood — same `--add-dir` + write_file workaround as `/agy:record`.
- For login-protected pages, agy uses an isolated Chrome profile (no shared cookies). For demos behind auth, pass credentials in the focus text (be aware they end up in the prompt).
- For comparing TWO designs, run `/agy:design-review` twice and synthesize. (A `--compare` flag is a v0.4.0 candidate.)
- Captures both desktop (1440×900) and mobile (375×667) viewports by default.
67 changes: 67 additions & 0 deletions plugins/antigravity/commands/doc-to-md.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
---
description: Convert a PDF, docx, image, or other document to clean Markdown using Antigravity (agy) multimodal Gemini. Saves to docs/agy/converted/.
argument-hint: "<file-path> [extraction focus instructions]"
context: fork
allowed-tools: Bash, Write
---

Route this to the `antigravity:agy-rescue` subagent in MODE: doc-to-md.

Raw user request:
$ARGUMENTS

## Routing rules

1. **Parse the file path**: the first whitespace-separated token of `$ARGUMENTS` that resolves to an existing file (check with `test -f`) IS the source file. Convert relative paths to absolute. If no valid file is found, ask once: "Which file should I convert?".

2. **Extraction focus**: everything else in `$ARGUMENTS` (anything that's not the path) is optional natural-language guidance on what to focus on (e.g., "extract only the pricing tables and ignore the legal boilerplate"). Empty by default = "produce a faithful full-fidelity markdown conversion".

3. **Detect file type** via extension:
- `.pdf` → PDF (multimodal)
- `.docx`, `.doc` → Word (multimodal or text)
- `.png`, `.jpg`, `.jpeg`, `.webp`, `.gif` → image (multimodal — OCR + structure inference)
- `.html`, `.htm` → HTML (text)
- other → text or warn

4. **Slug**: lowercase the source filename base (without extension), non-alphanumeric → `-`, collapse repeats, trim to 60 chars.

5. **Date**: today in `YYYY-MM-DD` (local time).

6. **Paths** (relative to current working directory):
- `OUTPUT_DIR` = `docs/agy/converted/`
- `WRITE_FILE` = `docs/agy/converted/<date>-<slug>.md`

7. **Pre-flight** (ONE `Bash` call):
```bash
mkdir -p docs/agy/converted
```

8. **Hand off**: pass this header to the subagent:

```
MODE: doc-to-md
SOURCE_FILE: <absolute path>
FILE_TYPE: pdf|docx|image|html|other
FOCUS: <natural-language focus or empty>
CWD: <absolute path to current working directory>
WRITE_FILE: docs/agy/converted/<date>-<slug>.md
```

## Operating rules

- The subagent invokes agy with `--add-dir <CWD>` so it can write the result.
- For PDF / docx / image, agy uses Gemini's multimodal vision capabilities — preserves tables, lists, headings, code blocks. Inline images become `![description](image-extraction-note)` placeholders.
- The subagent reports:
1. Saved markdown path.
2. Original file path and detected type.
3. First ~30 lines of the conversion (preview).
4. Pages/sections processed.
- Present that to the user as-is.
- If the file is too large (>200 MB) or the format is unsupported, surface the error verbatim. Suggest splitting or pre-processing.

## Notes

- Large PDFs (>100 pages) consume significant input tokens. Consider chunking for very large docs.
- For images, OCR quality is excellent for printed text, decent for handwriting.
- This is NOT a replacement for `pandoc` if you need lossless format conversion — it's for "give me a clean markdown version I can read/edit/reuse".
- For sensitive documents (NDAs, internal contracts), be aware the content is sent to Google's Gemini servers. Use `vertex-creative` skill with Vertex AI ADC if you need stricter data residency control.
63 changes: 63 additions & 0 deletions plugins/antigravity/commands/media.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
description: Ask a question about an AUDIO, VIDEO or IMAGE file (or a YouTube/remote URL) with Antigravity (agy / Gemini 3.x multimodal). Beyond transcription — "what decisions were made in this meeting?", "what happens at 2:30 in the video?", "what's the tone of this voice note?". Claude Code can't see/hear media; agy can.
argument-hint: "<audio|video|image file | URL> | <question>"
context: fork
allowed-tools: Bash, Read, Agent
---

Multimodal Q&A over a media file. Give `agy` an audio/video/image (or a YouTube/remote URL) and a
question; it answers grounded in what it heard/saw, with time references for audio/video.

Raw user request:
$ARGUMENTS

## Phase 0 — Resolve source + question (ONE Bash call)

Parse `$ARGUMENTS`: split on the first `|` → left = source (a URL or an existing file), right =
question. If there is no `|`, the leading URL/existing-file token is the source and the rest is the
question. If the question is empty, ask once and stop.

```bash
python - "$SOURCE" "$PREGUNTA" <<'PYEOF'
import sys, os, re, hashlib
src = sys.argv[1].strip().strip('"'); preg = (sys.argv[2] if len(sys.argv) > 2 else "").strip()
AUD=(".ogg",".mp3",".wav",".m4a",".aac",".flac",".opus",".aiff"); VID=(".mp4",".mov",".webm",".mkv",".avi",".m4v")
IMG=(".png",".jpg",".jpeg",".webp",".gif")
low=src.lower()
if low.startswith("http"): kind="url"; addir=""
elif low.endswith(VID): kind="video"; addir=os.path.dirname(os.path.abspath(src))
elif low.endswith(AUD): kind="audio"; addir=os.path.dirname(os.path.abspath(src))
elif low.endswith(IMG): kind="image"; addir=os.path.dirname(os.path.abspath(src))
else: kind="file"; addir=os.path.dirname(os.path.abspath(src))
base=re.sub(r"[^a-z0-9]+","-", (re.sub(r"^https?://(www\.)?","",low) if kind=="url" else os.path.splitext(os.path.basename(src))[0]).lower()).strip("-")[:40] or "media"
qh=hashlib.sha1(preg.encode()).hexdigest()[:6]
out=os.path.join("docs","agy","media", f"{base}-{qh}.md"); os.makedirs(os.path.dirname(out), exist_ok=True)
print(f"KIND={kind}\nADD_DIR={addir}\nWRITE_FILE={os.path.abspath(out)}\nSOURCE={src}")
PYEOF
```

## Phase 1 — Answer (ONE agy subagent)

Spawn ONE `antigravity:agy-rescue` subagent in **MODE: media**:

```
MODE: media
CWD: <absolute current working dir>
KIND: audio|video|image|url|file
SOURCE: <file path or URL>
ADD_DIR: <dir of the source file, or empty for a URL>
PREGUNTA: <question>
WRITE_FILE: <WRITE_FILE>
USER_TEXT:
(empty)
```

## Phase 2 — Present

Read ONLY `<WRITE_FILE>` and present the answer verbatim, then the saved path. Don't re-process the
media yourself.

## Notes
- For audio/video the answer cites **time references** (e.g. "around 02:30") when relevant.
- Need a full transcript instead of a targeted answer? Use `/agy:transcribe`.
- agy `--print` writes nothing to stdout outside a TTY (issue #76); the answer is read from the file.
Loading