grok skill: cygpath path-hardening + review-files/review-diff modes
Fixes the two Windows pain points when routing code review to the Grok CLI (native Windows grok.exe driven from Git Bash): - winpath() (cygpath -w; no-op off Windows) on every path handed to grok.exe (--prompt-file, --cwd) -> deterministic, space-safe; removes reliance on MSYS's argv auto-conversion heuristic (the 'confounded by Windows paths'). - review mode resolves to an absolute Windows path (handles absolute/spaced paths). - NEW review-files [-i instr] <f1> [f2...]: review a set of files together. - NEW review-diff [-C <repo-dir>] [-i instr] <gitref> [-- <pathspec>]: review a git diff; -C targets submodules (e.g. guru-rmm). Diff goes via --prompt-file, not a shell arg -> no 'quote hell'. Tested: text, review (spaced abs path), review-files (2 tray modules), review-diff (self-review of these changes). SKILL.md updated. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -32,7 +32,9 @@ bash "$CLAUDETOOLS_ROOT/.claude/skills/grok/scripts/ask-grok.sh" <mode> ...
|
||||
|------|-------|--------------|
|
||||
| `text` | `ask-grok.sh text "<prompt>"` or `text --prompt-file <path>` | One-shot text answer (independent model). `--prompt-file` for long content (review/summarize a doc). |
|
||||
| `verify` | `ask-grok.sh verify "<claim/finding>"` or `verify --prompt-file <path>` | Adversarial second opinion — Grok tries to REFUTE/find gaps, returns a verdict + reasons. |
|
||||
| `review` | `ask-grok.sh review <file-path> ["<instructions>"]` | Grok reads the file at `<path>` itself (its `read_file` tool, run in the repo) and reviews it — no embedding, handles large files, can pull in referenced files. |
|
||||
| `review` | `ask-grok.sh review <file-path> ["<instructions>"]` | Grok reads the file at `<path>` itself (its `read_file` tool) and reviews it — no embedding, handles large files, can pull in referenced files. Accepts absolute or repo-relative paths, and paths with spaces. |
|
||||
| `review-files` | `ask-grok.sh review-files [-i "<instr>"] <f1> [f2 …]` | Review a **set** of files together (grok `read_file`s each) — for cross-file consistency or a multi-file change. Paths absolute or repo-relative; spaces OK. No code passed as a shell arg → no quote hell. |
|
||||
| `review-diff` | `ask-grok.sh review-diff [-C <repo-dir>] [-i "<instr>"] <gitref> [-- <pathspec>]` | Review a **git diff** (`git diff <gitref>` from `<repo-dir>`; default repo root, use `-C` for a submodule e.g. `-C projects/msp-tools/guru-rmm`). The diff goes via the prompt file (not a shell arg); grok can `read_file` changed files for full context (cwd = repo dir). |
|
||||
| `image` | `ask-grok.sh image "<prompt>" [out.png]` | `image_gen` (Imagine) → copies the artifact to `out` (default `grok-image.png`). |
|
||||
| `video` | `ask-grok.sh video "<motion prompt>" <input-image> [out.mp4]` | `image_to_video` on an input image → copies to `out`. ~60-90s. |
|
||||
| `xsearch` | `ask-grok.sh xsearch "<query>"` | Live `web_search` + X/Twitter tools; returns text with citations. |
|
||||
|
||||
Reference in New Issue
Block a user