Agent skill
Git Version Control
Provides Git version control operations for managing code repositories. Allows agents to check repository status, view commit history, and perform basic Git operations.
Install this agent skill to your Project
npx add-skill https://github.com/josephkirk/ArtReactor-Core/tree/main/docs/examples/example-git-skill
SKILL.md
Context Keywords
- git
- version control
- repository
- commit
- source control
- vcs
Tools
example-git-skill_git_status- Get the current Git status (HTTP endpoint)example-git-skill_git_log- View commit history (HTTP endpoint)check_git_status- Check Git status (direct tool call)
Instructions
Use this skill when you need to:
- Check the current state of a Git repository
- View recent commit history
- Understand what files have been modified, added, or deleted
- Get information about the current branch
Prerequisites:
- The working directory must be within a Git repository
- Git must be installed on the system
Best Practices:
- Always check the status before making changes
- Use descriptive commit messages
- Review changes before committing
Examples
Example 1: Check Repository Status
# Using the tool decorator
status = check_git_status()
print(f"Current status: {status}")
Example 2: View Recent Commits
# Using the HTTP endpoint
response = await git_log(limit=10)
if response["status"] == "success":
print(f"Recent commits:\n{response['output']}")
Example 3: Combined Workflow
When asked "What changes are in the repository?":
- First, call
check_git_status()to see modified files - Then, call
git_log(limit=5)to see recent commits - Provide a summary of both results to the user
Example 4: Error Handling
Always check the response status and handle errors gracefully:
result = await git_status()
if result["status"] == "error":
print(f"Git operation failed: {result['message']}")
else:
print(f"Status: {result['output']}")
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
default
router
obsidian-vault
Search, create, and manage notes in the Obsidian vault with wikilinks and index notes. Use when user wants to find, create, or organize notes in Obsidian.
setup-pre-commit
Set up Husky pre-commit hooks with lint-staged (Prettier), type checking, and tests in the current repo. Use when user wants to add pre-commit hooks, set up Husky, configure lint-staged, or add commit-time formatting/typechecking/testing.
handoff
Compact the current conversation into a handoff document for another agent to pick up.
scaffold-exercises
Create exercise directory structures with sections, problems, solutions, and explainers that pass linting. Use when user wants to scaffold exercises, create exercise stubs, or set up a new course section.
Didn't find tool you were looking for?