virgil

Parse, explore, and understand unfamiliar codebases using virgil-cli. Covers the full workflow: parsing source into Parquet, querying with built-in commands, navigating dependencies and callers, and running raw DuckDB SQL. Use when asked to analyze a codebase, understand architecture, find symbols, trace dependencies, onboard to a project, investigate bugs, or map the API surface of any TypeScript/JavaScript/C/C++/C#/Rust/Python/Go/Java/PHP codebase.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "virgil" with this command: npx skills add delanyo32/virgil-cli/delanyo32-virgil-cli-virgil

Virgil — Codebase Exploration Skill

Prerequisites

Check that virgil is available:

virgil --help

If not installed, build from source:

cargo install --git https://github.com/virgil-cli/virgil-cli

Core Workflow

Every codebase exploration follows three phases:

Phase 1 — Parse

virgil parse <PROJECT_DIR> --output <DATA_DIR>

This produces five Parquet files in <DATA_DIR>: files.parquet, symbols.parquet, imports.parquet, comments.parquet, errors.parquet.

Parse once, query many times. Re-parse only when source changes.

Phase 2 — Orient

virgil overview --data-dir <DATA_DIR> --format json

Overview gives you: language breakdown, top symbols by usage, directory structure, hub files (most imported), dependency summary, and barrel file detection.

Phase 3 — Drill Down

Use targeted commands to investigate specifics:

virgil search <QUERY> --data-dir <DATA_DIR> --format json
virgil outline <FILE> --data-dir <DATA_DIR> --format json
virgil deps <FILE> --data-dir <DATA_DIR> --format json
virgil callers <SYMBOL> --data-dir <DATA_DIR> --format json

Output Format

  • Use --format json when processing output programmatically (AI agent consumption)
  • Use --format table when displaying results to the user
  • Use --format csv for export to spreadsheets or pipelines

All query commands support --format table|json|csv. Default is table.

Quick Command Reference

CommandPurposeKey Args
parseParse source into Parquet files<DIR>, -o, -l
overviewHigh-level codebase summary--depth
searchFuzzy symbol search<QUERY>, --kind, --exported
outlineAll symbols in one file<FILE>
filesList parsed files--language, --directory, --sort
readRead source with line ranges<FILE>, --start-line, --end-line, --root
queryRaw DuckDB SQL<SQL>
depsWhat a file imports<FILE>
dependentsWhat imports a file<FILE>
callersWho imports a symbol<SYMBOL>, --limit
importsList imports with filters--module, --kind, --external, --internal
commentsList comments with filters--file, --kind, --documented, --symbol
errorsList parse errors--error-type, --language

Full flag-by-flag docs: see references/command-reference.md

Path Conventions

  • All file paths in Parquet are relative to the project root passed to parse.
  • --data-dir points to the directory containing the Parquet files (default: .).
  • --root (on read command) points to the project source root for resolving relative paths.
  • When parse and query commands run from the project root with default --output ., no extra flags are needed.

Parquet Table Schemas

Five tables are available for SQL queries via virgil query:

files

ColumnTypeDescription
pathUtf8Relative path from project root
nameUtf8File name
extensionUtf8Extension without dot
languageUtf8Language identifier
size_bytesUInt64File size in bytes
line_countUInt64Number of lines

symbols

ColumnTypeDescription
nameUtf8Symbol name
kindUtf8Symbol kind (see below)
file_pathUtf8Relative file path
start_lineUInt320-based start line
start_columnUInt320-based start column
end_lineUInt320-based end line
end_columnUInt320-based end column
is_exportedBooleanWhether the symbol is exported

Symbol kinds: function, class, method, variable, interface, type_alias, enum, arrow_function, struct, union, namespace, macro, property, typedef, trait, constant, module

imports

ColumnTypeDescription
source_fileUtf8File containing the import
module_specifierUtf8Import path (e.g., react, ./utils)
imported_nameUtf8Imported symbol name (* for namespace)
local_nameUtf8Local binding name
kindUtf8Import kind (see below)
is_type_onlyBooleanWhether the import is type-only
lineUInt32Line number
is_externalBooleanExternal library (true) vs user code (false)

Import kinds: static, dynamic, require, re_export, include, using, use, import, from

comments

ColumnTypeDescription
file_pathUtf8Relative file path
textUtf8Raw comment text including delimiters
kindUtf8Comment kind: line, block, doc
start_lineUInt320-based start line
start_columnUInt320-based start column
end_lineUInt320-based end line
end_columnUInt320-based end column
associated_symbolUtf8 (nullable)Name of documented symbol
associated_symbol_kindUtf8 (nullable)Kind of documented symbol

errors

ColumnTypeDescription
file_pathUtf8Path of file that failed
file_nameUtf8File name
extensionUtf8Extension without dot
languageUtf8Language identifier
error_typeUtf8Error type: parser_creation, file_read, parse_failure
error_messageUtf8Human-readable error description
size_bytesUInt64File size in bytes

Supported Languages

LanguageExtensionsExport Detection
TypeScript.tsES export keyword
TSX.tsxES export keyword
JavaScript.jsES export keyword
JSX.jsxES export keyword
C.c, .hNot static = exported
C++.cpp, .cc, .cxx, .hpp, .hxx, .hhNot static = exported
C#.cspublic/internal modifier
Rust.rspub visibility modifier
Python.py, .pyiNo leading _ = exported
Go.goUppercase first letter
Java.javapublic modifier
PHP.phppublic visibility (default)

Strategic Playbooks

Six pre-built exploration strategies for common tasks:

  1. Understand codebase architecture — overview, hub files, outline, SQL deep-dives
  2. Find where something is defined/used — search, read, callers, dependents
  3. Onboard to new codebase — parse, overview, files by dependents, outline, read, imports
  4. Investigate a bug — search, read, deps, callers, read callers, comments
  5. Understand dependencies — deps, dependents, imports filters, overview, SQL
  6. Map the API surface — overview, search exported, filter by kind, SQL

Each playbook is a numbered step-by-step command sequence. Full playbooks: see references/strategies.md

Raw SQL

For questions that built-in commands can't answer, use raw DuckDB SQL:

virgil query "SELECT kind, COUNT(*) as cnt FROM symbols GROUP BY kind ORDER BY cnt DESC" --data-dir <DATA_DIR> --format json

Available tables: files, symbols, imports, comments, errors.

Reusable query recipes by category (files, symbols, dependencies, comments, cross-table): see references/sql-recipes.md

Reference

  • Full command flags: references/command-reference.md
  • Strategic playbooks: references/strategies.md
  • SQL query recipes: references/sql-recipes.md

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

Cloud Sdk

The Go Cloud Development Kit (Go CDK): A library and tools for open cloud development in Go. go cloud, go, aws, azure, cloud, gcp, go. Use when you need go c...

Registry SourceRecently Updated
Coding

Xint Rs

Fast X Intelligence CLI (Rust) — search, analyze, and engage on X/Twitter from the terminal. Use when: (1) user says "x research", "search x for", "search tw...

Registry SourceRecently Updated
43900xNyk
Coding

Md Web

Publish markdown files as shareable web pages and return a clickable link.

Registry SourceRecently Updated
Coding

Homeassistant Toolkit

Deep integration with Home Assistant via REST API. Control devices, manage automations, query entity states, and manage scenes/scripts from the command line....

Registry SourceRecently Updated
1610Profile unavailable