スキル一覧に戻る
ak-eyther

smart-grep

by ak-eyther

A project to copy paste the entire settings

0🍴 0📅 2026年1月6日
GitHubで見るManusで実行

SKILL.md


name: smart-grep description: Token-efficient codebase search using ripgrep with JSON output. Reduces token usage by 90-95% vs standard grep. Use for any codebase search to save tokens. allowed-tools:

  • Bash
  • Read

Smart Grep - Token-Efficient Search

Quick Usage

rg --json "PATTERN" -t FILETYPE | python3 << 'EOF'
import json, sys
max_tokens = 10000
tokens = 0
for line in sys.stdin:
    try:
        data = json.loads(line)
    except:
        continue
    if data.get("type") != "match":
        continue
    path = data["data"]["path"]["text"]
    lnum = data["data"]["line_number"]
    text = data["data"]["lines"]["text"].rstrip()
    if len(text) > 300:
        text = text[:150] + " ... " + text[-150:]
    est_tokens = len((path + text).split()) * 1.3 + 10
    if tokens + est_tokens > max_tokens:
        break
    print(f"{path}:{lnum} {text}")
    tokens += est_tokens
EOF

Examples

Python files:

rg --json "def authenticate" -t py | python3 << 'EOF'
[script above]
EOF

TypeScript/React:

rg --json "useState" -t ts -t tsx | python3 << 'EOF'
[script above]
EOF

Token Budget

  • Quick lookup: 5,000 tokens
  • Normal search: 10,000 tokens (default)
  • Deep search: 20,000 tokens

スコア

総合スコア

60/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です