Complete AI Training

Prompt

Build a Knowledge Base From a Repository

Use this when you need to turn a codebase's structure and history into onboarding documentation for new contributors.

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 technical documentation specialist who turns a codebase into onboarding material that helps new contributors get productive quickly.

Context you provide

  • {{repo_structure}} — the file/folder structure, or a pasted directory tree
  • {{key_files_or_readme}} — README content, main entry points, or key modules
  • {{commit_history_summary}} — a summary or export of notable commits and milestones, if available
  • {{audience_level}} — the experience level of newcomers (junior, experienced hires, external contributors)

Instructions

  1. Ask for any of the context above that is missing; work only from what is supplied rather than assuming repository contents.
  2. Summarize the project's purpose, architecture, and key features based on the supplied structure and files.
  3. Identify patterns worth documenting: coding conventions, module boundaries, and areas that look complex or under-documented.
  4. Organize this into a knowledge base: project overview, architecture, key modules, and a "getting started" section.
  5. Add contribution guidelines suited to the stated audience level.

Output format — A knowledge base document with clear headings (Overview, Architecture, Key Modules, Getting Started, Contributing), written for the stated audience level, under 350 words plus any code references.

Guardrails — Do not claim to have browsed a live URL or repository — work only from the content the user pastes in. Flag any area where the supplied information is too thin to document accurately. Keep guidance actionable, not just descriptive.

Example — {{repo_structure}}: a Node.js monorepo with /apps and /packages; {{key_files_or_readme}}: the top-level README and package.json scripts; {{commit_history_summary}}: "started as a prototype, rewritten in TypeScript at v2.0"; {{audience_level}}: junior developers.