adopt: files-to-prompt (Apache 2.0) for Robin onboarding + cf-orch context building #50

Open
opened 2026-06-15 12:16:58 -07:00 by pyr0ball · 0 comments
Owner

Source: https://github.com/simonw/files-to-prompt (v2 fork: TheAhmadOsman/files-to-prompt)
License: Apache 2.0
Stack: Python CLI

What it does

Concatenates directory trees into LLM prompts. Features:

  • .gitignore-aware (respects existing ignore rules)
  • Claude XML output format (--cxml) for structured multi-file context
  • Extension filtering, pattern ignore, default exclusion of node_modules, CI files
  • Binary file detection with warnings
  • v2 fork adds enhanced filtering vs Simon Willison's original

CF applications

Robin (Linux migration companion): Robin's "explain my existing setup" onboarding needs to understand a user's home directory, dotfiles, installed packages, and config files. files-to-prompt pointed at ~/.config/, ~/.local/, etc. gives Robin the full context in one pass.

cf-orch agent context building: When a worker needs full codebase context for a long-running task, files-to-prompt --cxml src/ produces structured input ready for Claude.

Avocet pipeline: Feeding email corpus samples as structured context for classifier training decisions.

Internal developer tooling: Replaces ad-hoc cat $(find . -name "*.py") pipelines with a proper, filterable, gitignore-aware tool.

Recommendation

Adopt the upstream simonw/files-to-prompt as a dependency — it's actively maintained and the v2 fork's Claude XML feature is already upstream. Add to cf-core dev tooling requirements and Robin's onboarding pipeline design.

**Source:** https://github.com/simonw/files-to-prompt (v2 fork: TheAhmadOsman/files-to-prompt) **License:** Apache 2.0 **Stack:** Python CLI ## What it does Concatenates directory trees into LLM prompts. Features: - `.gitignore`-aware (respects existing ignore rules) - Claude XML output format (`--cxml`) for structured multi-file context - Extension filtering, pattern ignore, default exclusion of `node_modules`, CI files - Binary file detection with warnings - v2 fork adds enhanced filtering vs Simon Willison's original ## CF applications **Robin (Linux migration companion):** Robin's "explain my existing setup" onboarding needs to understand a user's home directory, dotfiles, installed packages, and config files. `files-to-prompt` pointed at `~/.config/`, `~/.local/`, etc. gives Robin the full context in one pass. **cf-orch agent context building:** When a worker needs full codebase context for a long-running task, `files-to-prompt --cxml src/` produces structured input ready for Claude. **Avocet pipeline:** Feeding email corpus samples as structured context for classifier training decisions. **Internal developer tooling:** Replaces ad-hoc `cat $(find . -name "*.py")` pipelines with a proper, filterable, gitignore-aware tool. ## Recommendation Adopt the upstream `simonw/files-to-prompt` as a dependency — it's actively maintained and the v2 fork's Claude XML feature is already upstream. Add to cf-core dev tooling requirements and Robin's onboarding pipeline design.
Sign in to join this conversation.
No description provided.