agentleFS
jonathan-vellajonathan-vella/bmit-2026/.github/skills/github-operations/SKILL.md

github-operations

Skill3 starsChanged 8 months agoMITArchived repositoryView on GitHub

Full contribution lifecycle: branch naming, conventional commits, GitHub issues, PRs, Actions, and releases. MCP-first with gh CLI fallback. USE FOR: commit, push, PR, branch, issue, release, GitHub operations. DO NOT USE FOR: Azure infrastructure, Bicep/Terraform code, architecture decisions.

  • Reads credentials

3 other projects use a version of this.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

17 rules. About 0 are common, 10 are distinctive, and 7 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈10

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 7

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before any commit or PR, validate the branch name:

    line 29
  2. Very specific:

    If the branch name is invalid, stop and suggest renaming: git branch -m <old-name> feat/<descriptive-name>

    line 40
  3. Very specific:

    If files are out of scope, suggest feat/ or fix/ instead.

    line 44
  4. Distinctive:

    Commit messages must follow Conventional Commits format (enforced by commitlint):

    line 51
  5. Distinctive:

    Check whether an MCP tool exists for that operation

    line 73
  6. Distinctive:

    If MCP exists, use MCP only

    line 74
  7. Very specific:

    Use gh CLI only when no equivalent MCP tool is available

    line 75
  8. Very specific:

    Do not run gh auth login in devcontainer workflows

    line 79
  9. Distinctive:

    If MCP write tools are missing, report explicitly and provide fallback

    line 82
  10. Very specific:

    Search for PR templates in .github/PULL_REQUEST_TEMPLATE/

    line 121
  11. Distinctive:

    DO: Use MCP tools first for issues and PRs

    line 154
  12. Very specific:

    DO: Use gh CLI for Actions, releases, repos, secrets, API

    line 155
  13. Distinctive:

    DO: Search for existing issues/PRs before creating duplicates

    line 157
  14. Distinctive:

    DO: Check for PR templates before creating PRs

    line 158
  15. Distinctive:

    DON'T: Commit on a branch with an invalid name

    line 159
  16. Distinctive:

    DON'T: Create issues/PRs without confirming repo owner and name

    line 160
  17. Very specific:

    DON'T: Use gh CLI for issues/PRs when MCP tools are available

    line 162

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

GitHub Operations

Full contribution lifecycle — from branch creation to PR merge. MCP tools preferred; gh CLI as fallback.

Contribution Lifecycle

1. Create branch (naming convention) →
2. Make changes →
3. Commit (conventional commits) →
4. Push (pre-push hooks validate branch + scope) →
5. Create PR (MCP tools) →
6. Review + Merge

Branch Naming (Mandatory)

Before any commit or PR, validate the branch name:

git rev-parse --abbrev-ref HEAD
TypePrefixesFile Scope
Domain-scopeddocs/, agents/, skills/, infra/, scripts/, instructions/Restricted to domain paths
Cross-cuttingfeat/, fix/, chore/, ci/, refactor/, perf/, test/, build/, revert/Any files

If the branch name is invalid, stop and suggest renaming: git branch -m <old-name> feat/<descriptive-name>

For domain-scoped branches, verify changed files are within scope. If files are out of scope, suggest feat/ or fix/ instead.

📋 Full rules: Read references/branch-strategy.md for scope tables, validation commands, and enforcement layers.

Conventional Commits (Mandatory)

Commit messages must follow Conventional Commits format (enforced by commitlint):

<type>[optional scope]: <description>
TypePurposeTypePurpose
featNew featuretestTests
fixBug fixbuildBuild system
docsDocumentationciCI/CD config
refactorRefactorchoreMaintenance
perfPerformancerevertRevert

Scopes: agents, skills, instructions, bicep, terraform, mcp, docs, scripts

📋 Full workflow: Read references/commit-conventions.md for staging, breaking changes, best practices, and safety protocol.

