Skip to main content
ClaudeWave
ES, Spanish
Skill11.1k estrellas del repoactualizado 8d ago

hive.terminal-tools-fs-search

The hive.terminal-tools-fs-search Claude Code skill provides structured wrappers around ripgrep and find for filesystem searching outside project scope. Use terminal_rg for content matching in system directories like /var/log and /etc, terminal_find for files matching predicates like modification time or size, and terminal_exec for simple operations like tree views, stat, or disk usage queries.

Instalar en Claude Code
Copiar
git clone --depth 1 https://github.com/aden-hive/hive /tmp/hive.terminal-tools-fs-search && cp -r /tmp/hive.terminal-tools-fs-search/core/framework/skills/_preset_skills/terminal-tools-fs-search ~/.claude/skills/hive.terminal-tools-fs-search
Después abre una sesión nueva de Claude Code; el skill carga automáticamente.

SKILL.md

# Filesystem search

terminal-tools provides two structured search tools: `terminal_rg` (ripgrep for content) and `terminal_glob` (find files by name/glob). Predicate queries (mtime/size/type) and everything else (tree, stat, du) are just `terminal_exec`.

## When to use what

| Task | Tool |
|---|---|
| Find code/text matching a pattern (project tree or any path) | `terminal_rg` (gitignore-aware; defaults to your session workdir) |
| Find files by name/glob (any path) | `terminal_glob` |
| Find files by mtime/size/type predicate | `terminal_exec("find ...")` (see references/find_predicates.md) |
| List a directory | `terminal_exec("ls -la /path")` |
| Tree view | `terminal_exec("tree -L 2 /path")` |
| Single-path stat | `terminal_exec("stat /path")` |
| Disk usage | `terminal_exec("du -sh /path")` or `terminal_exec("du -h --max-depth=2 /")` |
| Count matches across files | `terminal_rg(pattern, count=True via extra_args=["-c"])` |

## `terminal_rg` — content search

ripgrep is fast, gitignore-aware, and has a deep flag surface. The structured wrapper exposes the most useful flags directly; `extra_args` covers the rest.

### Common patterns

```
# All Python files containing "TODO"
terminal_rg(pattern="TODO", path=".", type_filter="py")

# Case-insensitive, with context
terminal_rg(pattern="error", path="/var/log", ignore_case=True, context=2)

# Search hidden files (rg ignores them by default)
terminal_rg(pattern="api_key", path="~", hidden=True)

# Don't respect .gitignore (find files git would ignore)
terminal_rg(pattern="generated", path=".", no_ignore=True)

# Multi-line pattern (e.g., function definitions spanning lines)
terminal_rg(pattern=r"def\s+\w+\(.*\n.*\n", path="src", extra_args=["--multiline"])

# Specific filename glob
terminal_rg(pattern="version", path=".", glob="*.toml")
```

### rg flag idioms

| Flag | Effect |
|---|---|
| `-tpy` (`type_filter="py"`) | Only Python files |
| `-uu` | Don't respect any ignores (incl. `.git/`) |
| `--multiline` (`extra_args`) | Allow regex spanning lines |
| `--max-count` (`max_count`) | Stop after N matches per file |
| `--max-depth` (`max_depth`) | Limit recursion |
| `-w` (`extra_args`) | Whole word match |
| `-F` (`extra_args`) | Fixed string (no regex) |

See `references/ripgrep_cheatsheet.md` for the long form.

## `terminal_glob` — find files by name

Lists files matching a glob, gitignore-aware (backed by `rg --files`). The pattern is widened for you so a bare stem Just Works — the actual glob run is returned as `expanded_pattern`:

- `lk_scan_post_reactors` → matched as `**/*lk_scan_post_reactors*` (recursive substring)
- `*.py` → matched as `**/*.py` (recursive by default)
- `src/**/*.py` → used verbatim

```
# Find a file by stem anywhere under a tree
terminal_glob(pattern="lk_scan_post_reactors", path="core/framework/skills")

# All YAML configs under /etc
terminal_glob(pattern="*.yaml", path="/etc")

# Include .gitignored / hidden / build-cache files
terminal_glob(pattern="*.log", path=".", include_ignored=True)
```

