Agent skill

Local File and Code Search

by taxueseek in taxueseek/argo

Searches local files and code through one script, seek.py, that picks between rg, fd and macOS Spotlight and works in three layers: locate, context, close reading.

MITAuto-check passedDevelopment

SKILL.md written in Chinese; this summary is our English description.

Install Local File and Code Search

skills CLI
$ npx skills add taxueseek/argo --skill local-seek -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install taxueseek/argo local-seek --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/taxueseek/argo.git skills-src && mkdir -p .claude/skills && cp -r skills-src/sub-skills/local-seek .claude/skills/local-seek && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
local-seek
GitHub stars
188
Token cost
~1.1k tokens
SKILL.md length
196 words
Files
17 (incl. scripts, references)
Skills in repo
5
Repo updated
First seen
Licence
MIT

At a glance

Searches local files and code through one script, seek.py, that picks between rg, fd and macOS Spotlight and works in three layers: locate, context, close reading.

  • Works in 10 steps: 先窄后宽:先限定目录/扩展名,搜不到再扩大。禁止一开始就全盘扫。 → 先数后看:--count 看分布,--context… → 指定类型:代码场景加 --type(py,ts,go…),文档场景用… → …
  • Finding where a function or symbol is defined in a local project
  • SKILL.md covers 三层递进:先定位、再看上下文、最后精读, 统一入口, 工具选择(何时换工具) and 执行纪律, plus 2 more sections
  • Runs Python scripts from its folder; calls python3

What it does

All local searches go through scripts/seek.py, which chooses the underlying tool so the agent does not hand-build rg or fd arguments. Searching moves in three layers: find which files match with a count or filename list, view a few lines of context around hits, and only then read key passages by line number. The tool output is meant to be the answer, and the agent starts narrow, counts before looking and avoids reading whole files.

Built-in behavior includes literal matching for plain queries, fallback when regex parsing fails, relaxing a Chinese query into two-character terms when the exact phrase finds nothing, a PCRE2 look-around check, structural code-pattern search for things like bare except or empty catch, and git log or blame shortcuts. Spotlight search uses the macOS index and is not available on Windows or Linux. Exclusion rules sit in config/domains.yaml, and reference files hold recipes for rg, fd, git integration and structural search. The SKILL.md is written in Chinese.

When your agent uses it

  • Finding where a function or symbol is defined in a local project
  • Locating a file when you only remember part of its name
  • Searching notes or documents on disk for a phrase
  • Checking who last changed a line with git blame

Example prompts

  • “Search ~/notes for every mention of the budget review and count the hits per file.”
  • “Find code in this repo that swallows exceptions with a bare except.”
  • “Show who last changed the retry logic in client.py and what else touched it recently.”

Requirements

  • Python 3, to run scripts/seek.py
  • ripgrep and fd installed locally

Workflow steps

10 steps, taken from the first numbered list in SKILL.md.

  1. 先窄后宽:先限定目录/扩展名,搜不到再扩大。禁止一开始就全盘扫。
  2. 先数后看:--count 看分布,--context 0(默认)看命中行,最后才读文件。
  3. 指定类型:代码场景加 --type(py,ts,go…),文档场景用 --scope doc。
  4. 绝对路径优先:涉及读文件时用 read_file + 绝对路径。
  5. 不读整个文件:L3 精读用行号偏移局部读取,命中上下文不够再扩。
  6. 结果为空先换词:换同义词/拆词/去大小写,再换工具(fd→mdfind),
  7. 中文搜索:rg 原生支持 UTF-8,直接搜中文;长中文词会自动放宽匹配,
  8. 先结构后正文:大文件先 --outline 看结构,再 --lines N-M 按需读取,
  9. 结构搜索按语义:找「是不是有裸 except」这类问题用 --structural,
  10. git 只读标题:--git-log 只给标题,够用就停;要看具体改动再手动 git show,

What it can do on your machine

Read from SKILL.md and the folder at commit a6657b0. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 2 files in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python3

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Local File and Code Search loads about 1.1k tokens when it runs, and up to ~4.2k if it reads all its reference files. Until then it costs about 34 tokens; SKILL.md has 196 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~34
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~4.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from taxueseek/argo at commit a6657b0, republished under its MIT licence (© taxueseek). 196 words, ~1,050 tokens.

