contents

Reads, writes, and deletes repository files and inspects commits and diffs.

4|4|Updated Dec 30, 2024
One-click install
npx skills add https://github.com/purduehackers/wack-hacker --skill contents
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: contents
Source: https://github.com/purduehackers/wack-hacker/tree/main/src/lib/ai/agents/github/prompts/skills/contents
Command: npx skills add https://github.com/purduehackers/wack-hacker --skill contents

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill allows you to interact with file contents within a repository, enabling you to read, write, delete files, browse directory structures, and view commit history.

Core Features & Use Cases

  • Read File Content: Retrieve the content of any file, with handling for large files.
  • Browse Directories: Explore the structure of a repository recursively.
  • Edit and Create Files: Add new files or update existing ones with specified content and commit messages.
  • View Commits: List commits, get details of a specific commit, or compare changes between branches.
  • Use Case: You can ask the bot to read the README.md file of a repository, then use the information to update a configuration file on a specific branch, and finally view the commit history for that branch.

Quick Start

Use the contents skill to read the file named README.md from the main branch.

Frequently Asked Questions about contents

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

FAQPage Schema
How do I read and write file contents in a git repository?

To manage file contents in a git repository, you can read, write, or delete files by making specific tool calls for file retrieval and creation. File updates require the file SHA and a commit message to apply changes to a specified branch.

Can I browse directory structures and view commit history without cloning?

Yes, you can browse directory structures recursively and view commit history without cloning. The tool supports listing directory trees and inspecting commit details or comparing branch diffs through targeted repository operations.

How do I delete a file from a version-controlled repository branch?

Deleting a file from a version-controlled repository requires a specific tool call that includes the file SHA. This ensures the correct version of the file is removed from the branch while maintaining accurate commit history.

What is the best way to compare changes between git branches?

The best way to compare changes between git branches is to use commit inspection operations that generate diffs. This allows you to view specific commit details and compare the differences between branch states directly.

Are there limitations when retrieving large file contents from a repository?

Retrieving large file contents from a repository is supported with specific handling for large files. However, all file operations depend on making specific tool calls for retrieval, so large payloads may require careful management during processing.