github-api

github-api is a skill for Claude Code from abel30567/fermi-mcp. It costs 36 tokens per session (735 once invoked), scanned A, original, MIT.

A guide for calling GitHub's REST API, the web interface developers use to access repositories, issues, pull requests, and files programmatically. It covers authentication and safe UTF-8 text handling.

In plain words
What is it for?
Use it to create issues or pull requests, read repository files, commit text or binary files, and update files through GitHub's API.
Why use it?
It reduces common API mistakes, including missing headers, exposed tokens, and corrupted non-English text when files are read and written.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it to create issues or pull requests, read repository files, commit text or binary files, and update files through GitHub's API.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/abel30567/fermi-mcp/github-api
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add abel30567/fermi-mcp --skill github-api
Clone the repo
git clone --depth 1 https://github.com/abel30567/fermi-mcp

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for github-api

README.md
[![agentmods](https://agentmods.dev/badge/skills/abel30567/fermi-mcp/github-api/github.svg)](https://agentmods.dev/skills/abel30567/fermi-mcp/github-api)
Your own site
<a href="https://agentmods.dev/skills/abel30567/fermi-mcp/github-api"><img src="https://agentmods.dev/badge/skills/abel30567/fermi-mcp/github-api/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for github-api

Your own site · 80×15
<a href="https://agentmods.dev/skills/abel30567/fermi-mcp/github-api"><img src="https://agentmods.dev/badge/skills/abel30567/fermi-mcp/github-api.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 36 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 735 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00036 $0.00735
Opus 5.5 $0.00014 $0.00294
Sonnet 5.5 $0.00007 $0.00147
Haiku 4.5 $0.00004 $0.00073

Measured 1mo ago against content hash 0145f9b19680, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

github-api scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

packages/worker/seeds/skills/github-api/SKILL.md · 51 lines

How it starts

The opening of the file, as written. The whole thing — 51 lines — stays where its author put it; the contents beside it link to each section on GitHub.

GitHub API workflow

Auth

Always call through execute (codemode.fetch_url) or fetch_url with:

  • Header Authorization: Bearer {{secret:GITHUB_TOKEN}} (never inline a raw token; the secret is scoped to api.github.com)
  • Header User-Agent: Fermi-Agent (GitHub rejects requests without one)
  • API base: https://api.github.com

Common recipes

  • Create issue: POST /repos/{owner}/{repo}/issues { title, body, labels }
  • Create PR: POST /repos/{owner}/{repo}/pulls { title, head, base, body }
  • Read file: GET /repos/{owner}/{repo}/contents/{path} (body is base64)
  • Write file: PUT /repos/{owner}/{repo}/contents/{path} { message, content: <base64>, sha?, branch? }

CRITICAL: UTF-8 encoding (corruption hazard)

atob/btoa alone and Buffer.from(...) in the Worker sandbox corrupt multi-byte UTF-8 (em-dashes, arrows, smart quotes) — each read-modify-write round trip adds mojibake. Always use the symmetric pair:

  • READ: decodeURIComponent(escape(atob(b64.replace(/\n/g, ''))))
  • WRITE: btoa(unescape(encodeURIComponent(content))) Or the byte-exact TextDecoder/TextEncoder loop for binary-safe handling. Also: →-style escapes only resolve inside JS string literals — when generating JSX/text via templates, insert real unicode characters.

Large binary commits — blob-rename technique (preferred)

The model cannot reliably transcribe >3K chars of base64. When a large file must be committed:

  1. Have the USER push the file to the repo under any filename.
  2. GET /repos/{o}/{r}/contents/{tmp} to get the blob SHA.
  3. POST /repos/{o}/{r}/git/trees with base_tree = HEAD tree, adding the blob at the desired path (and sha: null entries to delete the temp file).
  4. POST /repos/{o}/{r}/git/commits with that tree + parent HEAD.
  5. PATCH /repos/{o}/{r}/git/refs/heads/{branch} to the new commit. Zero file bytes pass through model context — only SHA pointers.

Fallback: R2 chunk relay (file not yet on GitHub)

Split base64 into ~1000-char chunks, write each via fs_write to assets/<name>/<i>, then one execute reads all chunks, concatenates, verifies magic bytes + length, and PUTs to GitHub with the auth header above.

Read the full file on GitHub · 51 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 51 lines · 36 tokens per session scan A 0145f9b19680

Subscribe to this mod's changes

github-api is a skill published in the GitHub repository abel30567/fermi-mcp (1 stars, last pushed 4d ago), licensed MIT. It adds 36 tokens to every session and 735 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

github-cli

A command-line tool connection for GitHub tasks that built-in tools do not cover. It uses GitHub's command-line program to work with issues, pull requests, releases, workflows, searches, and the GitHub API.

zhinjs/zhin · 30 tokens

github

A writing guide for GitHub issues, pull requests, code reviews, and release notes in Zhin projects. GitHub is a service where teams track bugs, discuss changes, review code, and publish project updates.

zhinjs/zhin · 58 tokens

work

Use when the user provides a GitHub Issue URL to work on in the current repo — a bug, tech debt, a refactor, or a follow-up left by a review. Do NOT use to only check issues without implementing (use /github-issues:verify), for PRs (use /code-review), or for epics, spikes and new features that need a spec first (use…

juanmhidalgo/claude-plugins · 88 tokens

github-integration

A coding aid for working with GitHub, a service for hosting code and coordinating software work. It supports creating and querying issues and pull requests and retrieving repository information.

XSpoonAi/spoon-awesome-skill · 32 tokens

issue

Use when starting a chain from a GitHub issue — turning an issue URL or number into a triaged, planned, dispatched, and reviewed pull request. Classifies the thread (bug → root-cause discipline, feature → plan chain, question → drafted reply), synthesizes a spec from the issue's own acceptance criteria, then runs the…

jeremylongshore/tons-of-skills-marketplace · 115 tokens

github-repository

A GitHub repository workflow skill for preparing a workspace, applying file patches, pushing a branch, and creating a pull request. A pull request is a proposed code change submitted for review before it is merged.

zhinjs/zhin · 23 tokens