MCP Priority Protocol (Mandatory)

  1. Identify required operation (issue, PR, search, Actions, release, etc.)
  2. Check whether an MCP tool exists for that operation
  3. If MCP exists, use MCP only
  4. Use gh CLI only when no equivalent MCP tool is available

Devcontainer Reliability Rule

  • Do not run gh auth login in devcontainer workflows
  • GH_TOKEN must be set via VS Code User Settings (terminal.integrated.env.linux)
  • For PR/issue creation, rely on MCP tool authentication by default
  • If MCP write tools are missing, report explicitly and provide fallback

Issues (MCP Tools)

ToolPurpose
mcp_github_list_issuesList repository issues
mcp_github_issue_readFetch issue details
mcp_github_issue_writeCreate/update issues
mcp_github_search_issuesSearch issues
mcp_github_add_issue_commentAdd comments

Creating issues — Required: owner, repo, title, body. Title guidelines: prefix with [Bug], [Feature], [Docs]; keep under 72 chars.


Pull Requests (MCP Tools)

ToolPurpose
mcp_github_create_pull_requestCreate new PRs
mcp_github_merge_pull_requestMerge PRs
mcp_github_update_pull_requestUpdate PR details
mcp_github_pull_request_review_writeCreate/submit reviews
mcp_github_request_copilot_reviewCopilot code review
mcp_github_search_pull_requestsSearch PRs
mcp_github_list_pull_requestsList PRs

Creating PRs

Required: owner, repo, title, head (source branch), base (target branch)

Pre-flight checks (mandatory before creating):

  1. Validate branch name (see Branch Naming above)
  2. For domain branches, verify files are in scope
  3. Search for PR templates in .github/PULL_REQUEST_TEMPLATE/
  4. Title must follow conventional commit format

Default merge method: squash unless user specifies otherwise.

📋 Smart PR Flow: Read references/smart-pr-flow.md for PR lifecycle states, auto-labels, and auto-merge conditions.


CLI Commands (gh)

📋 Reference: Read references/detailed-commands.md for complete gh CLI commands covering repos, Actions, releases, secrets, API, and auth.

IMPORTANT: gh api -f does not support object values. Use multiple -f flags with hierarchical keys and string values instead.

Global Flags

FlagDescription
--repo OWNER/REPOTarget specific repository
--json FIELDSOutput JSON with fields
--jq EXPRESSIONFilter JSON output
--webOpen in browser
--paginateFetch all pages

DO / DON'T

  • DO: Validate branch name before committing or creating PRs
  • DO: Use MCP tools first for issues and PRs
  • DO: Use gh CLI for Actions, releases, repos, secrets, API
  • DO: Confirm repository context before creating issues/PRs
  • DO: Search for existing issues/PRs before creating duplicates
  • DO: Check for PR templates before creating PRs
  • DON'T: Commit on a branch with an invalid name
  • DON'T: Create issues/PRs without confirming repo owner and name
  • DON'T: Merge PRs without user confirmation
  • DON'T: Use gh CLI for issues/PRs when MCP tools are available
  • DON'T: Skip hooks (--no-verify) unless user explicitly asks

Reference Index

ReferenceFileContent
Branch Strategyreferences/branch-strategy.mdNaming convention, scope tables, enforcement layers
Commit Conventionsreferences/commit-conventions.mdFormat, types, staging workflow, safety protocol
Smart PR Flowreferences/smart-pr-flow.mdPR lifecycle states, auto-labels, auto-merge
CLI Commandsreferences/detailed-commands.mdRepos, Actions, Releases, Secrets, API, Auth

Smart PR Flow

Automated PR lifecycle for infrastructure deployments. Defines label-based state tracking, auto-label rules on CI pass/fail, and a watchdog pattern for the deploy agent.

For full details: Read references/smart-pr-flow.md

Quick Reference

ConditionLabel Applied
CI passesinfraops-ci-pass
CI failsinfraops-needs-fix
Review approvedinfraops-reviewed
Auto-merge (all gates pass)PR merged via MCP

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.