Git
knowledge skill
Retrieves metadata and file contents from a Git repository. Produces a structured snapshot of repository state including commit hash, branch, and file tree with file contents.
Worked examples
- {"input": {"repo_url": "https://github.com/torvalds/linux.git", "commit_ref": "v6.8", "file_paths": ["README"]}, "output": {"repo_name": "linux", "commit_hash": "64b7d108a6b2f7b7b3a1e1a1a1a1a1a1a1a1a1a1", "branch": "v6.8", "file_tree": [{"path": "README", "content": "# Linux kernel"}], "last_commit_message": "Linux 6.8"}}
- {"input": {"repo_url": "https://github.com/pytorch/pytorch.git", "commit_ref": "main", "file_paths": []}, "output": {"repo_name": "pytorch", "commit_hash": "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2", "branch": "main", "file_tree": [{"path": ".gitignore", "content": "# Ignore..."}, {"path": "CMakeLists.txt", "content": "cmake_minimum_required..."}], "last_commit_message": "Update CI configuration"}}
Input
- repo_url: string / HTTPS URL of the Git repository
- commit_ref: string / Git commit hash or branch/tag name
- file_paths: array of strings / Specific files to retrieve; empty array means all tracked files
Output
- repo_name: string / Name of the repository
- commit_hash: string / Full commit hash retrieved
- branch: string / Branch or tag name used
- file_tree: array of objects / Each with path and content (truncated if >1KB)
- last_commit_message: string / Commit message of the referenced commit
Details
- Skill type: knowledge skill
- Safety level: safe_public_research
- Version: 1.0.0