मुख्य सामग्री पर जाएँ
Skillpedia
सामान्य कोडिंग11k · #11813

hive.terminal-tools-fs-search

यह क्या करती है

यह स्किल AI को फ़ाइलों के अंदर टेक्स्ट ढूँढना और फ़ाइल नाम से फ़ाइलें खोजना सिखाती है। यह किसी भी ऐसे व्यक्ति के लिए है जिसे प्रोजेक्ट या लॉग फ़ोल्डरों में खोजबीन करनी है।

कब इस्तेमाल करें

  • ✓जब आपको पता करना हो कि कोई शब्द या कोड पूरे प्रोजेक्ट में कहाँ आता है।
  • ✓जब आप फ़ाइलें उनके नाम या पैटर्न से ढूँढना चाहते हैं।
  • ✓जब आपको अपने कंप्यूटर पर फ़ाइल आकार, तारीख या फ़ोल्डर की सामग्री जाँचनी हो।

Skill का लिंक

https://github.com/aden-hive/hive/blob/main/core/framework/skills/_preset_skills/terminal-tools-fs-search/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/aden-hive/hive/blob/main/core/framework/skills/_preset_skills/terminal-tools-fs-search/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“मेरे प्रोजेक्ट फ़ोल्डर में हर वह फ़ाइल ढूँढिए जिसमें पुराना 49 डॉलर का दाम लिखा है।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

AI फ़ाइलों के अंदर टेक्स्ट खोजने के लिए ripgrep, फ़ाइल नाम खोजने के लिए glob खोज, और फ़ोल्डर दृश्य, आकार और तारीख के लिए सरल सूची कमांड इस्तेमाल करता है।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

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 matching lines in returned results terminal_rg(...).total (check truncated before treating it as complete)

terminal_rg — content search

ripgrep is fast, gitignore-aware, and has a deep flag surface. The structured wrapper exposes common search flags directly; extra_args accepts additional flags compatible with JSON output. Output modes such as --count and --files-with-matches are not compatible with this structured interface; use the CLI when that output is needed.

Quickstart installs and verifies ripgrep. Existing installations can be repaired with uv run scripts/ensure_ripgrep.py --install from the repository root. The runtime also checks Windows package-manager locations and current registry PATH entries; HIVE_RIPGREP_PATH can select an absolute executable path. Startup logs report the executable and version, or instructions to fix the missing dependency.

If ripgrep is unavailable, terminal_rg returns code="ripgrep_required" without searching by default. For an approximate search, explicitly set allow_fallback=True: this uses Python regex, a limited filetype table, and basename globs, and does not honor .gitignore. Even with opt-in, context, extra_args, unknown filetypes and complex globs require ripgrep and return an error. Inspect fallback_limitations; do not treat approximate results as a gitignore-aware inventory.

With context=N, surrounding lines are returned in context, separate from matches. Both contain path, line, and text; total counts only match entries.

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

If rg is unavailable, filename search retains a best-effort walk with fallback="python-walk" and a note that .gitignore is not honored.

# 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

अक्सर पूछे जाने वाले सवाल

टेक्स्ट खोज और नाम खोज में क्या अंतर है?

टेक्स्ट खोज फ़ाइलों के अंदर मिलते शब्द ढूँढती है, और नाम खोज फ़ाइलों को उनके नाम या पैटर्न से खोजती है।

क्या खोज में अनदेखी फ़ाइलें छूट जाती हैं?

हाँ। प्रोजेक्ट में टेक्स्ट खोज gitignore नियम मानती है।

अगर नतीजे अधूरे कट जाएँ तो?

स्किल कहती है कि नतीजों को पूरा मानने से पहले जाँचा जाए कि वे छोटे तो नहीं किए गए।

जानकारी

लेखक का मूल विवरण

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.

repo: aden-hive/hive

लोकप्रियता

GitHub स्टार
11k
रैंकिंग में स्थान
#11813
लाइसेंस
Apache-2.0
अपडेट की गई
2/11/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

browser-edge-cases

11k

यह आपके एजेंट को LinkedIn, X या भारी स्क्रिप्ट वाले पेजों जैसी जटिल साइटों पर विफल होने वाले ब्राउज़र ऑटोमेशन को ठीक करने में मदद करती है।

कोडिंगटेस्टिंग

hive.browser-automation

11k

यह आपके एजेंट को hive-browser टूल से और स्क्रीनशॉट व क्लिक के ज़रिए आपके अपने Chrome ब्राउज़र को नियंत्रित करना सिखाती है।

AI और एजेंटएजेंट

hive.colony-progress-tracker

11k

यह आपके एजेंट को कार्य लेने और साझा डेटाबेस में अपने चरण व जाँच दर्ज करने में मदद करती है, ताकि काम चलते-चलते ट्रैक हो।

AI और एजेंटएजेंट

hive.context-preservation

11k

यह आपके एजेंट को लंबे टूल नतीजों से ज़रूरी बातें नोट्स में सहेजने में मदद करती है, इससे पहले कि पुराने विवरण उसकी मेमोरी से हटें।

AI और एजेंटएजेंट

मिलती-जुलती skills