jpskill.com
🛠️ 開発・MCP コミュニティ

fff-nvim

Rust製の高速ファイル検索ツールfffを活用し、AIエージェントやNeovimと連携して、あいまい検索や正規表現、gitignore対応フィルタリングにより、大規模コードベースでも高速なファイル検索を実現するSkill。

📜 元の英語説明(参考)

Use fff (Fast File Finder) — a blazing-fast file search tool built in Rust with Node.js bindings, optimized for AI agents and Neovim integration. Supports fuzzy matching, regex, gitignore-aware filtering, and sub-millisecond search across large codebases. Use when tasks involve fast file discovery, AI agent tooling, or Neovim file navigation.

🇯🇵 日本人クリエイター向け解説

一言でいうと

Rust製の高速ファイル検索ツールfffを活用し、AIエージェントやNeovimと連携して、あいまい検索や正規表現、gitignore対応フィルタリングにより、大規模コードベースでも高速なファイル検索を実現するSkill。

※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o fff-nvim.zip https://jpskill.com/download/14894.zip && unzip -o fff-nvim.zip && rm fff-nvim.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/14894.zip -OutFile "$d\fff-nvim.zip"; Expand-Archive "$d\fff-nvim.zip" -DestinationPath $d -Force; ri "$d\fff-nvim.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して fff-nvim.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → fff-nvim フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-18
取得日時
2026-05-18
同梱ファイル
1

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

fff (Fast File Finder)

概要

Rust で構築された、驚くほど高速なファイル検索ツールで、AI エージェントやエディタとの統合のために設計されています。ファジーマッチング、正規表現、スマートフィルタリングにより、数百万のファイルをミリ秒単位で検索します。CLI、Node.js API、Neovim プラグインとして利用可能です。

手順

インストール

Rust CLI:

cargo install fff-search

Node.js API:

npm install fff-search

Neovim プラグイン (lazy.nvim):

{
  "fff-nvim/fff.nvim",
  build = "cargo build --release",
  config = function()
    require("fff").setup({
      respect_gitignore = true,
      hidden_files = false,
      max_results = 100,
      fuzzy_threshold = 0.6,
    })
  end,
  keys = {
    { "<leader>ff", "<cmd>FffFind<cr>",   desc = "Find files (fff)" },
    { "<leader>fg", "<cmd>FffGrep<cr>",   desc = "Grep content (fff)" },
    { "<leader>fr", "<cmd>FffRecent<cr>", desc = "Recent files (fff)" },
  },
}

CLI の使用法

fff "component"                    # 基本的なファジー検索
fff "handler" --dir ./src          # 特定のディレクトリで検索
fff --regex "test_.*\.py$"         # 正規表現検索
fff --grep "TODO|FIXME" --dir .    # ファイルの内容を検索
fff "config" --hidden              # 隠しファイルを含める
fff "utils" --max-results 20       # 結果を制限する
fff "service" --json               # JSON 出力 (AI エージェント用)
fff "schema" --ext ts,tsx          # 拡張子でフィルタリング
fff "MyClass" --case-sensitive     # 大文字と小文字を区別する検索

Node.js API

const { FffSearch } = require("fff-search");

const searcher = new FffSearch({
  rootDir: process.cwd(),
  respectGitignore: true,
  hiddenFiles: false,
});

// ファジーファイル検索
const results = await searcher.find("component", { maxResults: 10, threshold: 0.6 });

// ファイルの内容を Grep
const grepResults = await searcher.grep("TODO", { extensions: ["ts", "js"], maxResults: 100 });

Neovim コマンド

:FffFind [query]    — ファジーファイル検索 (Telescope の find_files を置き換えます)
:FffGrep [pattern]  — ファイルの内容を検索 (Telescope の live_grep を置き換えます)
:FffRecent          — 最近開いた/変更されたファイル
:FffBuffer          — 開いているバッファを検索
:FffGitFiles        — git で追跡されているファイルのみを検索

例 1: AI エージェントツールとの統合

ユーザーリクエスト: "AI エージェントのファイル検索ツールとして fff を設定してください。"

実装:

const fileSearchTool = {
  name: "search_files",
  description: "プロジェクト内のファイル名またはコンテンツでファイルを検索します",
  parameters: {
    query:      { type: "string", description: "検索クエリ (ファジーまたは正規表現)" },
    mode:       { type: "string", enum: ["filename", "content"], default: "filename" },
    extensions: { type: "array", items: { type: "string" }, optional: true },
  },
  execute: async ({ query, mode, extensions }) => {
    const searcher = new FffSearch({ rootDir: process.cwd() });
    if (mode === "content") {
      return searcher.grep(query, { extensions, maxResults: 20 });
    }
    return searcher.find(query, { maxResults: 20 });
  },
};

例 2: LLM 消費のための JSON 出力

ユーザーリクエスト: "すべての handler ファイルを検索し、構造化された結果を返してください。"

