Skip to content
Back to skills

Github

ASecurity

The GitHub REST API (v3) allows deep integration with Git data, pull requests, and GitHub Actions. This skill emphasizes the Octokit SDK.

  • 13 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 5, 2026
ai-agentsbashgitapisecurity

Works with

  • cli
  • api

Security analysis

A92/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 8 files and shows the line behind each finding

Scanned September 5, 2026

npx -y skills add ashish7802/awesome-api-skills --skill github --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Github?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Github
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ashish7802-github/badge)](https://www.skillsdirectory.com/skills/ashish7802-github)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
# GitHub REST API API Skill

## Overview
The GitHub REST API (v3) allows deep integration with Git data, pull requests, and GitHub Actions. This skill emphasizes the Octokit SDK.

## Installation
```bash
npm install octokit
pip install PyGithub
```

## Authentication
Use Personal Access Tokens (Classic or Fine-grained) passed as Bearer tokens. Fine-grained PATs are highly recommended for least-privilege access.

## Core Concepts
- **Octokit**: The official SDK.
- **Refs**: Git references (branches/tags).
- **Checks**: Status reports for commits (used by CI).

## Common Workflows
1. Authenticate Octokit.
2. Call `octokit.rest.pulls.create` to open a PR.
3. Request reviewers via `octokit.rest.pulls.requestReviewers`.

## Error Handling
Handle `HttpError`. Status `404` often indicates missing permissions (due to token scope) rather than a truly missing resource.

## Security
Never store PATs in source code. Use GitHub Apps for server-to-server integrations rather than service accounts.

## Rate Limits
Authenticated requests are limited to 5,000 per hour. Search API is limited to 30 requests per minute.

## Best Practices
Use GraphQL for deeply nested data retrieval to save REST calls. Use the `If-None-Match` header to utilize conditional requests (saves rate limits).

## Troubleshooting
If Actions fail to trigger via API, ensure your token has the `workflow` scope.

## References
- [API Reference](https://docs.github.com/en/rest)

## Why use this skill
Use this when your agent works with **github** — structured patterns beat pasted docs and prevent common hallucinations.

## AI pitfalls
- Referencing CLI flags or config keys that do not exist
- Using outdated major versions of tools
- Skipping lockfile or version pinning in examples

## Production checklist
- [ ] Secrets in environment variables, not source code
- [ ] Error handling and logging in place
- [ ] Rate limits and timeouts configured

## Related skills
- No graph relationships yet — see the knowledge graph in the docs site.

---
> **Last Verified:** 2026-07-02

Files in this skill

  • SKILL.md2 KB
  • examples/basic.ts39 B
  • examples/example.py52 B
  • examples/example.ts99 B
  • prompts/create-pr.md125 B
  • prompts/system.md41 B
  • tests/skill.test.ts29 B
  • tests/validation.test.ts104 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.