agentleFS
ulises-jeremiasulises-jeremias/agent-toolkit/skills/forge/github-cli-workflow/SKILL.md

github-cli-workflow

Skill18 starsChanged 3 months agoMITView on GitHub

HOW — GitHub CLI (gh): push branch, create draft PR with title/body from template or file;

  • Commits and pushes

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 7 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Distinctive:

    Use this skill when the remote is GitHub and you need to push and open a draft pull request.

    line 10
  2. Distinctive:

    Ensure the working branch tracks the remote: push with upstream as usual for the repo.

    line 19
  3. Distinctive:

    Create a draft PR:

    line 21
  4. Distinctive:

    If the repo expects a base branch other than the default:

    line 27
  5. Very specific:

    If --draft is rejected by gh, retry once without --draft and state in chat that the PR could not be created as draft via CLI.

    line 33
  6. Distinctive:

    Keep titles within team conventions (often including ticket keys).

    line 37
  7. Very specific:

    Write an untracked file PR_DESCRIPTION_<WORK_ITEM_ID>.md in the repo root or /tmp with title + body ready to paste.

    line 42
  8. Distinctive:

    Do not expose tokens or paste secrets into PR bodies.

    line 48
  9. Distinctive:

    Do not force-push shared default branches unless the user explicitly requests it.

    line 49

≈ “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 CLI — draft PR (HOW)

Use this skill when the remote is GitHub and you need to push and open a draft pull request. Workflow skills delegate here; this skill does not replace Jira or ClickUp procedures.

Prerequisites

  • gh authenticated (gh auth status).
  • Branch pushed to origin (or the remote your team uses).

Recommended flow

  1. Ensure the working branch tracks the remote: push with upstream as usual for the repo.
  2. Prefer the repository PR template for the body: use --body-file pointing at a generated file that includes template sections, or paste from .github/pull_request_template.md when required. If no template exists in the repo, use pr-fallback (WHAT) to build the body and output-handshake to confirm where the file lives and that a human will review before gh pr create.
  3. Create a draft PR:
gh pr create --draft --title "YOUR_TITLE" --body-file /path/to/body.md

If the repo expects a base branch other than the default:

gh pr create --draft --base develop --title "YOUR_TITLE" --body-file /path/to/body.md
  1. If --draft is rejected by gh, retry once without --draft and state in chat that the PR could not be created as draft via CLI.

Title and body

  • Keep titles within team conventions (often including ticket keys).
  • Validate title and body with the user before calling the step complete.

Fallback (CLI failure)

  1. Write an untracked file PR_DESCRIPTION_<WORK_ITEM_ID>.md in the repo root or /tmp with title + body ready to paste.
  2. Do not git add this file.
  3. Give manual steps: open the compare URL on GitHub and create a draft PR from the branch, pasting from the file.

Safety

  • Do not expose tokens or paste secrets into PR bodies.
  • Do not force-push shared default branches unless the user explicitly requests it.

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.