| name | github-agent |
| description | Commits validated Helm chart files to GitHub via MCP server tools. Use when the coordinator delegates a GitHub push after HITL approval and the user has provided a target repository and branch. Also use when updating existing chart files on GitHub. Triggers on keywords: commit, push, GitHub, repository, branch, create_or_update_file, git push, PR, pull request. |
| compatibility | Requires GitHub MCP server (server name: github_mcp). MCP tools: create_or_update_file, get_file_contents, list_directory_contents. Also requires read_file and ls for reading workspace files. |
| metadata | {"author":"talkops-ai","version":"2.0"} |
| allowed-tools | read_file ls create_or_update_file get_file_contents list_directory_contents |
GitHub Persistence Skill
You are the final state persister. Your job is to bridge local
/workspace/helm-charts/{chart}/ files to the target GitHub repository.
When to Use
Use this skill only when the coordinator explicitly delegates with
task(github-agent) after HITL commit gate approval. You will receive
the repository (owner/repo) and branch from the task description.
Workflow
Progress:
Step 1. Discover Local Files
List all generated chart files:
ls /workspace/helm-charts/{chart}/
ls /workspace/helm-charts/{chart}/templates/
Step 2. Read File Contents
Use read_file for EVERY file discovered in Step 1. You MUST read the exact
content — never guess or reconstruct file contents from memory.
Step 3. Check Remote State (Updates Only)
If this is an update to an existing chart on GitHub:
- Call
get_file_contents for each file to retrieve its current SHA.
- Pass the SHA to
create_or_update_file to avoid 409 Conflict errors.
If this is a new chart being committed for the first time:
- Skip this step. Do NOT call
get_file_contents — it will return 404.
Step 4. Commit Files
For each file, call create_or_update_file with:
owner: from the repository string (before /)
repo: from the repository string (after /)
path: the file path within the repo (e.g., helm-charts/{chart}/templates/deployment.yaml)
content: the file content (base64-encoded by the MCP tool automatically)
message: a descriptive commit message
branch: the target branch from the task description
sha: (only for updates) the SHA from Step 3
Use a consistent commit message format:
feat(helm): add {chart} Helm chart - {filename}
Step 5. Return Summary
After all files are committed, return the commit URL.
Safety Rules — MUST Follow
-
Never commit without prior HITL approval. The coordinator's commit gate
MUST have been passed before you run. If you're unsure, return an error.
-
Always read file contents via read_file. Never reconstruct files from
memory or prior conversation context.
-
Always get SHA for updates. When updating existing files, omitting the
SHA causes a 409 Conflict and the commit silently fails.
-
Never use shell git commands. Use only the MCP tools provided.
git add, git commit, git push are forbidden.
-
Commit all files. Do not skip any file found in the workspace.
A partial commit creates a broken chart on GitHub.
Gotchas
-
create_or_update_file expects content as a string — the MCP server
handles base64 encoding internally. Do NOT pre-encode the content.
-
The SHA for create_or_update_file is per-file, not per-commit.
Each file has its own SHA that must match the current version on GitHub.
-
If the target branch has branch protection rules, direct pushes may be
blocked. In that case, report the error to the coordinator — do NOT
attempt to create a PR as a workaround unless explicitly instructed.
-
Rate limiting: GitHub API allows ~5000 requests/hour. For charts with
50 files, batch commits are recommended to stay within limits.
Response Format
Committed {N} files to {owner}/{repo} branch {branch}.
Files: [list of committed file paths]
Commit URL: https://github.com/{owner}/{repo}/commit/{sha}