You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy and paste the following (prompt.md contents) into a Claude Code session at the root of your UE5 project
Why This Matters
UE5 projects have massive generated directories:
Content/ - thousands of .uasset and .umap binary files that Claude can't read anyway
Intermediate/ - generated C++ files, build artifacts, object files
Binaries/ - compiled executables and DLLs
DerivedDataCache/ - shader cache, cooked assets
Saved/ - autosaves, logs, crash reports
Without these exclusions, every @ autocomplete keystroke and every code search crawls through all of these, causing multi-second delays on large projects.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I need you to fix the @ file autocomplete in Claude Code for this UE5 project. It's slow because it traverses large engine-generated directories like Content/, Intermediate/, Binaries/, DerivedDataCache/, and Saved/.
Here's what needs to happen and why:
Background (so you don't waste time on dead ends)
.claudeignore does NOT affect @ autocomplete. It only controls what Claude can read.
.gitignore works for autocomplete, but ONLY if the project is a git repo. Many UE5 projects use Perforce, Plastic SCM, Diversion, or no VCS at all, so this often doesn't help.
The correct solution is the fileSuggestion setting with fd (fast file finder), fzf (fuzzy scorer), and jq (JSON parser).
What to install
Install fd, fzf, and jq using winget (Windows), brew (macOS), or apt (Linux):
.ignore in the project root (same content as .fdignore - this controls what rg/ripgrep skips, which is what powers Claude Code's internal Grep tool for searching file contents):
Same content as .fdignore above.
~/.claude/file-suggestion.sh (the custom autocomplete script):
#!/bin/bash# Claude Code fileSuggestion script for UE5 projects# Uses fd (fast file finder) + fzf (fuzzy scorer) for smart @ autocomplete.# Respects .fdignore per-project for excluding directories.## Dependencies: fd, fzf, jq# Windows: winget install sharkdp.fd junegunn.fzf jqlang.jq# macOS: brew install fd fzf jq# Linux: sudo apt install fd-find fzf jq## Claude Code's bash (git bash / MSYS2) doesn't always inherit the full# Windows PATH. WinGet shims live in %LOCALAPPDATA%\Microsoft\WinGet\Links# which pwsh sees but git bash often doesn't. We append common tool dirs# so fd, fzf, and jq are discoverable on any machine.export PATH="$PATH:$(cygpath "$LOCALAPPDATA")/Microsoft/WinGet/Links:/usr/local/bin:/opt/homebrew/bin"
query=$(cat | jq -r '.query')if [ -z"$query" ];then# Empty query: show recently modified files (last 7 days) sorted newest-first.# cd into the project so fd outputs relative paths, then bulk-sort via ls -t.cd"$CLAUDE_PROJECT_DIR"2>/dev/null &&
fd --type f --hidden --follow --color never \
--changed-within 7d 2>/dev/null \
| xargs ls -t 2>/dev/null \
| head -30
else# Pipe all project files through fzf for proper fuzzy matching with scoring.# fzf scores by match compactness, consecutiveness, and position (prefers# filename matches over deep path matches), similar to Sublime's Ctrl+P.
fd --type f --hidden --follow --color never \
--base-directory "$CLAUDE_PROJECT_DIR"2>/dev/null \
| fzf --filter="$query"2>/dev/null \
| head -30
fi
Add fileSuggestion to ~/.claude/settings.json (create the file if it doesn't exist):
If the file already exists with other settings, just merge the fileSuggestion key in.
After creating everything
Restart Claude Code (the fileSuggestion setting requires a restart to pick up).
Test @ autocomplete with a known filename from your Source/ directory.
Test fuzzy search: @fdatcomp.h should match files like FDLookAtComponent.h.
Test directory search: @Docs should show files inside your Docs/ directory.
Run a Grep search (e.g. search for UE_LOG) and verify no results come from Content/ or Intermediate/.
Important notes
--base-directory is critical in the fd command. Without it, autocomplete shows full absolute paths instead of project-relative paths.
The script is bash, but this works on Windows too because Claude Code uses git bash internally regardless of your default terminal.
On Windows, Claude Code's git bash does NOT inherit the full Windows PATH. The WinGet shims directory (%LOCALAPPDATA%\Microsoft\WinGet\Links) where fd/fzf/jq live is often missing. The script handles this by appending it via $LOCALAPPDATA (no hardcoded usernames). The macOS/Linux fallback paths (/usr/local/bin, /opt/homebrew/bin) are included for cross-platform portability.
The ~/.claude/file-suggestion.sh script is project-agnostic. It uses $CLAUDE_PROJECT_DIR (set automatically by Claude Code) and reads whatever .fdignore exists in that project. So you only set up the script and settings once globally, then drop .fdignore and .ignore files into each project.
.fdignore controls fd (file finding / autocomplete). .ignore controls rg (content searching / Grep tool). Both are needed for full coverage. Same syntax, same content, different consumers.