{
  "schemaVersion": "1.0",
  "item": {
    "slug": "github-api",
    "name": "GitHub",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/byungkyu/github-api",
    "canonicalUrl": "https://clawhub.ai/byungkyu/github-api",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/github-api",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=github-api",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md",
      "LICENSE.txt"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/github-api"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/github-api",
    "agentPageUrl": "https://openagent3.xyz/skills/github-api/agent",
    "manifestUrl": "https://openagent3.xyz/skills/github-api/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/github-api/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "GitHub",
        "body": "Access the GitHub REST API with managed OAuth authentication. Manage repositories, issues, pull requests, commits, branches, users, and more."
      },
      {
        "title": "Quick Start",
        "body": "# Get authenticated user\npython <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://gateway.maton.ai/github/user')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF"
      },
      {
        "title": "Base URL",
        "body": "https://gateway.maton.ai/github/{native-api-path}\n\nReplace {native-api-path} with the actual GitHub API endpoint path. The gateway proxies requests to api.github.com and automatically injects your OAuth token."
      },
      {
        "title": "Authentication",
        "body": "All requests require the Maton API key in the Authorization header:\n\nAuthorization: Bearer $MATON_API_KEY\n\nEnvironment Variable: Set your API key as MATON_API_KEY:\n\nexport MATON_API_KEY=\"YOUR_API_KEY\""
      },
      {
        "title": "Getting Your API Key",
        "body": "Sign in or create an account at maton.ai\nGo to maton.ai/settings\nCopy your API key"
      },
      {
        "title": "Connection Management",
        "body": "Manage your GitHub OAuth connections at https://ctrl.maton.ai."
      },
      {
        "title": "List Connections",
        "body": "python <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://ctrl.maton.ai/connections?app=github&status=ACTIVE')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF"
      },
      {
        "title": "Create Connection",
        "body": "python <<'EOF'\nimport urllib.request, os, json\ndata = json.dumps({'app': 'github'}).encode()\nreq = urllib.request.Request('https://ctrl.maton.ai/connections', data=data, method='POST')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nreq.add_header('Content-Type', 'application/json')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF"
      },
      {
        "title": "Get Connection",
        "body": "python <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://ctrl.maton.ai/connections/{connection_id}')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n\nResponse:\n\n{\n  \"connection\": {\n    \"connection_id\": \"83e7c665-60f6-4a64-816c-5e287ea8982f\",\n    \"status\": \"ACTIVE\",\n    \"creation_time\": \"2026-02-06T03:00:43.860014Z\",\n    \"last_updated_time\": \"2026-02-06T03:01:06.027323Z\",\n    \"url\": \"https://connect.maton.ai/?session_token=...\",\n    \"app\": \"github\",\n    \"metadata\": {}\n  }\n}\n\nOpen the returned url in a browser to complete OAuth authorization."
      },
      {
        "title": "Delete Connection",
        "body": "python <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://ctrl.maton.ai/connections/{connection_id}', method='DELETE')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF"
      },
      {
        "title": "Specifying Connection",
        "body": "If you have multiple GitHub connections, specify which one to use with the Maton-Connection header:\n\npython <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://gateway.maton.ai/github/user')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nreq.add_header('Maton-Connection', '83e7c665-60f6-4a64-816c-5e287ea8982f')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n\nIf omitted, the gateway uses the default (oldest) active connection."
      },
      {
        "title": "Users",
        "body": "Get Authenticated User\n\nGET /github/user\n\nGet User by Username\n\nGET /github/users/{username}\n\nList Users\n\nGET /github/users?since={user_id}&per_page=30"
      },
      {
        "title": "Repositories",
        "body": "List User Repositories\n\nGET /github/user/repos?per_page=30&sort=updated\n\nQuery parameters: type (all, owner, public, private, member), sort (created, updated, pushed, full_name), direction (asc, desc), per_page, page\n\nList Organization Repositories\n\nGET /github/orgs/{org}/repos?per_page=30\n\nGet Repository\n\nGET /github/repos/{owner}/{repo}\n\nCreate Repository (User)\n\nPOST /github/user/repos\nContent-Type: application/json\n\n{\n  \"name\": \"my-new-repo\",\n  \"description\": \"A new repository\",\n  \"private\": true,\n  \"auto_init\": true\n}\n\nCreate Repository (Organization)\n\nPOST /github/orgs/{org}/repos\nContent-Type: application/json\n\n{\n  \"name\": \"my-new-repo\",\n  \"description\": \"A new repository\",\n  \"private\": true\n}\n\nUpdate Repository\n\nPATCH /github/repos/{owner}/{repo}\nContent-Type: application/json\n\n{\n  \"description\": \"Updated description\",\n  \"has_issues\": true,\n  \"has_wiki\": false\n}\n\nDelete Repository\n\nDELETE /github/repos/{owner}/{repo}"
      },
      {
        "title": "Repository Contents",
        "body": "List Contents\n\nGET /github/repos/{owner}/{repo}/contents/{path}\n\nGet File Contents\n\nGET /github/repos/{owner}/{repo}/contents/{path}?ref={branch}\n\nCreate or Update File\n\nPUT /github/repos/{owner}/{repo}/contents/{path}\nContent-Type: application/json\n\n{\n  \"message\": \"Create new file\",\n  \"content\": \"SGVsbG8gV29ybGQh\",\n  \"branch\": \"main\"\n}\n\nNote: content must be Base64 encoded.\n\nDelete File\n\nDELETE /github/repos/{owner}/{repo}/contents/{path}\nContent-Type: application/json\n\n{\n  \"message\": \"Delete file\",\n  \"sha\": \"{file_sha}\",\n  \"branch\": \"main\"\n}"
      },
      {
        "title": "Branches",
        "body": "List Branches\n\nGET /github/repos/{owner}/{repo}/branches?per_page=30\n\nGet Branch\n\nGET /github/repos/{owner}/{repo}/branches/{branch}\n\nRename Branch\n\nPOST /github/repos/{owner}/{repo}/branches/{branch}/rename\nContent-Type: application/json\n\n{\n  \"new_name\": \"new-branch-name\"\n}\n\nMerge Branches\n\nPOST /github/repos/{owner}/{repo}/merges\nContent-Type: application/json\n\n{\n  \"base\": \"main\",\n  \"head\": \"feature-branch\",\n  \"commit_message\": \"Merge feature branch\"\n}"
      },
      {
        "title": "Commits",
        "body": "List Commits\n\nGET /github/repos/{owner}/{repo}/commits?per_page=30\n\nQuery parameters: sha (branch name or commit SHA), path (file path), author, committer, since, until, per_page, page\n\nGet Commit\n\nGET /github/repos/{owner}/{repo}/commits/{ref}\n\nCompare Two Commits\n\nGET /github/repos/{owner}/{repo}/compare/{base}...{head}"
      },
      {
        "title": "Issues",
        "body": "List Repository Issues\n\nGET /github/repos/{owner}/{repo}/issues?state=open&per_page=30\n\nQuery parameters: state (open, closed, all), labels, assignee, creator, mentioned, sort, direction, since, per_page, page\n\nGet Issue\n\nGET /github/repos/{owner}/{repo}/issues/{issue_number}\n\nCreate Issue\n\nPOST /github/repos/{owner}/{repo}/issues\nContent-Type: application/json\n\n{\n  \"title\": \"Found a bug\",\n  \"body\": \"Bug description here\",\n  \"labels\": [\"bug\"],\n  \"assignees\": [\"username\"]\n}\n\nUpdate Issue\n\nPATCH /github/repos/{owner}/{repo}/issues/{issue_number}\nContent-Type: application/json\n\n{\n  \"state\": \"closed\",\n  \"state_reason\": \"completed\"\n}\n\nLock Issue\n\nPUT /github/repos/{owner}/{repo}/issues/{issue_number}/lock\nContent-Type: application/json\n\n{\n  \"lock_reason\": \"resolved\"\n}\n\nUnlock Issue\n\nDELETE /github/repos/{owner}/{repo}/issues/{issue_number}/lock"
      },
      {
        "title": "Issue Comments",
        "body": "List Issue Comments\n\nGET /github/repos/{owner}/{repo}/issues/{issue_number}/comments?per_page=30\n\nCreate Issue Comment\n\nPOST /github/repos/{owner}/{repo}/issues/{issue_number}/comments\nContent-Type: application/json\n\n{\n  \"body\": \"This is a comment\"\n}\n\nUpdate Issue Comment\n\nPATCH /github/repos/{owner}/{repo}/issues/comments/{comment_id}\nContent-Type: application/json\n\n{\n  \"body\": \"Updated comment\"\n}\n\nDelete Issue Comment\n\nDELETE /github/repos/{owner}/{repo}/issues/comments/{comment_id}"
      },
      {
        "title": "Labels",
        "body": "List Labels\n\nGET /github/repos/{owner}/{repo}/labels?per_page=30\n\nCreate Label\n\nPOST /github/repos/{owner}/{repo}/labels\nContent-Type: application/json\n\n{\n  \"name\": \"priority:high\",\n  \"color\": \"ff0000\",\n  \"description\": \"High priority issues\"\n}"
      },
      {
        "title": "Milestones",
        "body": "List Milestones\n\nGET /github/repos/{owner}/{repo}/milestones?state=open&per_page=30\n\nCreate Milestone\n\nPOST /github/repos/{owner}/{repo}/milestones\nContent-Type: application/json\n\n{\n  \"title\": \"v1.0\",\n  \"state\": \"open\",\n  \"description\": \"First release\",\n  \"due_on\": \"2026-03-01T00:00:00Z\"\n}"
      },
      {
        "title": "Pull Requests",
        "body": "List Pull Requests\n\nGET /github/repos/{owner}/{repo}/pulls?state=open&per_page=30\n\nQuery parameters: state (open, closed, all), head, base, sort, direction, per_page, page\n\nGet Pull Request\n\nGET /github/repos/{owner}/{repo}/pulls/{pull_number}\n\nCreate Pull Request\n\nPOST /github/repos/{owner}/{repo}/pulls\nContent-Type: application/json\n\n{\n  \"title\": \"New feature\",\n  \"body\": \"Description of changes\",\n  \"head\": \"feature-branch\",\n  \"base\": \"main\",\n  \"draft\": false\n}\n\nUpdate Pull Request\n\nPATCH /github/repos/{owner}/{repo}/pulls/{pull_number}\nContent-Type: application/json\n\n{\n  \"title\": \"Updated title\",\n  \"state\": \"closed\"\n}\n\nList Pull Request Commits\n\nGET /github/repos/{owner}/{repo}/pulls/{pull_number}/commits?per_page=30\n\nList Pull Request Files\n\nGET /github/repos/{owner}/{repo}/pulls/{pull_number}/files?per_page=30\n\nCheck If Merged\n\nGET /github/repos/{owner}/{repo}/pulls/{pull_number}/merge\n\nMerge Pull Request\n\nPUT /github/repos/{owner}/{repo}/pulls/{pull_number}/merge\nContent-Type: application/json\n\n{\n  \"commit_title\": \"Merge pull request\",\n  \"merge_method\": \"squash\"\n}\n\nMerge methods: merge, squash, rebase"
      },
      {
        "title": "Pull Request Reviews",
        "body": "List Reviews\n\nGET /github/repos/{owner}/{repo}/pulls/{pull_number}/reviews?per_page=30\n\nCreate Review\n\nPOST /github/repos/{owner}/{repo}/pulls/{pull_number}/reviews\nContent-Type: application/json\n\n{\n  \"body\": \"Looks good!\",\n  \"event\": \"APPROVE\"\n}\n\nEvents: APPROVE, REQUEST_CHANGES, COMMENT"
      },
      {
        "title": "Search",
        "body": "Search Repositories\n\nGET /github/search/repositories?q={query}&per_page=30\n\nExample queries:\n\ntetris+language:python - Repositories with \"tetris\" in Python\nreact+stars:>10000 - Repositories with \"react\" and 10k+ stars\n\nSearch Issues\n\nGET /github/search/issues?q={query}&per_page=30\n\nExample queries:\n\nbug+is:open+is:issue - Open issues containing \"bug\"\nauthor:username+is:pr - Pull requests by author\n\nSearch Code\n\nGET /github/search/code?q={query}&per_page=30\n\nExample queries:\n\naddClass+repo:facebook/react - Search for \"addClass\" in a specific repo\nfunction+extension:js - JavaScript functions\n\nNote: Code search may timeout on broad queries.\n\nSearch Users\n\nGET /github/search/users?q={query}&per_page=30"
      },
      {
        "title": "Organizations",
        "body": "List User Organizations\n\nGET /github/user/orgs?per_page=30\n\nNote: Requires read:org scope.\n\nGet Organization\n\nGET /github/orgs/{org}\n\nList Organization Members\n\nGET /github/orgs/{org}/members?per_page=30"
      },
      {
        "title": "Rate Limit",
        "body": "Get Rate Limit\n\nGET /github/rate_limit\n\nResponse:\n\n{\n  \"rate\": {\n    \"limit\": 5000,\n    \"remaining\": 4979,\n    \"reset\": 1707200000\n  },\n  \"resources\": {\n    \"core\": { \"limit\": 5000, \"remaining\": 4979 },\n    \"search\": { \"limit\": 30, \"remaining\": 28 }\n  }\n}"
      },
      {
        "title": "Pagination",
        "body": "GitHub uses page-based and link-based pagination:\n\nGET /github/repos/{owner}/{repo}/issues?per_page=30&page=2\n\nResponse headers include pagination links:\n\nLink: <url>; rel=\"next\", <url>; rel=\"last\"\n\nCommon pagination parameters:\n\nper_page: Results per page (max 100, default 30)\npage: Page number (default 1)\n\nSome endpoints use cursor-based pagination with since parameter (e.g., listing users)."
      },
      {
        "title": "JavaScript",
        "body": "const response = await fetch(\n  'https://gateway.maton.ai/github/repos/owner/repo/issues?state=open&per_page=10',\n  {\n    headers: {\n      'Authorization': `Bearer ${process.env.MATON_API_KEY}`\n    }\n  }\n);\nconst issues = await response.json();"
      },
      {
        "title": "Python",
        "body": "import os\nimport requests\n\nresponse = requests.get(\n    'https://gateway.maton.ai/github/repos/owner/repo/issues',\n    headers={'Authorization': f'Bearer {os.environ[\"MATON_API_KEY\"]}'},\n    params={'state': 'open', 'per_page': 10}\n)\nissues = response.json()"
      },
      {
        "title": "Notes",
        "body": "Repository names are case-insensitive but the API preserves case\nIssue numbers and PR numbers share the same sequence per repository\nContent must be Base64 encoded when creating/updating files\nRate limits: 5000 requests/hour for authenticated users, 30 searches/minute\nSearch queries may timeout on very broad patterns\nSome endpoints require specific OAuth scopes (e.g., read:org for organization operations). If you receive a scope error, contact Maton support at support@maton.ai with the specific operations/APIs you need and your use-case\nIMPORTANT: When using curl commands, use curl -g when URLs contain brackets to disable glob parsing\nIMPORTANT: When piping curl output to jq or other commands, environment variables like $MATON_API_KEY may not expand correctly in some shell environments"
      },
      {
        "title": "Error Handling",
        "body": "StatusMeaning400Missing GitHub connection401Invalid or missing Maton API key403Forbidden - insufficient permissions or scope404Resource not found408Request timeout (common for complex searches)422Validation failed429Rate limited4xx/5xxPassthrough error from GitHub API"
      },
      {
        "title": "Troubleshooting: API Key Issues",
        "body": "Check that the MATON_API_KEY environment variable is set:\n\necho $MATON_API_KEY\n\nVerify the API key is valid by listing connections:\n\npython <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://ctrl.maton.ai/connections')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF"
      },
      {
        "title": "Troubleshooting: Invalid App Name",
        "body": "Ensure your URL path starts with github. For example:\n\nCorrect: https://gateway.maton.ai/github/user\nIncorrect: https://gateway.maton.ai/api.github.com/user"
      },
      {
        "title": "Resources",
        "body": "GitHub REST API Documentation\nRepositories API\nIssues API\nPull Requests API\nSearch API\nRate Limits\nMaton Community\nMaton Support"
      }
    ],
    "body": "GitHub\n\nAccess the GitHub REST API with managed OAuth authentication. Manage repositories, issues, pull requests, commits, branches, users, and more.\n\nQuick Start\n# Get authenticated user\npython <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://gateway.maton.ai/github/user')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n\nBase URL\nhttps://gateway.maton.ai/github/{native-api-path}\n\n\nReplace {native-api-path} with the actual GitHub API endpoint path. The gateway proxies requests to api.github.com and automatically injects your OAuth token.\n\nAuthentication\n\nAll requests require the Maton API key in the Authorization header:\n\nAuthorization: Bearer $MATON_API_KEY\n\n\nEnvironment Variable: Set your API key as MATON_API_KEY:\n\nexport MATON_API_KEY=\"YOUR_API_KEY\"\n\nGetting Your API Key\nSign in or create an account at maton.ai\nGo to maton.ai/settings\nCopy your API key\nConnection Management\n\nManage your GitHub OAuth connections at https://ctrl.maton.ai.\n\nList Connections\npython <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://ctrl.maton.ai/connections?app=github&status=ACTIVE')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n\nCreate Connection\npython <<'EOF'\nimport urllib.request, os, json\ndata = json.dumps({'app': 'github'}).encode()\nreq = urllib.request.Request('https://ctrl.maton.ai/connections', data=data, method='POST')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nreq.add_header('Content-Type', 'application/json')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n\nGet Connection\npython <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://ctrl.maton.ai/connections/{connection_id}')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n\n\nResponse:\n\n{\n  \"connection\": {\n    \"connection_id\": \"83e7c665-60f6-4a64-816c-5e287ea8982f\",\n    \"status\": \"ACTIVE\",\n    \"creation_time\": \"2026-02-06T03:00:43.860014Z\",\n    \"last_updated_time\": \"2026-02-06T03:01:06.027323Z\",\n    \"url\": \"https://connect.maton.ai/?session_token=...\",\n    \"app\": \"github\",\n    \"metadata\": {}\n  }\n}\n\n\nOpen the returned url in a browser to complete OAuth authorization.\n\nDelete Connection\npython <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://ctrl.maton.ai/connections/{connection_id}', method='DELETE')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n\nSpecifying Connection\n\nIf you have multiple GitHub connections, specify which one to use with the Maton-Connection header:\n\npython <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://gateway.maton.ai/github/user')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nreq.add_header('Maton-Connection', '83e7c665-60f6-4a64-816c-5e287ea8982f')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n\n\nIf omitted, the gateway uses the default (oldest) active connection.\n\nAPI Reference\nUsers\nGet Authenticated User\nGET /github/user\n\nGet User by Username\nGET /github/users/{username}\n\nList Users\nGET /github/users?since={user_id}&per_page=30\n\nRepositories\nList User Repositories\nGET /github/user/repos?per_page=30&sort=updated\n\n\nQuery parameters: type (all, owner, public, private, member), sort (created, updated, pushed, full_name), direction (asc, desc), per_page, page\n\nList Organization Repositories\nGET /github/orgs/{org}/repos?per_page=30\n\nGet Repository\nGET /github/repos/{owner}/{repo}\n\nCreate Repository (User)\nPOST /github/user/repos\nContent-Type: application/json\n\n{\n  \"name\": \"my-new-repo\",\n  \"description\": \"A new repository\",\n  \"private\": true,\n  \"auto_init\": true\n}\n\nCreate Repository (Organization)\nPOST /github/orgs/{org}/repos\nContent-Type: application/json\n\n{\n  \"name\": \"my-new-repo\",\n  \"description\": \"A new repository\",\n  \"private\": true\n}\n\nUpdate Repository\nPATCH /github/repos/{owner}/{repo}\nContent-Type: application/json\n\n{\n  \"description\": \"Updated description\",\n  \"has_issues\": true,\n  \"has_wiki\": false\n}\n\nDelete Repository\nDELETE /github/repos/{owner}/{repo}\n\nRepository Contents\nList Contents\nGET /github/repos/{owner}/{repo}/contents/{path}\n\nGet File Contents\nGET /github/repos/{owner}/{repo}/contents/{path}?ref={branch}\n\nCreate or Update File\nPUT /github/repos/{owner}/{repo}/contents/{path}\nContent-Type: application/json\n\n{\n  \"message\": \"Create new file\",\n  \"content\": \"SGVsbG8gV29ybGQh\",\n  \"branch\": \"main\"\n}\n\n\nNote: content must be Base64 encoded.\n\nDelete File\nDELETE /github/repos/{owner}/{repo}/contents/{path}\nContent-Type: application/json\n\n{\n  \"message\": \"Delete file\",\n  \"sha\": \"{file_sha}\",\n  \"branch\": \"main\"\n}\n\nBranches\nList Branches\nGET /github/repos/{owner}/{repo}/branches?per_page=30\n\nGet Branch\nGET /github/repos/{owner}/{repo}/branches/{branch}\n\nRename Branch\nPOST /github/repos/{owner}/{repo}/branches/{branch}/rename\nContent-Type: application/json\n\n{\n  \"new_name\": \"new-branch-name\"\n}\n\nMerge Branches\nPOST /github/repos/{owner}/{repo}/merges\nContent-Type: application/json\n\n{\n  \"base\": \"main\",\n  \"head\": \"feature-branch\",\n  \"commit_message\": \"Merge feature branch\"\n}\n\nCommits\nList Commits\nGET /github/repos/{owner}/{repo}/commits?per_page=30\n\n\nQuery parameters: sha (branch name or commit SHA), path (file path), author, committer, since, until, per_page, page\n\nGet Commit\nGET /github/repos/{owner}/{repo}/commits/{ref}\n\nCompare Two Commits\nGET /github/repos/{owner}/{repo}/compare/{base}...{head}\n\nIssues\nList Repository Issues\nGET /github/repos/{owner}/{repo}/issues?state=open&per_page=30\n\n\nQuery parameters: state (open, closed, all), labels, assignee, creator, mentioned, sort, direction, since, per_page, page\n\nGet Issue\nGET /github/repos/{owner}/{repo}/issues/{issue_number}\n\nCreate Issue\nPOST /github/repos/{owner}/{repo}/issues\nContent-Type: application/json\n\n{\n  \"title\": \"Found a bug\",\n  \"body\": \"Bug description here\",\n  \"labels\": [\"bug\"],\n  \"assignees\": [\"username\"]\n}\n\nUpdate Issue\nPATCH /github/repos/{owner}/{repo}/issues/{issue_number}\nContent-Type: application/json\n\n{\n  \"state\": \"closed\",\n  \"state_reason\": \"completed\"\n}\n\nLock Issue\nPUT /github/repos/{owner}/{repo}/issues/{issue_number}/lock\nContent-Type: application/json\n\n{\n  \"lock_reason\": \"resolved\"\n}\n\nUnlock Issue\nDELETE /github/repos/{owner}/{repo}/issues/{issue_number}/lock\n\nIssue Comments\nList Issue Comments\nGET /github/repos/{owner}/{repo}/issues/{issue_number}/comments?per_page=30\n\nCreate Issue Comment\nPOST /github/repos/{owner}/{repo}/issues/{issue_number}/comments\nContent-Type: application/json\n\n{\n  \"body\": \"This is a comment\"\n}\n\nUpdate Issue Comment\nPATCH /github/repos/{owner}/{repo}/issues/comments/{comment_id}\nContent-Type: application/json\n\n{\n  \"body\": \"Updated comment\"\n}\n\nDelete Issue Comment\nDELETE /github/repos/{owner}/{repo}/issues/comments/{comment_id}\n\nLabels\nList Labels\nGET /github/repos/{owner}/{repo}/labels?per_page=30\n\nCreate Label\nPOST /github/repos/{owner}/{repo}/labels\nContent-Type: application/json\n\n{\n  \"name\": \"priority:high\",\n  \"color\": \"ff0000\",\n  \"description\": \"High priority issues\"\n}\n\nMilestones\nList Milestones\nGET /github/repos/{owner}/{repo}/milestones?state=open&per_page=30\n\nCreate Milestone\nPOST /github/repos/{owner}/{repo}/milestones\nContent-Type: application/json\n\n{\n  \"title\": \"v1.0\",\n  \"state\": \"open\",\n  \"description\": \"First release\",\n  \"due_on\": \"2026-03-01T00:00:00Z\"\n}\n\nPull Requests\nList Pull Requests\nGET /github/repos/{owner}/{repo}/pulls?state=open&per_page=30\n\n\nQuery parameters: state (open, closed, all), head, base, sort, direction, per_page, page\n\nGet Pull Request\nGET /github/repos/{owner}/{repo}/pulls/{pull_number}\n\nCreate Pull Request\nPOST /github/repos/{owner}/{repo}/pulls\nContent-Type: application/json\n\n{\n  \"title\": \"New feature\",\n  \"body\": \"Description of changes\",\n  \"head\": \"feature-branch\",\n  \"base\": \"main\",\n  \"draft\": false\n}\n\nUpdate Pull Request\nPATCH /github/repos/{owner}/{repo}/pulls/{pull_number}\nContent-Type: application/json\n\n{\n  \"title\": \"Updated title\",\n  \"state\": \"closed\"\n}\n\nList Pull Request Commits\nGET /github/repos/{owner}/{repo}/pulls/{pull_number}/commits?per_page=30\n\nList Pull Request Files\nGET /github/repos/{owner}/{repo}/pulls/{pull_number}/files?per_page=30\n\nCheck If Merged\nGET /github/repos/{owner}/{repo}/pulls/{pull_number}/merge\n\nMerge Pull Request\nPUT /github/repos/{owner}/{repo}/pulls/{pull_number}/merge\nContent-Type: application/json\n\n{\n  \"commit_title\": \"Merge pull request\",\n  \"merge_method\": \"squash\"\n}\n\n\nMerge methods: merge, squash, rebase\n\nPull Request Reviews\nList Reviews\nGET /github/repos/{owner}/{repo}/pulls/{pull_number}/reviews?per_page=30\n\nCreate Review\nPOST /github/repos/{owner}/{repo}/pulls/{pull_number}/reviews\nContent-Type: application/json\n\n{\n  \"body\": \"Looks good!\",\n  \"event\": \"APPROVE\"\n}\n\n\nEvents: APPROVE, REQUEST_CHANGES, COMMENT\n\nSearch\nSearch Repositories\nGET /github/search/repositories?q={query}&per_page=30\n\n\nExample queries:\n\ntetris+language:python - Repositories with \"tetris\" in Python\nreact+stars:>10000 - Repositories with \"react\" and 10k+ stars\nSearch Issues\nGET /github/search/issues?q={query}&per_page=30\n\n\nExample queries:\n\nbug+is:open+is:issue - Open issues containing \"bug\"\nauthor:username+is:pr - Pull requests by author\nSearch Code\nGET /github/search/code?q={query}&per_page=30\n\n\nExample queries:\n\naddClass+repo:facebook/react - Search for \"addClass\" in a specific repo\nfunction+extension:js - JavaScript functions\n\nNote: Code search may timeout on broad queries.\n\nSearch Users\nGET /github/search/users?q={query}&per_page=30\n\nOrganizations\nList User Organizations\nGET /github/user/orgs?per_page=30\n\n\nNote: Requires read:org scope.\n\nGet Organization\nGET /github/orgs/{org}\n\nList Organization Members\nGET /github/orgs/{org}/members?per_page=30\n\nRate Limit\nGet Rate Limit\nGET /github/rate_limit\n\n\nResponse:\n\n{\n  \"rate\": {\n    \"limit\": 5000,\n    \"remaining\": 4979,\n    \"reset\": 1707200000\n  },\n  \"resources\": {\n    \"core\": { \"limit\": 5000, \"remaining\": 4979 },\n    \"search\": { \"limit\": 30, \"remaining\": 28 }\n  }\n}\n\nPagination\n\nGitHub uses page-based and link-based pagination:\n\nGET /github/repos/{owner}/{repo}/issues?per_page=30&page=2\n\n\nResponse headers include pagination links:\n\nLink: <url>; rel=\"next\", <url>; rel=\"last\"\n\nCommon pagination parameters:\n\nper_page: Results per page (max 100, default 30)\npage: Page number (default 1)\n\nSome endpoints use cursor-based pagination with since parameter (e.g., listing users).\n\nCode Examples\nJavaScript\nconst response = await fetch(\n  'https://gateway.maton.ai/github/repos/owner/repo/issues?state=open&per_page=10',\n  {\n    headers: {\n      'Authorization': `Bearer ${process.env.MATON_API_KEY}`\n    }\n  }\n);\nconst issues = await response.json();\n\nPython\nimport os\nimport requests\n\nresponse = requests.get(\n    'https://gateway.maton.ai/github/repos/owner/repo/issues',\n    headers={'Authorization': f'Bearer {os.environ[\"MATON_API_KEY\"]}'},\n    params={'state': 'open', 'per_page': 10}\n)\nissues = response.json()\n\nNotes\nRepository names are case-insensitive but the API preserves case\nIssue numbers and PR numbers share the same sequence per repository\nContent must be Base64 encoded when creating/updating files\nRate limits: 5000 requests/hour for authenticated users, 30 searches/minute\nSearch queries may timeout on very broad patterns\nSome endpoints require specific OAuth scopes (e.g., read:org for organization operations). If you receive a scope error, contact Maton support at support@maton.ai with the specific operations/APIs you need and your use-case\nIMPORTANT: When using curl commands, use curl -g when URLs contain brackets to disable glob parsing\nIMPORTANT: When piping curl output to jq or other commands, environment variables like $MATON_API_KEY may not expand correctly in some shell environments\nError Handling\nStatus\tMeaning\n400\tMissing GitHub connection\n401\tInvalid or missing Maton API key\n403\tForbidden - insufficient permissions or scope\n404\tResource not found\n408\tRequest timeout (common for complex searches)\n422\tValidation failed\n429\tRate limited\n4xx/5xx\tPassthrough error from GitHub API\nTroubleshooting: API Key Issues\nCheck that the MATON_API_KEY environment variable is set:\necho $MATON_API_KEY\n\nVerify the API key is valid by listing connections:\npython <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://ctrl.maton.ai/connections')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n\nTroubleshooting: Invalid App Name\nEnsure your URL path starts with github. For example:\nCorrect: https://gateway.maton.ai/github/user\nIncorrect: https://gateway.maton.ai/api.github.com/user\nResources\nGitHub REST API Documentation\nRepositories API\nIssues API\nPull Requests API\nSearch API\nRate Limits\nMaton Community\nMaton Support"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/byungkyu/github-api",
    "publisherUrl": "https://clawhub.ai/byungkyu/github-api",
    "owner": "byungkyu",
    "version": "1.0.3",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/github-api",
    "downloadUrl": "https://openagent3.xyz/downloads/github-api",
    "agentUrl": "https://openagent3.xyz/skills/github-api/agent",
    "manifestUrl": "https://openagent3.xyz/skills/github-api/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/github-api/agent.md"
  }
}