Discover MCPs & agents
Loading MCPs and agents…
Loading MCPs and agents…
Turn your Git repository into a self-improving autonomous agent. Open issues to assign tasks, review PRs, merge to teach. Gemini is the brain, Git is the backend.
Fetched from the repository for this visit.
Gemini is the brain. Git is the backend.
📋 A template for turning any Git repo into a self-improving autonomous agent. Click "Use this template" to get started.
A simple but effective approach - using Git to interact with your agent:
mainThree ways to work:
@gemini in GitHub issues@gemini for refinementsKey features:
Perfect for: Anything you can think of! Extend with MCP servers and extensions.
Example use cases:
🔍 Code Reviews • 📰 Daily Newsletter • 📝 Auto-sync Documentation • 📊 Weekly Reports • 🌤️ Weather Updates
Sample included: This template includes a working example skill that generates daily tips about Gemini CLI. Use it as a reference for building your own skills!
💬 Interactive mode: You can also use Gemini CLI in this same repo for real-time chat (npm install -g @google/gemini-cli && gemini). Autonomous for scheduled tasks, interactive for quick questions.
Click "Use this template" at the top of this page to create your own repository.
💡 Tip: You can create a private repository if you want to keep your agent's work confidential.
Settings → Secrets and variables → Actions → New repository secret
Name: GEMINI_API_KEY
Value: <your-api-key>
gh secret set GEMINI_API_KEY
# Paste your key when prompted
Required for agent to create PRs:
Settings → Actions → General → Workflow permissions
✓ Read and write permissions
✓ Allow GitHub Actions to create and approve pull requests
gh api -X PUT /repos/:owner/:repo/actions/permissions/workflow \
-f default_workflow_permissions=write \
-F can_approve_pull_request_reviews=true
Open an issue (any title) with @gemini:
@gemini create a skill called "ai-news-digest" that generates a daily report of
interesting AI news using Google Search. Include a daily demand that runs each morning.
The agent will create a PR with the skill structure, guidelines, and demand file. Review, merge, and you're done! 🎉
cd gemini-cli-git && gemini
Then describe the skill you want to create.
This system uses Git history as persistent memory:
Skills (memory/skills/)
Learnings (memory/learnings/)
Conversations (memory/conversations/)
Every commit is a memory snapshot. The agent can:
Cron Trigger
↓
Discover Demands
↓
For Each Demand:
↓
Read Demand File (specifies skill needed)
↓
Load Skill Knowledge
↓
Execute Demand Instructions
↓
Changes Made? ──→ Yes ──→ Create PR
↓
No ──→ Skip
Example: gemini-cli-tips-daily demand runs daily, analyzing the Gemini CLI repository and creating a PR with an educational tip.
User Creates Issue with @gemini
↓
Parse Request
↓
Identify Skills Needed
↓
Load Skill Knowledge
↓
Execute Request
↓
Create PR
↓
Comment on Issue with PR Link
Example: "Hey @gemini, generate a tip about using MCP servers with Gemini CLI"
User Comments "@gemini make this more concise"
↓
Checkout PR Branch
↓
Read Feedback + Current Files
↓
Apply Skill Knowledge
↓
Commit Changes to PR
↓
Comment Confirmation
Edit .github/workflows/agent-scheduler.yml:
on:
schedule:
- cron: '0 9 * * 1' # 9 AM UTC every Monday
Use crontab.guru for custom schedules.
Edit skill guidelines like memory/skills/gemini_cli_tips/knowledge/GUIDELINES.md to change:
Changes apply immediately to all future executions!
Extend the agent with external integrations like Slack, databases, browser automation, and more using MCP (Model Context Protocol) servers or Gemini CLI extensions.
Note: Gemini CLI already has native Google Search and filesystem access built-in.
See .gemini/README.md for complete documentation on:
Easiest: Open an issue with @gemini
@gemini create a skill called "code-review" that checks for security issues and code quality.
Also create a daily demand for it.
The agent creates a PR with everything ready to review and merge!
Alternative methods:
cd gemini-cli-git && gemini
Then describe the skill/demand you want to create. Gemini CLI will scaffold the files interactively.
Create a skill:
mkdir -p memory/skills/my-skill/{knowledge,output}
cat > memory/skills/my-skill/knowledge/GUIDELINES.md <<EOF
# Guidelines for my skill
EOF
Create a demand:
cat > memory/demands/my-demand.md <<EOF
---
skill: my-skill
---
Task instructions here...
EOF
Skills and demands are auto-discovered - no config needed!
Title: Task Request
Body: @gemini analyze our repository's PR merge time trends over the past 3 months
Agent will parse the request, load relevant skills, execute the task, and create a PR.
@gemini this report is too technical, make it more accessible to non-developers
Agent will read your feedback, apply changes, commit to the PR, and comment confirmation.
Runs automatically based on cron schedule:
memory/demands/Possible reasons:
Debug: Check workflow run logs for agent's reasoning
@gemini Not RespondingChecklist:
@geminiGEMINI_API_KEY secret existsCheck the improved error messages in workflow logs. Common issues:
GEMINI_API_KEY is set correctlySolutions:
Skills are just knowledge directories. No YAML config needed!
memory/skills/{name}/knowledge/memory/demands/{name}.mdmemory/skills/{name}/output/Auto-discovered, zero setup.
Each demand file starts with:
---
skill: gemini_cli_tips
---
The demand knows what it needs. Workflows just execute.
Workflows discover demands/skills automatically. No hardcoded business logic. Add new skills without touching workflows!
.
├── .github/
│ ├── workflows/
│ │ ├── agent-scheduler.yml # Executes scheduled demands
│ │ └── agent.yml # Handles @gemini mentions
│ └── actions/
│ └── run-gemini-cli-cached/ # Custom reusable action with caching (~40s faster)
│
├── memory/ # 🧠 Agent's long-term memory
│ ├── demands/ # 📋 Specific tasks to execute
│ │ ├── example-scheduled.md # Template demand (replace me!)
│ │ └── gemini-cli-tips-daily.md # Example: Daily Gemini CLI tips
│ │
│ ├── skills/ # 🎯 Specialized knowledge
│ │ ├── example_skill/ # Template skill (replace me!)
│ │ │ ├── knowledge/ # Pure expertise
│ │ │ │ └── GUIDELINES.md
│ │ │ └── output/ # Generated content
│ │ │
│ │ └── gemini_cli_tips/ # Example: Daily Gemini CLI tips
│ │ ├── knowledge/
│ │ │ └── GUIDELINES.md # How to analyze and generate tips
│ │ └── output/ # Generated tips
│ │
│ ├── context/ # 📚 Global shared knowledge
│ │ ├── GEMINI.md # Agent entrypoint & routing
│ │ └── README.md
│ │
│ ├── learnings/ # 💡 Extracted insights
│ │ └── README.md
│ │
│ └── conversations/ # 💬 Interaction history
│ └── README.md
│
├── CONTRIBUTING.md # How to contribute
└── README.md # This file
This is a template repository. Contributions should improve the template for everyone, not add specific skills or use-cases.
We welcome:
See CONTRIBUTING.md for guidelines.
Apache License 2.0 - Use freely for your projects. See LICENSE for details.
gemini-cli-git - Gemini is the brain. Git is the backend.
Built with Gemini CLI
GitHub checked 39h ago - refresh overdue. Recently viewed repositories target hourly refresh.