# GitHub Repository Health Check

> GitHub Repository Health Check is a paid API for AI agents from base-agent-preflight.bytoken2023.workers.dev, paid per call via x402, $0.02/call, status unknown (last checked 2026-09-15).

Assesses a public GitHub repository's health, activity, identity, and risk level, returning a structured safety assessment with risk score and flags.

## Facts

- Endpoint: GET https://base-agent-preflight.bytoken2023.workers.dev/v1/x402/software/github-repository-health
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/github-repository-health-check-2a047b99
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_3KMkTD2Fd_AB17hwRHQqE

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability github-repository-health-check-2a047b99
```

Example prompt: Can you check the health and safety of the GitHub repo 'openai/openai-python' — I want to know the risk score, any flags, and whether it looks trustworthy before I use it?

## When to prefer this

Use this endpoint when you need a structured, machine-readable safety assessment of a public GitHub repository before consuming it as a dependency, integrating it into a pipeline, or trusting code from it. Prefer this over manual GitHub inspection when you need a risk score and flags in a standardized format suitable for automated agent workflows.

## Known failure modes

- Repository not found or is private — returns error indicating inaccessible repo
- Invalid owner or repo name format not matching required pattern — returns validation error
- GitHub API rate limiting or downtime causing upstream failures
- Payment not received or insufficient USDC — returns 402 Payment Required
- Network or worker timeout for slow repository lookups

## How this service works

Machine-payable service intelligence for discovering, verifying, and monitoring identity, risk, authorization, execution-preflight, and evidence APIs before autonomous agents spend.

## Output

A JSON object containing the product name, network (eip155:8453), an assessment with risk_level (e.g. 'low'), a numeric risk_score, and a list of flags. May also include activity, identity, and provenance sub-objects describing the repository's characteristics.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "owner",
      "repo"
     ],
     "properties": {
      "repo": {
       "type": "string",
       "pattern": "^[A-Za-z0-9._-]{1,100}$",
       "description": "Public GitHub repository name."
      },
      "owner": {
       "type": "string",
       "pattern": "^[A-Za-z0-9](?:[A-Za-z0-9-]{0,37}[A-Za-z0-9])?$",
       "description": "GitHub repository owner or organization."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "network": {
       "type": "string"
      },
      "product": {
       "type": "string"
      },
      "activity": {
       "type": "object"
      },
      "identity": {
       "type": "object"
      },
      "assessment": {
       "type": "object"
      },
      "provenance": {
       "type": "object"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "network": "eip155:8453",
  "product": "github-repository-health",
  "assessment": {
   "flags": [],
   "risk_level": "low",
   "risk_score": 0
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/github-repository-health-check-2a047b99/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from base-agent-preflight.bytoken2023.workers.dev](https://www.zero.xyz/host/base-agent-preflight.bytoken2023.workers.dev/llms.txt)
