agentic-swe
Small GitHub Actions for agent-assisted software development.
- PR Agent repairs straightforward pull request conflicts and validates changes. It needs
OPENROUTER_API_KEY, a write-scopedPR_AGENT_TOKEN, a test command, and GitHub auto-merge enabled. - Documentation Guard keeps Markdown concise: 2,000 words for
README.md, 4,000 for other Markdown files. It needs no secrets.
Setup guide for repository maintainers
PR Agent
- In Settings → Secrets and variables → Actions, add
OPENROUTER_API_KEYandPR_AGENT_TOKEN. Use a fine-grained PAT or GitHub App token with Contents: write and Pull requests: write. Do not useGITHUB_TOKEN; its pushes normally do not trigger another CI run. - Add the workflow below. Replace
npm testwith your repository's deterministic validation command. - Enable Allow auto-merge and configure required branch checks. PR Agent skips fork pull requests and does not bypass branch protection.
name: PR Agent
on:
pull_request:
types: [opened, synchronize, reopened]
permissions:
contents: write
pull-requests: write
jobs:
agent:
uses: zc6600/agentic-swe/.github/workflows/pr-agent.yml@main
with:
validation-command: npm test
secrets:
OPENROUTER_API_KEY: ${{ secrets.OPENROUTER_API_KEY }}
PR_AGENT_TOKEN: ${{ secrets.PR_AGENT_TOKEN }}
Documentation Guard
Add this step to your CI workflow. It checks Markdown files and reports actionable GitHub annotations when a limit is exceeded. It requires no secrets.
- name: Check documentation length
uses: zc6600/agentic-swe@main
Integration instructions for coding agents
Copy these instructions into your coding agent. It can inspect the repository, choose the relevant action, and prepare the configuration. A maintainer must add PR Agent secrets in GitHub settings.
Integrate the appropriate agentic-swe GitHub Action into this repository.
1. Inspect the repository's language, package manager, default branch, existing CI, and real deterministic validation command.
2. Documentation Guard: if Markdown length checks are useful, add this step to the existing CI job:
- name: Check documentation length
uses: zc6600/agentic-swe@main
It checks README.md against 2,000 words and other .md/.mdx files against 4,000 words.
3. PR Agent: if automatic conflict repair is wanted, create `.github/workflows/pr-agent.yml` with this pattern. Replace `npm test` with the detected command:
name: PR Agent
on:
pull_request:
types: [opened, synchronize, reopened]
permissions:
contents: write
pull-requests: write
jobs:
agent:
uses: zc6600/agentic-swe/.github/workflows/pr-agent.yml@main
with:
validation-command: npm test
secrets:
OPENROUTER_API_KEY: ${{ secrets.OPENROUTER_API_KEY }}
PR_AGENT_TOKEN: ${{ secrets.PR_AGENT_TOKEN }}
4. Do not ask for, read, or write secret values. Tell the maintainer to add OPENROUTER_API_KEY and PR_AGENT_TOKEN in repository Actions settings. PR_AGENT_TOKEN needs Contents: write and Pull requests: write.
5. Tell the maintainer to enable GitHub auto-merge and required branch checks. Fork PRs are skipped.
6. Validate the workflow configuration and report files changed, validation command, and remaining maintainer actions.
Never replace the repository's test command with `true`. For production, pin action references to a reviewed release or commit SHA.
Source: GitHub repository · PR Agent workflow · Documentation Guard action