CtrlK
BlogDocsLog inGet started
Tessl Logo

hive.terminal-tools-fs-search

Use terminal_rg / terminal_glob for all filesystem search — your project tree as well as system configs, /var/log, /etc, archive contents. Teaches the rg vs glob vs terminal_exec("find/ls/du/tree") split, common rg flag combos for code/logs/configs, glob patterns for finding files by name, the rule that mtime/size/type predicate queries drop to terminal_exec("find ..."), and that for tree views or single-file stat info you should just use terminal_exec instead of inventing a tool. Read before reaching for raw shell to grep or find anything.

Invalid
This skill can't be scored yet
Validation errors are blocking scoring. Review and fix them to unlock Quality, Impact and Security scores. See what needs fixing →
SKILL.md
Quality
Evals
Security

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

TaskTool
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 predicateterminal_exec("find ...") (see references/find_predicates.md)
List a directoryterminal_exec("ls -la /path")
Tree viewterminal_exec("tree -L 2 /path")
Single-path statterminal_exec("stat /path")
Disk usageterminal_exec("du -sh /path") or terminal_exec("du -h --max-depth=2 /")
Count matches across filesterminal_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

FlagEffect
-tpy (type_filter="py")Only Python files
-uuDon'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 directoryterminal_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.
Repository
aden-hive/hive
Last updated
First committed

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.