Download SKILL.mdSave it as .claude/skills/local-seek/SKILL.md (or your agent's skills folder). This skill also uses 16 other files; get the full folder from GitHub.
name
local-seek
description
本机文件与代码内容搜索(rg/fd/mdfind/grep 统一入口 seek.py,工具输出即答案)。与 argo 联网搜索互补:搜本机目录、代码符号、文件名、文档全文、文件结构。触发:搜本地、找文件、找代码、本机搜 xx、代码在哪、统计本地命中。
version
1.4.1

local-seek — 本地高效搜索(v1.4.1)

搜本机文件和内容就从这里开始。工具的输出就是答案,不用再自己翻一遍。 与 Argo(联网搜索)分工:Argo 搜网络,本技能搜本机。

三层递进:先定位、再看上下文、最后精读

不要一上来就读文件。一层层往里走,每层的结果都不多:

层干什么命令输出量
L1 定位找到「在哪个文件」seek.py "词" --count 或 --filename每文件一行
L2 上下文看命中位置附近seek.py "词" --context 2每命中 3 行
L3 精读读关键段落read_file 按行号局部读取按需

每次搜索先想清楚停在哪一层,默认只做第一层。

统一入口

所有搜索都走本技能里的 scripts/seek.py(相对 argo 根:sub-skills/local-seek/scripts/seek.py), 由它决定用哪个工具,不要自己拼 rg/fd 参数:

bash
# 以下以 argo 安装根为 cwd;或写死 $ARGO_HOME/sub-skills/local-seek/scripts/seek.py
python3 sub-skills/local-seek/scripts/seek.py "查询词"                 # 默认:当前目录全文
python3 sub-skills/local-seek/scripts/seek.py "查询词" --path ~/notes   # 指定目录
python3 sub-skills/local-seek/scripts/seek.py "词" --path ~/.agents --dot  # 连以 . 开头的目录和软链一起搜;搜 ~/.agents、~/.zcode 时要加(Spotlight 收不到这类目录,--dot 对 --spotlight 没用)
python3 sub-skills/local-seek/scripts/seek.py "词" --path . --include-noise  # repos/、tests/、tmp/、日期归档目录与真源平权(默认这些排在真源之后,但**仍然搜得到**)
python3 sub-skills/local-seek/scripts/seek.py "查询词" --count          # 先数命中,再决定是否深入
python3 sub-skills/local-seek/scripts/seek.py "查询词" --filename       # 按文件名
python3 sub-skills/local-seek/scripts/seek.py "查询词" --spotlight      # 全盘兜底(PDF/邮件/笔记)
python3 sub-skills/local-seek/scripts/seek.py "查询词" --type py,ts
python3 sub-skills/local-seek/scripts/seek.py "查询词" --json           # 结构化输出
python3 sub-skills/local-seek/scripts/seek.py "查询词" --exact          # 关闭中文扩展,精确匹配
python3 sub-skills/local-seek/scripts/seek.py "查询词" --exclude 某文件 # 额外排除(可重复)
python3 sub-skills/local-seek/scripts/seek.py --outline 文件路径        # 文件结构(def/class/标题/顶层key)
python3 sub-skills/local-seek/scripts/seek.py --lines 10-50 文件路径    # 按行读取,替代 read_file 全文
python3 sub-skills/local-seek/scripts/seek.py "裸except" --structural   # 结构搜索(空catch/裸except/装饰函数等)
python3 sub-skills/local-seek/scripts/seek.py --git-log 文件路径        # 文件的最近提交历史
python3 sub-skills/local-seek/scripts/seek.py --git-blame 12 文件路径   # 第 12 行的提交归属

内置智能行为(无需手动指定):

  • 固定字符串:查询是纯字面量时自动用 rg -F;含 regex 元字符但解析失败 (如 interface{})自动回退 -F。
  • 中文扩展:中文查询先按原词精确匹配,没命中再拆成 2 字词(2-gram)放宽 (如「数据抓取」放宽到「数据」「抓取」),这样能多搜到一些;--exact 关闭。
  • PCRE2 检测:查询含 look-around 时检查本机 rg 是否支持,不支持给出 明确提示而非报错。
  • 结构搜索:--structural 按语义检索代码模式(裸 except、空 catch、 装饰函数、函数/类定义),中英文别名都认,零安装(rg -U 多行实现)。
  • Git 联动:--git-log / --git-blame 直接回答「这行谁改的、最近动过什么」, 文件不在仓库或未跟踪时给出明确区分,不报错。

工具选择(何时换工具)

场景用为什么
搜代码/正文关键词rg(默认)毫秒级,尊重 .gitignore,自动排除 node_modules 等
只记得文件名--filename(fd)按文件名模糊匹配
搜 PDF/邮件/已归档内容--spotlight(mdfind)用 macOS 已经建好的系统索引,不额外花时间(Windows/Linux 上没有,改用 rg 搜正文)
找代码模式(裸except/空catch等)--structural按语义不按字符串
追文件历史/单行归属--git-log / --git-blame免开终端敲 git
当前目录搜不到先扩大 --path,再 --spotlight先窄后宽
大仓库担心输出爆炸--count + --max 20先看分布再深入

执行纪律

  1. 先窄后宽:先限定目录/扩展名,搜不到再扩大。禁止一开始就全盘扫。
  2. 先数后看:--count 看分布,--context 0(默认)看命中行,最后才读文件。
  3. 指定类型:代码场景加 --type(py,ts,go…),文档场景用 --scope doc。
  4. 绝对路径优先:涉及读文件时用 read_file + 绝对路径。
  5. 不读整个文件:L3 精读用行号偏移局部读取,命中上下文不够再扩。
  6. 结果为空先换词:换同义词/拆词/去大小写,再换工具(fd→mdfind), 不要重复同一查询。
  7. 中文搜索:rg 原生支持 UTF-8,直接搜中文;长中文词会自动放宽匹配, 多搜到一些,原词命中优先。
  8. 先结构后正文:大文件先 --outline 看结构,再 --lines N-M 按需读取, 禁止直接 read_file 整个文件。
  9. 结构搜索按语义:找「是不是有裸 except」这类问题用 --structural, 不要手写正则碰运气;可用语义清单见 references/structural-search.md。
  10. git 只读标题:--git-log 只给标题,够用就停;要看具体改动再手动 git show, 不让 seek.py 输出整段正文。

配置

排除规则与知识域:sub-skills/local-seek/config/domains.yaml 查看当前规则:python3 sub-skills/local-seek/scripts/seek.py --domains

参考

按场景的完整命令配方(进阶,非常规操作再读):

  • references/rg-recipes.md — rg 分场景配方(函数定义/跨文件引用/多词/正则)
  • references/fd-mdfind-recipes.md — fd 与 Spotlight 配方
  • references/strategies.md — 三层做法的详细说明,以及怎么少花 token
  • references/structural-search.md — 结构搜索手册(语义规则表/别名/扩展新规则)
  • references/git-integration.md — git 联动用法、场景与边界
  • references/remote-handoff.md — 本地搜不到时的扩大与联网交接清单

© taxueseek, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 16 other files (scripts, references) in sub-skills/local-seek of taxueseek/argo.

  • SKILL.md
  • config/domains.yaml
  • references/fd-mdfind-recipes.md
  • references/git-integration.md
  • references/remote-handoff.md
  • references/rg-recipes.md
  • references/strategies.md
  • references/structural-search.md
  • scripts/eval_seek.py
  • scripts/seek.py
  • tests/test_determinism_20261006.py
  • tests/test_noise_tier.py
  • tests/test_pcre2_probe.py
  • tests/test_rank_pinyin.py
  • tests/test_regression_20261003.py
  • tests/test_regression_20261006.py
  • tests/test_seek_degradation.py

Open the folder on GitHubat commit a6657b0

Compare with similar skills

Local File and Code Search next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Local File and Code Search compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Local File and Code Search this skilltaxueseek/argo188—~1.1kAutomated safety check: PassMIT
Git Project Statusespennilsen/pi122—~4.4kAutomated safety check: NotesMIT
Skyvern Version BumpSkyvern-AI/skyvern23k—~1kAutomated safety check: NotesAGPL-3.0
Saleor Commit Workflowsaleor/saleor23k—~575Automated safety check: PassBSD-3-Clause
pybind11 Release Preparationpybind/pybind1118k—~1.7kAutomated safety check: PassCustom licence
pybind11 Release Publicationpybind/pybind1118k—~2.5kAutomated safety check: PassCustom licence

Similar skills

  • Git Project Status

    espennilsen/pi

    Generate comprehensive status reports for git repositories. An agent skill from espennilsen/pi.

    122 GitHub stars~4.4k tokensUpdated 19 days ago
    DevelopmentAuto-check: notes
  • Skyvern Version Bump

    Skyvern-AI/skyvern

    Walks through a Skyvern open-source release bump: update the version, rebuild the Python and TypeScript SDKs with Fern, commit, and open a pull request.

    23k GitHub stars~1k tokensUpdated yesterday
    DevelopmentAuto-check: notes
  • Commits changes in the Saleor codebase and works through pre-commit hook failures from ruff, mypy, the GraphQL schema check and the migrations check.

    23k GitHub stars~575 tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Opens the pybind11 release-preparation pull request: picking the release base, bumping the version in common.h and integrating the changelog, following docs/release.rst.

    18k GitHub stars~1.7k tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Walks a maintainer through publishing a pybind11 release after the preparation PR merges, with preflight checks, confirmations before each push and a GitHub release.

    18k GitHub stars~2.5k tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Git History Bug Audit

    ben-manes/caffeine

    Audits a module by walking its git history commit by commit, tracking unresolved issues forward, and reporting the ones that survive to HEAD as findings.

    18k GitHub stars~3.3k tokensUpdated today
    DevelopmentAuto-check passed

More from taxueseek/argo

  • Ego Browser Search

    taxueseek/argo

    Searches and fetches pages through a real logged-in Chromium session when ordinary API or HTML retrieval cannot get past login walls, scripts or anti-bot checks.

    188 GitHub stars~2.1k tokensUpdated 5 days ago
    Auto-check passed
  • Unified web search, page fetching and evidence checking across hundreds of sources, with result verification, a research-dossier mode and vertical search engines.

    188 GitHub stars~1.2k tokensUpdated 5 days ago
    Auto-check passed
  • Runs web-page JavaScript without a browser, in a V8 sandbox with a browser-environment shim, for scripts that only probe the environment and compute a result.

    188 GitHub stars~400 tokensUpdated 5 days ago
    Auto-check passed
  • Local Search Fallback

    taxueseek/argo

    Zero-cost fallback for the argo search skill, wrapping 29 local engines for web, news, academic, code and reference queries when paid API quota should be saved.

    188 GitHub stars~949 tokensUpdated 5 days ago
    Auto-check passed

Works with

Questions about Local File and Code Search

What does Local File and Code Search do?

Searches local files and code through one script, seek.py, that picks between rg, fd and macOS Spotlight and works in three layers: locate, context, close reading. py, which chooses the underlying tool so the agent does not hand-build rg or fd arguments. Searching moves in three layers: find which files match with a count or filename list, view a few lines of context around hits, and only then read key passages by line number.

When should I use Local File and Code Search?

Local File and Code Search fits situations like: finding where a function or symbol is defined in a local project; locating a file when you only remember part of its name; searching notes or documents on disk for a phrase; checking who last changed a line with git blame.

How do I install Local File and Code Search in Claude Code?

Run `npx skills add taxueseek/argo --skill local-seek -a claude-code`. Or copy the skill folder (sub-skills/local-seek in taxueseek/argo) into .claude/skills/local-seek in your project. Claude Code loads it when a task matches its description.

How do I install Local File and Code Search in Codex?

Run `npx skills add taxueseek/argo --skill local-seek -a codex`. Or copy the skill folder (sub-skills/local-seek in taxueseek/argo) into .agents/skills/local-seek in your project. Codex loads it when a task matches its description.

Can I use Local File and Code Search in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add taxueseek/argo --skill local-seek -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/local-seek, .gemini/skills/local-seek, .github/skills/local-seek and .opencode/skills/local-seek in your project.

What does Local File and Code Search need to run?

Going by SKILL.md and its folder, Local File and Code Search needs Python for the scripts in its folder and the command-line tools its instructions call (python3). Our summary lists: Python 3, to run scripts/seek.py; ripgrep and fd installed locally.

Does Local File and Code Search access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Local File and Code Search safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Local File and Code Search use?

Local File and Code Search is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Local File and Code Search use?

About 1.1k tokens (SKILL.md is roughly 4.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 3.2k tokens, read only when the agent opens those files.

What are the alternatives to Local File and Code Search?

Skills that share tags, products or a category with Local File and Code Search: Git Project Status (espennilsen/pi, 122 stars), Skyvern Version Bump (Skyvern-AI/skyvern, 23k stars), Saleor Commit Workflow (saleor/saleor, 23k stars) and pybind11 Release Preparation (pybind/pybind11, 18k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Local File and Code Search?

taxueseek (a GitHub user) maintains it in taxueseek/argo, which has 188 GitHub stars. The repository holds 5 skills in this directory. The repository was last updated on October 6, 2026.

Source: taxueseek/argo on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.