line-locator

line-locator is a skill for Claude Code, Codex from unkluco/line-locator. It costs 85 tokens per session (5,430 once invoked), scanned A, original, MIT.

A pair of scripts that finds matching files and exact source-code lines before an agent reads them.

In plain words
What is it for?
Use it to locate a function, class, symbol, or text pattern across a directory or inside one file, then read the surrounding lines.
Why use it?
It reduces blind searching through a project and helps the agent inspect only the relevant parts of the code.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to locate a function, class, symbol, or text pattern across a directory or inside one file, then read the surrounding lines.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/unkluco/line-locator/line-locator
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add unkluco/line-locator --skill line-locator
Clone the repo
git clone --depth 1 https://github.com/unkluco/line-locator

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for line-locator

README.md
[![agentmods](https://agentmods.dev/badge/skills/unkluco/line-locator/line-locator/github.svg)](https://agentmods.dev/skills/unkluco/line-locator/line-locator)
Your own site
<a href="https://agentmods.dev/skills/unkluco/line-locator/line-locator"><img src="https://agentmods.dev/badge/skills/unkluco/line-locator/line-locator/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for line-locator

Your own site · 80×15
<a href="https://agentmods.dev/skills/unkluco/line-locator/line-locator"><img src="https://agentmods.dev/badge/skills/unkluco/line-locator/line-locator.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 85 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,430 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00085 $0.05430
Opus 5 $0.00043 $0.02715
Sonnet 5 $0.00017 $0.01086
Haiku 4.5 $0.00009 $0.00543

Measured 9d ago against content hash b76dd3b0aab2, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

line-locator scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

out = subprocess.check_output([...])
SKILL.md · 505 lines

How it starts

The opening of the file, as written. The whole thing — 505 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Line-Locator

Hai script phối hợp để định vị chính xác trước khi đọc:

Script Phạm vi Câu hỏi trả lời
findtree.py Cả cây thư mục File nào chứa pattern này?
findtool.py Một file duy nhất Dòng nào trong file này?

Workflow:

findtree.py (shortlist files) → findtool.py (locate lines) → view_range (read)

Script nằm tại: skills/line-locator/scripts/


Output contract

Tất cả pattern dùng Python regex.

findtool — success (stdout):

{"matches": {"processOrder": [247, 312]}}
{"line": 248}
{"matched": true}

findtree — success (stdout):

{"matched_files": ["src/order.js", "tests/order.test.js"]}

Failure — cả hai tool (stderr, exit 1):

{"ok": false, "error": "No line matching pattern 'foo' was found after line 0."}

Parse nhanh:

import json, subprocess
out = subprocess.check_output([...])
data = json.loads(out)

# findtool
lines   = data["matches"]["pat"]   # -mr  → list[int]
line    = data["line"]             # -n / -b / -c / -o → int
matched = data["matched"]          # -e   → bool

# findtree
files   = data["matched_files"]    # list[str] relative paths

findtree — tìm file

python findtree.py --root ROOT --pattern PAT [options]
Option Mặc định Mô tả
--root (required) Thư mục gốc
--pattern (required) Regex pattern
--include GLOB... (tất cả) Chỉ tìm file khớp glob
--exclude GLOB... (không) Bỏ qua file/thư mục khớp glob
--ignore-case off Case-insensitive
--max-results N (không giới hạn) Dừng sau N file
--show matched matched / errors / both / summary / all
--max-file-size (không) Bỏ qua file lớn hơn (VD: 64K, 10M)
--no-default-dir-excludes off Tắt auto-skip .git, node_modules, v.v.
--text off Output text thay vì JSON

Auto-excluded dirs: .git, .hg, node_modules, venv, .venv, __pycache__, dist, build, target, .mypy_cache, .pytest_cache, .tox, coverage

Read the full file on GitHub · 505 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 505 lines · 85 tokens per session scan A b76dd3b0aab2

Subscribe to this mod's changes

line-locator is a skill published in the GitHub repository unkluco/line-locator (7 stars, last pushed 5mo ago), licensed MIT. It adds 85 tokens to every session and 5,430 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

wireshark-analysis

This skill should be used when the user asks to "analyze network traffic with Wireshark", "capture packets for troubleshooting", "filter PCAP files", "follow TCP/UDP streams", "detect network anomalies", "investigate suspicious traffic", or "perform protocol analysis". It provides comprehensive techniques for network…

zebbern/claude-code-guide · 79 tokens

argus

Argus — the all-seeing scanner suite. Six automated scanners for high-value web + LLM bug classes — CORS misconfiguration (origin reflection / null / credentialed read), CRLF & host-header injection, NoSQL injection (operator auth-bypass / $where blind), JWT attacks (alg:none / RS256→HS256 confusion / secret crack)…

Awarexone/Agentic-Bug-Hunter · 166 tokens

log-error-digest

Analyze log files to troubleshoot errors, identify peak error periods, and produce error clustering, frequency statistics, and time distribution reports. Supports JSON, syslog, and Nginx formats with automatic detection. Use when a user uploads a .log file and asks to analyze errors, find patterns, debug issues, or…

zebbern/claude-code-guide · 71 tokens

octocode-research

Use when code must be checked, not assumed: trace connections (callers, imports, cross-repo wiring, what breaks if I change it), locate behavior, map a system, diagnose a failure, RCA. Also for external repositories, npm packages, upstream/prior art, and general research. Plan a coding flow before writing, validate it…

bgauryy/octocode · 148 tokens

debug-systematic

Systematic 4-phase debugging methodology for complex, intermittent, or mysterious issues. Use when investigating bugs, race conditions, or unexplained failures.

travisjneuman/.claude · 33 tokens

offensive-bug-identification

Systematic bug identification methodology: source code review patterns, black-box testing strategies, taint analysis, dangerous function hunting, data flow tracing, and automated scanning setup. Use for code audits, bug bounty triage, or building vulnerability identification pipelines.

SnailSploit/Claude-Red · 0 tokens