Index of every page on this site: llms.txt
All skills
clins1994 avatar

/github

@7021bf5
by Caioclins1994/skills1 stars
Run it yourself

Post to GitHub with gh - pull request bodies with uploaded images (`gh --attach`) and a render check, PR comments, replies inside review threads, and issues. Gives the GitHub block syntax and safe edits that keep bot sections below the footer. The text comes from clins:post; clins:create-pr uses this skill for its GitHub steps. Use whenever you post, comment, reply, or file an issue on GitHub, or upload images to a GitHub post.

Use this Skill: https://skilld.dev/gh/clins1994/skills/github

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈110 tokens for metadata: the name and description. ≈1.7k when used: this file.

Description uses 5.5% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈440 characters, or 5.5%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

/clins:github — Post to GitHub

This skill sends a post to GitHub. The text (leads, details blocks, languages, footer, check) comes from clins:post. The footer names clins:github, except on a pull request body, where it names clins:create-pr. To open a pull request, start with clins:create-pr. It uses this skill for the GitHub steps.

Rules

  • Never merge, approve or close a PR.
  • Never post a comment that asks a review bot for a review (@greptileai ...), unless that bot's skill says to (for Greptile, clins:greptile, "Triggering"). Many bots review every push by themselves, and each request is a paid review.
  • Send text from a file (--body-file, -F body=@file), never inline, so newlines and backticks survive.
  • In a public repo, an attached image is public.

Preflight

This skill uses the gh CLI. It does not cover the GitHub MCP server yet (CONTRIBUTING.md lists it as an open idea). If gh is missing, tell the user to install it, and stop.

  1. gh auth status.
  2. For images, make sure that you have write access to the repo that gets the PR: gh api repos/<owner>/<repo> --jq .permissions.push. A PR from a fork to an upstream repo usually has none. If the answer is false, use the placeholder path in "Pull request body with images". If it is true, also make sure that gh --version is 2.99 or newer (for --attach). If it is older, tell the user to upgrade gh, and stop.
  3. gh repo view --json nameWithOwner,visibility.
  4. Read the repo's AGENTS.md, CLAUDE.md, and .github/ templates. Their headings and required lines win.

GitHub syntax

  • Collapsed block: <details><summary><b>🇬🇧 More details</b> · 3 min read</summary>, a blank line, the content, a blank line, </details>. The blank line after </summary> is required, or GitHub shows raw Markdown. Use <b>, not a heading, in <summary>, and keep the read time outside the <b>. A heading adds its own top margin below the --- divider, so the gap doubles.
  • Footer: the line from clins:post, with a --- divider directly above it and blank lines around the divider.
  • Never <details open>. Never Linear's >>>.
  • Mention: @login. Link: #123 or owner/repo#123.
  • Check with check_post.py --platform github --skill github (or --skill create-pr for a pull request body).

Pull request body with images

If the clins:fork-review skill is installed, check its setting before gh pr create on a repo the user doesn't own. It may want the PR on the user's fork first. Without that skill, post as usual.

Run gh from the folder that holds the body and the images, so the ./ paths in the body match. That folder is outside the repo, so pass -R and --head. Push the branch first.

gh pr create -R <owner>/<repo> --head <branch> --title "<title>" --body-file body.md --assignee <login> \
  --attach ./login-before.png --attach ./login-after.png     # add --draft if not ready
gh pr edit <n> -R <owner>/<repo> --body-file body.md [--attach ./new.png]
gh pr view <n> -R <owner>/<repo> --json body -q .body > body.md                # fetch to update

Every --attach path must match a path in the body exactly. gh uploads each file to GitHub's attachment store and writes a https://github.com/user-attachments/assets/... URL in its place. Nothing is committed, so no review runs.

Check that the images render:

  1. The body from gh pr view has only user-attachments URLs, and no ./ path.

  2. Fetch each image from the HTML GitHub renders for you:

    gh api repos/<owner>/<repo>/pulls/<n> -H "Accept: application/vnd.github.html+json" --jq .body_html \
      | grep -oE 'src="https://[^"]*(user-images|user-attachments)[^"]*"' | sed 's/^src="//;s/"$//;s/&amp;/\&/g' \
      | while read -r u; do curl -sL -o /dev/null -w '%{http_code} %{content_type}\n' "$u"; done

    Every line must be 200 image/... or 200 video/....

  3. In a private repo, an unauthenticated request to github.com/user-attachments/... returns 404 even when members see the image. That is expected.

Without write access

gh --attach needs write access to the repo. Without it, gh pr create and gh pr edit fail with "attaching files requires write access to the repository". The GitHub API has no other supported upload. So the user adds the images in the browser:

  1. Replace each image in the body with a placeholder in the same table cell. The placeholder names the file, for example 📎 **Paste `login-before.png` here**. Keep the caption row.
  2. Post the full title and body without --attach.
  3. Make sure that no ./ path is left in the body from gh pr view.
  4. Tell the user the local path of each image. Ask them to open the PR in the browser, edit the description, and paste each image over its placeholder. The web editor uploads images for any account that can edit the PR.
  5. After the user says the images are in, run the render check above.

Do not call undocumented upload endpoints (for example uploads.github.com/user-attachments/assets). Do not commit the images to the repo as a workaround.

PR comment

gh pr comment <n> -R <owner>/<repo> --body-file post.md
gh api repos/<owner>/<repo>/issues/comments/<id> -q .body > post.md            # fetch to update
gh api -X PATCH repos/<owner>/<repo>/issues/comments/<id> -F body=@post.md

Reply in a review thread

Reply in the thread, not as a new top-level comment. <id> is the review comment's id: its id in gh api repos/<owner>/<repo>/pulls/<n>/comments, or the databaseId of the thread's first comment in the GraphQL reviewThreads query. Both are the same number:

gh api repos/<owner>/<repo>/pulls/<n>/comments/<id>/replies -F body=@post.md

A short post is usually right: "Fixed in abc1234." Resolve the thread only if the user asked, or if the fix does exactly what the comment asked.

Issue

Headings, unless the repo's issue template has its own: Context, Work, Done when. Translate them for each other language, for example in japanese: 背景, やること, 完了条件.

gh issue create -R <owner>/<repo> --title "<title>" --body-file post.md [--assignee <login>] [--label <name>]
gh issue view <n> -R <owner>/<repo> --json body -q .body > post.md            # fetch to update
gh issue edit <n> -R <owner>/<repo> --body-file post.md

Updating any post

Fetch it, change it with clins:post ("Updating a post"), keep everything below the footer exactly as it is, check, then save with the matching command. Keep image URLs that are already there unless you replace those images.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

1 warning23d3 checks · Risk SAFE
  • Gen Agent Trust Hub23d

    This skill is designed to manage GitHub tasks like creating pull requests, issues, and comments using the GitHub CLI (gh). The primary security consideration is that it instructs the agent to follow instructions found within external repository files, which creates a surface for indirect prompt injection.

  • Socket23d

    No alerts

  • Snyk23d

    Risk: MEDIUM · 1 issue

Signed by skilld at 7021bf5. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 3 weeks ago.

Activeupdated last month
user-invocable
true
argument-hint
[pr | comment | reply | issue] [number or URL to update] [any language changes]

README badge

README badge for clins1994/skills/github