AI Agent Skill
AI agents like OpenClaw, Claude, Cursor, and others can call the GitExtract API to instantly understand any GitHub codebase. Copy the skill definition below to give your agent access to GitExtract.
What agents can do
Understand a codebase
Extract a repo, review the symbol index for structure, then read specific files from the content.
Compare repositories
Extract two repos and compare their architecture and symbol indexes side by side.
Focus on specific code
Use include/exclude patterns and subpath to extract only the files that matter.
SKILL.md
For AI agents like OpenClaw that support skills,
create a SKILL.md file with the content below.
---
name: gitextract
description: Extract full source code, file tree, and symbol index from any
GitHub repository. Free, no API key needed.
---
# GitExtract
Convert any GitHub repo into AI-ready text at https://gitextract.com
## API
GET https://gitextract.com/api/v1/ingest?url={owner/repo}
Optional params: branch, subpath, include_patterns, exclude_patterns, max_file_size_kb, include_json
### Basic example
GET https://gitextract.com/api/v1/ingest?url=fastapi/fastapi
### Example with optional parameters
GET https://gitextract.com/api/v1/ingest?url=fastapi/fastapi&include_patterns=*.py&subpath=fastapi
### Example response
```json
{
"full_name": "fastapi/fastapi",
"branch": "master",
"commit": "a1b2c3d...",
"file_count": 15,
"total_size": 245760,
"token_count": 52000,
"symbol_count": 128,
"cached": false,
"content_json": null,
"summary": "Repository: fastapi/fastapi\nBranch: master\n...",
"tree": "fastapi/\n __init__.py\n applications.py\n ...",
"content": "================================================\nFile: fastapi/__init__.py\n================================================\n...",
"symbol_index": "SYMBOL INDEX (128 symbols across 15 files)\n\nFILE: fastapi/applications.py\n class FastAPI (line 30)\n method setup (line 85)\n ..."
}
```
Set include_json=true to get content_json as an array of {path, content} objects
for structured file access.
## Symbol Index
The symbol_index field maps functions, classes, methods, constants, and types
via tree-sitter AST parsing. 15 languages: Python, JS, TS, TSX, Go, Java,
Rust, C, C++, C#, Ruby, PHP, Dart, Elixir, SQL.
Symbol Index
Every extraction includes a symbol index — a structural map of the codebase built using tree-sitter AST parsing. It's returned as a separate field alongside the file content, so consumers can choose whether to use it.
Extracted symbol types
Supported languages (15)
Python, JavaScript, TypeScript, TSX, Go, Java, Rust, C, C++, C#, Ruby, PHP, Dart, Elixir, SQL
Example output
SYMBOL INDEX (42 symbols across 8 files)
FILE: src/main.py
class UserService (line 15) | class UserService:
method login (line 23) | def login(self, username, password):
method logout (line 45) | def logout(self):
function main (line 60) | def main():
FILE: src/utils.py
function parse_config (line 1) | def parse_config(path: str) -> dict:
constant MAX_RETRIES (line 30) | MAX_RETRIES = 3
Where it's available
- • Web UI — dedicated "Symbol Index" tab on the result page
- • JSON API —
symbol_indexandsymbol_countfields in the response - • Web UI (Structured JSON tab) — dedicated tab on the result page with copy and download buttons
- • JSON API — add
include_json=trueto get acontent_jsonarray with each file as a separate{path, content}object
Built by Nikandr Surkov