fzf
БесплатноБез исполняемых скриптовНе проверенfzf is a command-line fuzzy finder that filters any list of lines, such as files, git branches, processes or command history, as you type and prints the…
от TerminalSkills★ 221 звезда на GitHubОб этом скилле
fzf — fuzzy finder for any list in the terminal
Overview
fzf reads lines from standard input, lets the user narrow them by typing a few characters of each word in any order, and prints the chosen line(s) on standard output. It has no idea what the lines mean, so the same binary picks files, git branches, Docker containers, log lines or history entries. The work an agent does with it is writing the pipeline around it: what produces the list, what --preview shows, what happens with the result, and the shell configuration that makes it permanent.
fzf is interactive, so an agent cannot drive the picker itself (there is no terminal to type into). Two things are agent-friendly: writing the setup for the user, and fzf --filter, which runs the same matching engine non-interactively and prints the ranked matches.
Instructions
Installation
Use the package manager first; check the version afterwards because some distributions ship an old fzf that lacks fzf --bash.
brew install fzf # macOS, Linux (Homebrew)
sudo apt install fzf # Debian 9+, Ubuntu 19.10+
sudo dnf install fzf # Fedora
sudo pacman -S fzf # Arch
winget install fzf # Windows
fzf --version
Without root access, download the release archive for the platform from https://github.com/junegunn/fzf/releases, verify it against the fzf_<version>_checksums.txt file published with the release, and unpack the single fzf binary into a directory on PATH:
sha256sum --check --ignore-missing fzf_0.74.5_checksums.txt
tar -xzf fzf-0.74.5-linux_amd64.tar.gz
install -m 0755 fzf ~/.local/bin/fzf
Shell integration
Add one line to the shell's startup file. It defines three key bindings and fuzzy completion.
# ~/.bashrc
eval "$(fzf --bash)"
# ~/.zshrc
source <(fzf --zsh)
# ~/.config/fish/config.fish
fzf --fish | source
What the bindings do:
Ctrl-Tpastes the selected files and directories onto the command line.Ctrl-Rsearches shell history and pastes the chosen command.Tabselects several;Ctrl-Ragain toggles sorting by relevance and chronological order.Alt-Cchanges into the selected directory.vim **<Tab>(alsocd **<Tab>,kill -9 **<Tab>) opens the picker in place of normal completion.
To turn a binding off, set its command variable to an empty string while sourcing: FZF_CTRL_R_COMMAND= FZF_ALT_C_COMMAND= eval "$(fzf --bash)".
Choose what gets listed
With no input on a pipe, fzf runs $FZF_DEFAULT_COMMAND, and Ctrl-T runs $FZF_CTRL_T_COMMAND. When neither is set, fzf walks the current directory itself and skips .git and node_modules; --walker and --walker-skip tune that.
# Respect .gitignore, include dotfiles, skip .git
export FZF_DEFAULT_COMMAND='rg --files --hidden --glob "!.git"'
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
# Without ripgrep: built-in walker, skipping heavy directories
export FZF_CTRL_T_OPTS="--walker-skip .git,node_modules,target,dist"
Defaults and previews
FZF_DEFAULT_OPTS applies to every invocation. Keep it short and put per-key-binding options in FZF_CTRL_T_OPTS, FZF_CTRL_R_OPTS and FZF_ALT_C_OPTS.
export FZF_DEFAULT_OPTS="--height=40% --layout=reverse --border --info=inline"
# Ctrl-T previews the file; Ctrl-/ cycles the preview between right, down and hidden
export FZF_CTRL_T_OPTS="
--preview 'head -n 100 {}'
--bind 'ctrl-/:change-preview-window(down|hidden|)'"
{} in a preview is the current line, quoted for the shell. {1}, {2} are fields (split by --delimiter), {q} is the query. --preview-window takes position, size and flags, for example right,60%,border-left or up,30%. bat -n --color=always {} is a nicer previewer when bat is installed.
Common pipelines
# Open a file in the editor, do nothing if the user cancels
file=$(fzf --preview 'head -n 100 {}') && "${EDITOR:-vi}" "$file"
# Check out a branch
git branch --all --format='%(refname:short)' | fzf --height=40% | xargs -r git checkout
# Multi-select (Tab) and act on every choice; NUL-safe for odd file names
git ls-files -z | fzf --read0 --print0 -m | xargs -0 -r git add --
# Kill a process: keep the header line, search only the command column
ps -ef | fzf --header-lines=1 --nth=8.. --accept-nth=2 | xargs -r kill
--accept-nth=2 prints only field 2 (the PID) of the chosen line; --with-nth changes what is displayed while the full line is still what is printed unless --accept-nth is given.
Reload and become: live search
--bind can run commands on events. reload(cmd) replaces the list, become(cmd) replaces fzf with a command, --disabled turns off fzf's own matching so an external tool does the search on every keystroke.
# Search file contents with ripgrep as you type; Enter opens the match in vim
rg_fzf() {
fzf --disabled --ansi --delimiter : \
--bind "start:reload:rg --line-number --no-heading --color=always --smart-case {q
Установить fzf в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл fzf?
fzf is a command-line fuzzy finder that filters any list of lines, such as files, git branches, processes or command history, as you type and prints the selection. Use it when the user asks to "pick a file with fuzzy search", "add Ctrl-R fuzzy history", "preview files while searching", "choose a git branch interactively", "set up fzf key bindings", or when a script needs non-interactive fuzzy matching with `fzf --filter`. Covers install, shell integration, FZF_DEFAULT_COMMAND and FZF_DEFAULT_OPTS, preview windows, key bindings and scripting flags.
Как установить скилл fzf?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл fzf запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
agent-skill-stack
Find, evaluate, and assemble the smallest compatible set of AI Agent Skills for an end-to-end natural-language goal. Use when a user wants Skills for a…
от GitHubbuild-evidence-map
Build an auditable evidence map for a contested technical choice, research synthesis, proposal review, or consequential decision. Use when Copilot must…
от GitHubpinecone-rag
Build production RAG pipelines and persistent agent memory using Pinecone as the vector database backend. ALWAYS USE THIS SKILL when the user mentions…
от GitHubqdrant-monitoring-debugging
Diagnoses Qdrant production issues using metrics and observability tools. Use when someone reports 'optimizer stuck', 'indexing too slow', 'memory too high'…
от GitHub