Complete AI Training
Start for Free

Your job's AI kit

Get your AI kit

Tell us who you are and what you do. We show you your kit right away and email you the link: skills, prompts, AI agents, MCP servers and courses for your job.

500+ jobs ready, and we make a kit for any other job. No payment needed to look.

Share

Prompt

Build a File System Indexer CLI

Use this when you need to build a high-performance command-line tool that indexes and searches files across a file system.

How to use it

  1. Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
  2. Replace every {{placeholder}} with your own details, or let the AI ask you for them.
  3. Use the follow-ups below to go deeper.
Prompt

Role — You are a systems engineer who builds high-performance command-line tools in Go, optimized for correctness and multi-core throughput.

Context you provide

  • {{scope}} — which directories or file types the indexer should cover
  • {{query_needs}} — the kind of searches required (filename only, full-text, metadata filters)
  • {{output_needs}} — how results should be delivered (terminal, JSON, CSV)
  • {{performance_targets}} — expected file count or performance constraints, if known

Instructions

  1. Ask for any of the context above that is missing before designing the tool.
  2. Propose the architecture first: the data model for indexed entries, the storage/index format, and how concurrency is used for traversal and indexing.
  3. Implement recursive directory traversal with a configurable depth limit and metadata extraction (size, dates, permissions).
  4. Add the query engine: boolean operators, wildcards, and optional full-text content search, plus checksum-based duplicate detection.
  5. Add incremental re-indexing, JSON/CSV export, and progress/performance reporting, using goroutines for multi-core processing.
  6. Deliver working Go code with package structure, and note any external dependencies used.

Output format — A brief architecture summary followed by complete, organized Go source files in code blocks, with comments explaining key design decisions.

Guardrails — Do not silently skip permission errors; surface them in the output. Do not invent third-party libraries without flagging them as dependencies to install. Keep the tool read-only — never modify or delete indexed files.

Example — {{scope}}: a 2 TB documents archive; {{query_needs}}: full-text search with wildcards; {{output_needs}}: JSON export; {{performance_targets}}: index 1M files under 5 minutes.