For **predicate** queries (modified in last N days, larger than N MB, only dirs/symlinks), `terminal_glob` is the wrong tool — drop to `terminal_exec("find ...")`. See `references/find_predicates.md`.

## Output truncation

Both tools return `truncated: true` when output exceeded the inline cap. For `terminal_rg`, matches were dropped (refine the pattern or narrow the path); for `terminal_glob`, results past `max_results` (default 1000) were dropped — the search stops early at the cap, so narrow the pattern rather than raising it. `terminal_glob` also returns `timed_out: true` (with the partial results it gathered) when the walk exceeded its deadline.

## Anti-patterns

- **`terminal_rg` is the project search tool** — gitignore-aware and returns structured matches; use it for in-project search as well as raw paths.
- **Don't reach for `terminal_glob` to list one directory** — `terminal_exec("ls -la /path")` is shorter.
- **Don't use `terminal_exec("grep ...")`** when `terminal_rg` exists — rg is faster, gitignore-aware, and returns structured matches.
- **Don't hand-roll `terminal_exec("find ... -name ...")`** for a plain name search — use `terminal_glob`. Reserve `terminal_exec("find ...")` for mtime/size/type predicates.
browser-edge-casesSkill

SOP for debugging browser automation failures on complex websites. Use when browser tools fail on specific sites like LinkedIn, Twitter/X, SPAs, or sites with Shadow DOM.

hive.browser-automationSkill

Required before any hive-browser CLI command. The browser is driven from the terminal by running `hive-browser <command> ... --json` via terminal_exec — not via MCP tools. Teaches the browser lifecycle rules (the bridge attaches to the USER'S running Chrome — never kill or launch browser processes; timeouts are transport issues, not crashes), the screenshot + coordinate workflow (hive-browser interact with a fractional coordinate) that reaches shadow-DOM inputs selectors can't see, the viewport-fraction coordinate rule (not pixels), rich-text editor quirks ("send button stays disabled" failures), and CSP gotchas. Covers Chrome via CDP through the GCU Beeline extension.

hive.chart-creation-foundationsSkill

Required reading whenever any chart_* tool is available. Teaches the one-tool embedding contract (call chart_render → live chart appears in chat AND a downloadable PNG lands in the queen session dir), the ECharts (data viz) vs Mermaid (structural diagrams) decision, the BI/financial-grade aesthetic baseline (no chartjunk, restrained palette, proper typography, single message per chart), and the canonical spec patterns for the 12 most-common chart types. Skipping this leads to 1990s-Excel charts, missing downloads, and the agent writing markdown image links by hand instead of letting chart_render drive the UI.

hive.colony-progress-trackerSkill

Claim tasks, record step progress, and verify SOP gates in the colony SQLite queue. Applies when your spawn message includes a db_path field.

hive.context-preservationSkill

Proactively extract critical values from tool results into working notes before automatic context pruning destroys them.

hive.error-recoverySkill

Follow a structured recovery decision tree when tool calls fail instead of blindly retrying or giving up.

hive.image-generationSkill

Required before calling image_generate. Create and edit images from a prompt — generate an image, make a picture / logo / illustration / icon / banner / poster / thumbnail / hero image / mockup / product shot / social graphic, or edit / restyle / combine existing images from reference images. Uses OpenAI gpt-image-2 through the Hive image service, billed to the user's Hive credits like an LLM call (no API key needed). Teaches the exact call shape, the quality/cost tradeoff (quality="low" is the default and cheapest), reference-image editing, how to show the result to the user with attach_file, and the failure modes (out of credits, model unavailable, moderation).

hive.linkedin-automationSkill

Read before automating LinkedIn with browser_* tools. LinkedIn combines shadow DOM (#interop-outlet), strict Trusted Types CSP that silently drops innerHTML, Lexical composer, native beforeunload dialogs that hang the bridge, and aggressive spam filters — each has bitten us at least once. Verified flows for profile messaging, connection-request acceptance, feed composition, and search. Requires hive.browser-automation. Verified against logged-in production 2026-04-11.