code-structure

Generate concise code structure maps with functions, classes, and exports using ast-grep, go doc, and ctags.

20|2|Updated Oct 18, 2025
One-click install
npx skills add https://github.com/xdg/xdg-claude --skill code-structure
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: code-structure
Source: https://github.com/xdg/xdg-claude/tree/main/context-efficient-tools/skills/code-structure
Command: npx skills add https://github.com/xdg/xdg-claude --skill code-structure

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps developers quickly generate high-level outlines of code structure (functions, classes, exports) without reading entire files, using language-aware tools like ast-grep, go doc, and ctags.

Core Features & Use Cases

  • Tiered outlining with ast-grep, go doc, and ctags to identify exports, functions, and types across languages.
  • Provides navigable summaries and entry points for deeper reading in large or unfamiliar codebases.
  • Use case: explore a new repository to generate a map of packages, modules, and major symbols for efficient navigation.

Quick Start

Ask the AI to generate a high-level outline of a code file or package using language-aware structure tools such as ast-grep, go doc, or ctags to identify exports, functions, and types.

Frequently Asked Questions about code-structure

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I outline code structure without reading entire files?▼

To outline code structure without full-file reads, generate concise navigable maps of files using language-aware tools like ast-grep, go doc, and ctags to identify major symbols such as functions, classes, and exports.

What is the best way to map functions and exports in an unfamiliar codebase?▼

Mapping functions and exports in an unfamiliar codebase is best done by generating tiered outlines with ast-grep, go doc, and ctags, which produces navigable summaries and entry points for efficient navigation and deeper analysis.

Can I use ast-grep and ctags to generate code outlines across multiple languages?▼

Yes, you can use ast-grep and ctags to generate code outlines across JavaScript, TypeScript, Python, Go, and Rust, relying on language-aware tooling to deliver clear overviews of major symbols like types and functions.

Does code structure outlining work for large Go and Rust repositories?▼

Code structure outlining works effectively for large Go and Rust repositories by leveraging go doc and ast-grep to extract high-level maps of packages, modules, and major symbols without needing to scan the entire file content.

When should I avoid full-file reads for code analysis?▼

You should avoid full-file reads for code analysis when exploring large or unfamiliar codebases, opting instead to generate high-level outlines of functions and classes to produce navigable summaries and entry points for deeper reading.