ワンクリックで
github-oauth-skill
GitHub integration with OAuth2 Device Flow authentication for repositories, issues, pull requests, and more
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
GitHub integration with OAuth2 Device Flow authentication for repositories, issues, pull requests, and more
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
| name | github-oauth-skill |
| version | 2.0.0 |
| description | GitHub integration with OAuth2 Device Flow authentication for repositories, issues, pull requests, and more |
| author | Skill Engine Team |
| allowed-tools | ["whoami","list-repos","get-repo","list-issues","create-issue","list-prs","create-pr"] |
A comprehensive GitHub integration demonstrating OAuth2 Device Flow authentication with the Skill Engine SDK. Provides secure, token-based access to GitHub repositories, issues, and pull requests without exposing credentials in configuration files.
This skill showcases modern OAuth2 authentication patterns for CLI tools, using GitHub's Device Flow (RFC 8628) which is ideal for command-line applications. All tokens are stored securely in your system keychain.
Use this skill when you need to:
The Device Flow allows you to authenticate without a local HTTP server:
Required Scopes:
repo - Full control of private repositoriesread:user - Read user profile data# Authenticate with GitHub (opens browser)
skill auth login github --skill github-oauth-skill
# This will:
# 1. Display a URL and device code
# 2. Open GitHub authorization page in your browser
# 3. Prompt you to enter the code
# 4. Store the token securely in system keychain
# View current auth status
skill auth status
# Test the connection
skill run github-oauth-skill whoami
# Log out (revokes token)
skill auth logout github
Get information about the authenticated GitHub user.
Parameters: None
Returns: User login, name, email, public repos count, followers, following
Example:
skill run github-oauth-skill whoami
List repositories for the authenticated user or an organization.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| org | string | No | - | Organization name to list repos from |
| type | string | No | all | Filter: all, owner, member, private, public |
| sort | string | No | updated | Sort by: created, updated, pushed, full_name |
| per_page | number | No | 30 | Results per page (max 100) |
Example:
# List your repositories
skill run github-oauth-skill list-repos
# List organization repos
skill run github-oauth-skill list-repos org=microsoft sort=created per_page=50
# Only show public repos
skill run github-oauth-skill list-repos type=public
Get detailed information about a specific repository.
| Parameter | Type | Required | Description |
|---|---|---|---|
| repo | string | Yes | Repository in "owner/repo" format |
Example:
skill run github-oauth-skill get-repo repo=torvalds/linux
skill run github-oauth-skill get-repo repo=facebook/react
List issues in a repository with filtering options.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| repo | string | Yes | - | Repository in "owner/repo" format |
| state | string | No | open | Filter: open, closed, all |
| assignee | string | No | - | Filter by assignee username |
| labels | string | No | - | Filter by labels (comma-separated) |
| per_page | number | No | 30 | Results per page (max 100) |
Example:
# List open issues
skill run github-oauth-skill list-issues repo=owner/repo
# List all closed issues
skill run github-oauth-skill list-issues repo=owner/repo state=closed
# Filter by labels
skill run github-oauth-skill list-issues repo=owner/repo labels=bug,high-priority
# Filter by assignee
skill run github-oauth-skill list-issues repo=owner/repo assignee=username
Create a new issue in a repository.
| Parameter | Type | Required | Description |
|---|---|---|---|
| repo | string | Yes | Repository in "owner/repo" format |
| title | string | Yes | Issue title |
| body | string | No | Issue description (supports markdown) |
| labels | string | No | Labels (comma-separated) |
| assignees | string | No | Assignees (comma-separated usernames) |
Example:
# Basic issue
skill run github-oauth-skill create-issue \
repo=owner/repo \
title="Bug: Login fails on mobile"
# Issue with description and labels
skill run github-oauth-skill create-issue \
repo=owner/repo \
title="feat: Add dark mode" \
body="## Description\nUsers have requested dark mode support.\n\n## Requirements\n- [ ] Dark theme\n- [ ] Theme switcher" \
labels=enhancement,ui
# Assign to multiple people
skill run github-oauth-skill create-issue \
repo=owner/repo \
title="Critical: Data loss bug" \
body="Users reporting data loss in version 2.1.0" \
labels=bug,critical \
assignees=dev1,dev2
List pull requests in a repository.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| repo | string | Yes | - | Repository in "owner/repo" format |
| state | string | No | open | Filter: open, closed, all |
| head | string | No | - | Filter by head branch |
| base | string | No | - | Filter by base branch |
| per_page | number | No | 30 | Results per page (max 100) |
Example:
# List open PRs
skill run github-oauth-skill list-prs repo=owner/repo
# List all PRs (including closed)
skill run github-oauth-skill list-prs repo=owner/repo state=all
# Filter by branch
skill run github-oauth-skill list-prs repo=owner/repo head=feature/auth base=main
Create a new pull request.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| repo | string | Yes | - | Repository in "owner/repo" format |
| title | string | Yes | - | PR title |
| head | string | Yes | - | Branch with changes |
| base | string | Yes | - | Branch to merge into |
| body | string | No | - | PR description (supports markdown) |
| draft | boolean | No | false | Create as draft PR |
Example:
# Basic PR
skill run github-oauth-skill create-pr \
repo=owner/repo \
title="feat: Add user authentication" \
head=feature/auth \
base=main
# PR with description and draft mode
skill run github-oauth-skill create-pr \
repo=owner/repo \
title="WIP: Refactor database layer" \
head=refactor/db \
base=develop \
body="## Changes\n- Extract query builders\n- Add connection pooling\n- Optimize migrations\n\n## TODO\n- [ ] Add tests\n- [ ] Update docs" \
draft=true
# Cross-repository PR
skill run github-oauth-skill create-pr \
repo=upstream/repo \
title="fix: Correct typo in README" \
head=myuser:patch-1 \
base=main \
body="Fixes typo in installation instructions."
# Find interesting repos
skill run github-oauth-skill list-repos org=microsoft sort=updated per_page=10
# Get details on specific repo
skill run github-oauth-skill get-repo repo=microsoft/vscode
# Check open issues
skill run github-oauth-skill list-issues repo=microsoft/vscode state=open labels=bug
# Create a new issue
skill run github-oauth-skill create-issue \
repo=myorg/myrepo \
title="Bug: API timeout" \
body="API endpoint /users times out after 30s" \
labels=bug,api
# List issues assigned to you
skill run github-oauth-skill list-issues repo=myorg/myrepo assignee=myusername
# List high-priority bugs
skill run github-oauth-skill list-issues repo=myorg/myrepo labels=bug,high-priority
# After pushing commits to feature branch, create PR
skill run github-oauth-skill create-pr \
repo=myorg/myrepo \
title="feat: Implement caching layer" \
head=feature/caching \
base=main \
body="## Summary\nAdds Redis caching for API responses\n\n## Performance\n- 80% reduction in database queries\n- 200ms average response time improvement"
# List your open PRs
skill run github-oauth-skill list-prs repo=myorg/myrepo state=open
# Check all recent PR activity
skill run github-oauth-skill list-prs repo=myorg/myrepo state=all per_page=20
No manual configuration needed! Authentication is handled through OAuth2 Device Flow.
The skill automatically:
GITHUB_TOKENIf you prefer to use a personal access token:
export GITHUB_TOKEN=ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
This skill showcases advanced SDK capabilities:
import { defineSkill, createAuthenticatedClient } from '@skill-engine/sdk';
const client = createAuthenticatedClient({
baseUrl: 'https://api.github.com',
authType: 'bearer',
tokenKey: 'GITHUB_TOKEN',
});
{
name: 'repo',
paramType: 'string',
validation: {
pattern: '^[a-zA-Z0-9_.-]+/[a-zA-Z0-9_.-]+$',
},
}
if (response.status === 401) {
return err('Auth failed', errors.auth());
}
skill auth logout github to revoke and remove tokensGitHub API rate limits:
Rate limit info is included in API responses. The skill automatically handles rate limit errors.
| Error | Cause | Solution |
|---|---|---|
| 401 Unauthorized | Invalid or expired token | Run skill auth login github again |
| 403 Forbidden | Rate limit exceeded or insufficient permissions | Wait for rate limit reset or check token scopes |
| 404 Not Found | Repository doesn't exist or no access | Verify repo name and access permissions |
| 422 Validation Failed | Invalid parameters | Check parameter format (e.g., repo must be "owner/name") |
Browser doesn't open during auth:
# Manually open the URL displayed in terminal
# Then enter the device code shown
Token not found:
# Re-authenticate
skill auth login github --skill github-oauth-skill
Permission denied errors:
# Check token scopes - may need to re-authenticate with broader scopes
skill auth logout github
skill auth login github --skill github-oauth-skill
This skill serves as a reference implementation for OAuth2 in Skill Engine. Contributions welcome:
Docker container and image management with native docker CLI integration. Use when you need to manage containers, images, networks, volumes, or run Docker Compose.
Video and audio processing using FFmpeg inside a secure Docker container
Image manipulation and conversion using ImageMagick inside a secure Docker container
MongoDB database client with Docker-based mongosh CLI
MySQL database client with Docker-based mysql CLI
PostgreSQL CLI client (psql) for database operations running inside a Docker container