Agent Friendly Action: score every pull request
A GitHub Action that comments on every pull request with how it changes your score. For example: “this PR drops your Claude Code score by 4.1 points because it removed CI config”. It runs only in your CI, with no outside server, and you turn it on with one secret.
Check the score on every pull request
Add this file to your repo. On each pull request, it posts one comment showing how the score changed and why. It runs in your own CI, with no outside server involved.
# .github/workflows/agent-friendly.yml
name: Agent-friendly score diff
on:
pull_request:
branches: [main]
permissions:
contents: read
pull-requests: write
jobs:
score-diff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: hsnice16/agent-friendly-action@v0
with:
agents-badge-token: ${{ secrets.AGENTS_BADGE_TOKEN }}Add AGENTS_BADGE_TOKENto the repo's secrets to turn the comment on. Without it, the action does nothing.
Set the AGENTS_BADGE_TOKEN secret
The action only fires when AGENTS_BADGE_TOKEN is set. It's an on switch, not a password. Add it once and you're done:
- In your repo, open Settings → Secrets and variables → Actions.
- Click New repository secret.
- Name:
AGENTS_BADGE_TOKEN. Value: any text, for exampleenabled. The value itself isn't checked. - Click Add secret. The action runs on your next pull request.
GitHub's guide: docs.github.com — encrypted secrets .
How it works
actions/checkoutwithfetch-depth: 0gives the action the pull request and the history of the branch it targets.- The action checks out the target branch from that history, fetching just that commit if it is missing. No full clone.
- It scores both versions and works out what changed: overall, for each check, and for each agent.
- It posts one comment on the pull request (or updates it), marked with
<!-- agent-friendly-action -->.
Works on its own
The scoring code and weights are packed into dist/ via @vercel/ncc. If Agent Friendly Code goes offline tomorrow, the action keeps working the same way. Downloading fresh weights from a future /api/weights endpoint waits until v1.0.0, when weights will be based on real tests. Until then, both versions are scored with the same weights, so the comparison stays fair.
FAQ
- What does the action do on a pull request?
It runs in your own CI, with no outside server involved. It scores the pull request and the branch it targets, then posts one comment showing how the overall score changed and which checks changed. On the next push it updates that same comment instead of adding a new one.
- Why is AGENTS_BADGE_TOKEN required?
It's an on switch, not a password or API key. Set it to any text to turn the comment on. Leave it unset and the action quietly does nothing. This lets template and starter repos include the workflow without it running in every fork or copy.
- Does it contact this website?
No. The scoring code and weights are packed into the action itself (its dist folder, built with @vercel/ncc). If this site goes offline, the action keeps working the same way. Once weights are based on real tests (version 1.0.0), a later version may optionally download fresh weights from /api/weights.
- Does it work on private repos?
Yes. It runs in your CI with your existing GITHUB_TOKEN. The action never sends your code anywhere. All scoring happens on the CI machine.
- Where is the source?
github.com/hsnice16/agent-friendly-action. It's MIT-licensed and uses version tags. Use @v0 to always get the latest 0.x release. Use @v0.1.0 to stay on one exact version with no automatic updates.
Source
github.com/hsnice16/agent-friendly-action — MIT-licensed, with version tags. Listed on the GitHub Marketplace under Code Quality / Continuous Integration.