gatefile
Reads repository docs, PR/issue templates, and CLA files via the GitHub API to extract contribution gates into a machine-readable contribution-gates.json file.
Validates committed contribution-gates.json against fresh extractions in CI, exiting with code 1 on drift so workflows can enforce gate accuracy.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@gatefileextract the contribution gates from shadcn-labs/pdfcn"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
gatefile
Hidden contribution gates, extracted into a file machines can read.
Every repo hides its real rules for outside contributors: comment before you start, wait to be assigned, sign off your commits, get vouched, sign a CLA. Today you discover those rules by getting your PR auto-closed. gatefile extracts them from the repo's own docs into contribution-gates.json, a machine-readable format that tools (like Greenlight) and CI can consume.
The problem
A contributor picks an issue, writes the code, opens the PR, and a bot closes it: "you were not assigned", "unvouched authors are auto-closed", "missing Signed-off-by". The rules were always in CONTRIBUTING.md, buried in prose, different on every repo. Maintainers repeat the same corrections; contributors waste the same evenings.
Related MCP server: Review Gate
What gatefile does
extract: reads CONTRIBUTING.md, PR and issue templates, DCO/CLA workflow files, lefthook hooks, and CLA files (from the GitHub API or a local directory) and emits the gates it finds, each with a real quoted line as evidence.
validate: compares a committed
contribution-gates.jsonagainst a fresh extraction and reports drift (STALE, MISSING, SEVERITY_CHANGED). Exit code 1 on drift, so CI can enforce it.badge: renders a README snippet that tells humans the gates in plain language.
The contribution-gates.json format
{
"version": 1,
"repo": "shadcn-labs/pdfcn",
"generatedFrom": ["CONTRIBUTING.md"],
"gates": [
{
"id": "claim_first",
"kind": "claim_first",
"severity": "blocker",
"evidence": "Comment before starting work, and check the thread first in case someone else is already working on it.",
"source": "CONTRIBUTING.md"
}
],
"conventions": {
"branchNaming": "Name your branch feat/block-name",
"prTitleFormat": "PR titles should follow Conventional Commits",
"requiredChecks": []
}
}Gate kinds
kind | severity | meaning |
| blocker | Comment on the issue before starting work |
| blocker | Wait to be assigned before opening a PR |
| blocker | Open a discussion or issue before coding |
| blocker | Every PR must be tied to an issue |
| blocker | An existing member must vouch for you |
| blocker | Only repo collaborators may open PRs |
| blocker | Direct PRs are not accepted |
| warn | Commits need a Signed-off-by trailer (DCO) |
| warn | A Contributor License Agreement must be signed |
Severity: blocker gates can get a PR closed or rejected before review. warn gates can be fixed after the PR opens. Evidence is always a real quote from the source file, trimmed to about 140 characters, never invented.
Usage
CLI
# Extract gates from a repo (GitHub API, GITHUB_TOKEN optional)
gatefile extract shadcn-labs/pdfcn
# Extract from a local clone instead (fully offline)
gatefile extract local --local ./pdfcn --out contribution-gates.json
# Validate the committed file against fresh docs, exit 1 on drift
gatefile validate shadcn-labs/pdfcn --file contribution-gates.json
# Print a README snippet for humans
gatefile badge shadcn-labs/pdfcnMCP server
Add to your MCP client config:
{
"mcpServers": {
"gatefile": {
"command": "node",
"args": ["/path/to/gatefile/dist/mcp.js"]
}
}
}Tools:
tool | inputs | what it returns |
|
| the full |
|
|
|
|
| README markdown snippet |
CI example
Keep the gates file honest in a GitHub Actions workflow:
name: gates
on:
pull_request:
paths: ["CONTRIBUTING.md", ".github/**", "contribution-gates.json"]
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: 20 }
- run: npx -y gatefile extract ${{ github.repository }} --out /tmp/fresh.json
- run: npx -y gatefile validate ${{ github.repository }} --file contribution-gates.jsonDevelopment
npm install
npm test # tsx --test, offline, 23 tests
npm run build # tsc to dist/
npm run dev -- extract owner/repo --jsonTypeScript ESM, Node 20+, zod for schemas, native fetch for the GitHub API. Tests use real-world fixtures in test/fixtures/ modeled on documented cases (comment-before-starting plus DCO plus issue-first; assignment-first; vouch-only; permissive).
License
MIT, Rene Turcios 2026.
The toolkit
This tool is one of four in a lifecycle for open-source contribution work, all published under the @reneturcios npm scope and each available as a CLI and an MCP server (<tool> mcp):
gatefile (
npx @reneturcios/gatefile) extracts a repo's contribution gates into a committedcontribution-gates.json.greenlight (
npx @reneturcios/greenlight) pre-flights issues (GO / RISKY / TAKEN / GATED / STALE), consumes gatefile's output incheckandscan, then claims, preps, and opens PRs.claimcheck (
npx @reneturcios/claimcheck) watches for stale claims and fixes parked on forks.prwatch (
npx @reneturcios/prwatch) triages your open PRs by what needs you right now.
This server cannot be deployed
Maintenance
Related MCP Connectors
Screens public GitHub repos and PRs to generate risk maps, findings, and merge-readiness signals.
Evaluates any GitHub repository for license risk, maintenance velocity, stars/forks, and security.
Audit GitHub repos for malicious and supply-chain code before you depend on them.
Monitor third-party API changes in GitHub repos, map breaks to files, open reviewable auto-fix PRs.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables deterministic behavioral regression review of pull-request diffs by checking changed code against approved incident-derived contracts. It exposes read-only tools to assess diffs and pull requests, list and fetch contracts, and report outcomes over stdio without mutating repositories.MIT

Review Gateofficial
FlicenseAqualityAmaintenanceAI code review against your team's own rules from your repository, before the pull request: two tools, review_changes and get_team_rules. Closed-source binary distributed via GitHub Releases; published in the official MCP Registry as dev.reviewgate/reviewgate.2-- AlicenseNot gradedqualityAmaintenanceEnables agents to verify README claims and apply structured edits that automatically revert if they fail the repository's gates.1Apache 2.0
- AlicenseAqualityAmaintenanceZero-dependency open-source contribution companion: repo rules and AI policy radar, evidence-backed issue briefs, pre-submit checks, and review coaching.9136 PyPI1MIT