GitHub Action 會在每個 pull request 上留下評論,說明它如何改變儲存庫對每個 AI 程式碼代理的分數。可自行選擇,僅在您的 CI 中執行。
AI 翻譯
A GitHub Action that comments on each pull request with how it changes the repo's score for each AI coding agent. Opt-in, and it runs only in your CI.
外掛TypeScriptGitHub @hsnice16上線中營運者未確認
試用過了嗎? 點一下就好,不需要登入。
GitHub Action 會在每個 pull request 上留下評論,說明它如何改變儲存庫的 Agent Friendly Code 分數。
AI 翻譯
GitHub Action that comments on each pull request with how it changes the repo's Agent Friendly Code score.
取自儲存庫 README
正在載入完整 README。 以下為已儲存的摘錄。
GitHub Action that comments on each pull request with how it changes the repo's Agent Friendly Code score — "this PR drops your Claude Code score by 4.1 points because it removed CI config."
Version: v0.1.6 — per-release plans live in tasks/ (one folder per version). Pin @v0 to follow the latest 0.x release; pin a precise tag (@v0.1.6) if you want to opt out of automatic minor/patch updates. Tracking task in the parent project: tasks/0.5.0/02-score-diff-on-pr.md.檢視完整 README ↗GitHub Action that checks AI agent readiness on every pull request: it comments with how the PR changes the repo's Agent Friendly Code score — "this PR drops your Claude Code score by 4.1 points because it removed CI config."
On every pull request, the action:
git worktree) with the bundled scorer.It reads files only — nothing from the PR is executed — and calls no server besides the GitHub API. The checks and per-agent weights are the same as on the website.
Walkthrough and FAQ: https://agentfriendlycode.com/action.
# .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@v7
with:
fetch-depth: 0
- uses: hsnice16/agent-friendly-action@v0
with:
agents-badge-token: ${{ secrets.AGENTS_BADGE_TOKEN }}
AGENTS_BADGE_TOKEN is an opt-in marker, not a credential: set it to any non-empty value in the repo's secrets to enable the comment. Unset, the action exits silently — which is also what happens on fork PRs, where secrets aren't passed. fetch-depth: 0 keeps the base commit local; without it the action fetches it from origin.
Use the pull_request trigger. The action also accepts pull_request_target, but that runs with a write token on fork PRs; it is safe only because the action never executes PR code, so don't add steps that do.
| Input | Required | Default | Description |
|---|---|---|---|
agents-badge-token | yes | — | Opt-in marker. The action exits silently when empty. |
github-token | no | ${{ github.token }} | Posts and edits the comment. A GitHub App installation token or a PAT also works. |
base-ref | no | the PR's base commit | A branch, tag, SHA or revision such as HEAD~1 to compare against instead. |
A template or starter repo can ship this workflow without it commenting on every copy; only repos that set the secret get the comment.
The scorer is vendored from agent-friendly-code and bundled into dist/, so the action keeps working if the website is down.
agent-friendly-code — the website and the canonical scorer.agent-friendly-skill — the same scorer in your editor; scores the local repo and recommends a model class. Install: npx skills add hsnice16/agent-friendly-skill#v0. Details: https://agentfriendlycode.com/skill.