$ fff "handler" --json
[
  {
    "path": "src/api/handler.ts",
    "score": 0.95,
    "line": null,
    "modified": "2024-03-15T10:30:00Z"
  },
  {
    "path": "src/ws/messageHandler.ts",
    "score": 0.82,
    "line": null,
    "modified": "2024-03-14T08:15:00Z"
  }
]

ガイドライン

  • LLM および AI エージェントが解析可能な構造化された結果を得るには、--json 出力を使用してください
  • 大規模なリポジトリで瞬時に結果を得るには、バックグラウンドインデックス作成を有効にしてください ([index] enabled = true を config で設定)
  • モノレポ内の特定のパッケージに検索範囲を絞るには、--dir を使用してください
  • fff は Neovim で Telescope のファイルファインダーを置き換え、10〜50 倍高速な結果を実現します
  • 複数の言語が混在するリポジトリで作業する場合は、--ext を使用してファイルタイプで検索を絞り込んでください
  • 永続的な設定 (gitignore、隠しファイル、最大結果数) については、~/.config/fff/config.toml を設定してください
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

fff (Fast File Finder)

Overview

Blazing-fast file search built in Rust, designed for AI agents and editor integration. Searches millions of files in milliseconds with fuzzy matching, regex, and smart filtering. Available as a CLI, Node.js API, and Neovim plugin.

Instructions

Installation

Rust CLI:

cargo install fff-search

Node.js API:

npm install fff-search

Neovim Plugin (lazy.nvim):

{
  "fff-nvim/fff.nvim",
  build = "cargo build --release",
  config = function()
    require("fff").setup({
      respect_gitignore = true,
      hidden_files = false,
      max_results = 100,
      fuzzy_threshold = 0.6,
    })
  end,
  keys = {
    { "<leader>ff", "<cmd>FffFind<cr>",   desc = "Find files (fff)" },
    { "<leader>fg", "<cmd>FffGrep<cr>",   desc = "Grep content (fff)" },
    { "<leader>fr", "<cmd>FffRecent<cr>", desc = "Recent files (fff)" },
  },
}

CLI Usage

fff "component"                    # Basic fuzzy search
fff "handler" --dir ./src          # Search in specific directory
fff --regex "test_.*\.py$"         # Regex search
fff --grep "TODO|FIXME" --dir .    # Search file contents
fff "config" --hidden              # Include hidden files
fff "utils" --max-results 20       # Limit results
fff "service" --json               # JSON output (for AI agents)
fff "schema" --ext ts,tsx          # Filter by extension
fff "MyClass" --case-sensitive     # Case-sensitive search

Node.js API

const { FffSearch } = require("fff-search");

const searcher = new FffSearch({
  rootDir: process.cwd(),
  respectGitignore: true,
  hiddenFiles: false,
});

// Fuzzy file search
const results = await searcher.find("component", { maxResults: 10, threshold: 0.6 });

// Grep file contents
const grepResults = await searcher.grep("TODO", { extensions: ["ts", "js"], maxResults: 100 });

Neovim Commands

:FffFind [query]    — Fuzzy file search (replaces Telescope find_files)
:FffGrep [pattern]  — Search file contents (replaces Telescope live_grep)
:FffRecent          — Recently opened/modified files
:FffBuffer          — Search open buffers
:FffGitFiles        — Search git-tracked files only

Examples

Example 1: AI Agent Tool Integration

User request: "Set up fff as a file search tool for an AI agent."

Implementation:

const fileSearchTool = {
  name: "search_files",
  description: "Search for files by name or content in the project",
  parameters: {
    query:      { type: "string", description: "Search query (fuzzy or regex)" },
    mode:       { type: "string", enum: ["filename", "content"], default: "filename" },
    extensions: { type: "array", items: { type: "string" }, optional: true },
  },
  execute: async ({ query, mode, extensions }) => {
    const searcher = new FffSearch({ rootDir: process.cwd() });
    if (mode === "content") {
      return searcher.grep(query, { extensions, maxResults: 20 });
    }
    return searcher.find(query, { maxResults: 20 });
  },
};

Example 2: JSON Output for LLM Consumption

User request: "Find all handler files and return structured results."

$ fff "handler" --json
[
  {
    "path": "src/api/handler.ts",
    "score": 0.95,
    "line": null,
    "modified": "2024-03-15T10:30:00Z"
  },
  {
    "path": "src/ws/messageHandler.ts",
    "score": 0.82,
    "line": null,
    "modified": "2024-03-14T08:15:00Z"
  }
]

Guidelines

  • Use --json output for structured results parseable by LLMs and AI agents
  • Enable background indexing ([index] enabled = true in config) for instant results in large repos
  • Use --dir to scope search to specific packages in monorepos
  • fff replaces Telescope's file finder in Neovim with 10-50x faster results
  • Use --ext to narrow searches by file type when working in polyglot repos
  • Configure ~/.config/fff/config.toml for persistent settings (gitignore, hidden files, max results)