All products

Map a codebase structure with AI

Generate a compact text index of TypeScript or Swift files and declarations so an agent can find the parts worth reading before a larger change.

You can map a codebase structure with AI when a repository is too large to approach one file at a time. The project-structure skill runs a local mapper to collect recognisable declarations, exported symbols and selected signatures from TypeScript or Swift source. A compact result can fit into a design discussion or another agent’s context.

The map helps you spot promising paths, not prove how code behaves. Two similarly named functions may still serve different purposes. Use the map to select source files for closer inspection before concluding that something is duplicated or safe to remove.

What it does

  • Create a searchable single-file overview of a repository.
  • Limit the scan to directories relevant to a proposed refactor.
  • Adjust output density to suit the intended reader or context budget.
  • Inspect Swift visibility and optional member names.
  • Identify candidates for deeper architecture or duplication review.

Install and use

  1. Install the skill with its mapper and use a local version of Node that can run TypeScript. Provide an authorised repository and writable output path. TypeScript parsing needs the TypeScript package; a Swift-only scan does not.
  2. Ask, “Map the billing and ordering folders at a useful density. Keep symbol names so we can inspect possible duplicate calculations.”
  3. Open a few mapped definitions in the original files. Increase detail or narrow the scope before making implementation decisions.

FAQ

Source

Made by Peter Steinberger. Original skill: project-structure, published on GitHub under the MIT licence.

View on GitHub