{"uid":"cap_ve1W1CPzJbDqcnLLEHNnK","slug":"forest-infra-github-file-preflight-df497d8e","name":"Forest Infra – GitHub File Preflight","description":"Check lightweight metadata for a path in a public GitHub repository at an optional ref. It does not clone or download large file contents. Base mainnet USDC","url":"https://http--forest-gas-station-mainnet--lcjl27p8lmjs.code.run/repo/file-preflight?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"ref":{"type":"string","maxLength":256,"minLength":1,"description":"Repository branch whose current state should be checked."},"path":{"type":"string","maxLength":1024,"minLength":1,"description":"Repository file path whose public metadata should be checked."},"repository":{"type":"string","pattern":"^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$","maxLength":200,"description":"Public owner/name repository to inspect."}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_vggAP9TUjX7WhOSltMAMT","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Fetches lightweight metadata (size, type, SHA, existence) for a file path in a public GitHub repository at an optional ref, without cloning or downloading file contents.","exampleAgentPrompt":"Can you check if the file 'src/config/settings.yaml' exists in the 'main' branch of the public repo 'acme-org/backend-service' on GitHub, and tell me its size and SHA without downloading it?","exampleUseCases":[{"title":"Verify config file before workflow","prompt":"Before I kick off the build pipeline, check whether '.github/workflows/deploy.yml' exists on the 'release' branch of 'myorg/myapp' and tell me its file size."},{"title":"Pre-download size check for large asset","prompt":"Can you look up the metadata for 'data/training_set.csv' in the 'main' branch of 'ml-team/datasets' so I know how big the file is before I decide whether to download it?"},{"title":"Confirm schema file presence in open-source library","prompt":"Check if 'openapi.yaml' exists at the repo root in the 'stable' branch of 'openapi-tools/spec-generator' — I just need to know if it's there and its SHA, no need to fetch the actual content."}],"resultDescription":"Returns lightweight metadata about the specified file path in the GitHub repository: whether the path exists, the file type (file or directory), file size in bytes, and the Git SHA/blob hash — without transferring actual file contents.","failureModes":["Path does not exist at the given ref — returns not-found or null metadata","Repository is private or does not exist — access denied or not-found error","Invalid repository format (not owner/name pattern) — validation error","Invalid or non-existent ref/branch — not-found or error response","GitHub API rate limiting or temporary unavailability — upstream error"],"whenToPreferThis":"Use this endpoint when you need to confirm the existence, size, type, or SHA of a file in a public GitHub repository without the overhead of cloning or downloading file contents — ideal for preflight checks before expensive downloads, verifying schema or config file presence in CI/CD pipelines, or checking whether a dependency file exists at a specific branch.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T02:30:34.512Z","isFirstParty":false,"canonicalSlug":"forest-infra-github-file-preflight-df497d8e"}