mirror of
https://github.com/base44/skills.git
synced 2026-09-14 16:22:01 +08:00
64 lines
4.0 KiB
YAML
64 lines
4.0 KiB
YAML
name: README Check
|
|
|
|
on:
|
|
pull_request:
|
|
types: [opened, synchronize, ready_for_review, reopened]
|
|
paths:
|
|
- "skills/**"
|
|
workflow_dispatch:
|
|
# Run from Actions tab to test: use a branch that has an open PR, or run on default to see check result in the job log only.
|
|
|
|
jobs:
|
|
readme-check:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
pull-requests: write
|
|
issues: read
|
|
id-token: write
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
ref: ${{ github.event.pull_request.head.ref }}
|
|
fetch-depth: 1
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Run Claude README Check
|
|
id: claude-readme-check
|
|
uses: anthropics/claude-code-action@v1
|
|
with:
|
|
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
|
|
prompt: |
|
|
You are checking whether README.md is still accurate after the changes in this PR.
|
|
|
|
GROUND TRUTH (read from the repo):
|
|
1. List all directories directly under skills/ (e.g. skills/base44-cli/, skills/base44-sdk/). Each directory that contains a SKILL.md is a published skill.
|
|
2. For each skill, read its SKILL.md and extract the YAML frontmatter fields:
|
|
- `name` — the skill identifier
|
|
- `description` — the skill description (take only the first sentence or a concise summary, max ~20 words, to match the README table style)
|
|
3. Check that CONTRIBUTING.md and LICENSE files exist at the repo root (these are linked from the README).
|
|
|
|
COMPARE AGAINST README.md:
|
|
- Available skills table: Every skill directory under skills/ that has a SKILL.md must have a row in the "Available skills" table. The link should point to skills/<name>/SKILL.md. The description should be a concise summary that reflects the skill's frontmatter description. Any row for a skill that no longer exists must be removed.
|
|
- Installation section: The install command must reference `base44/skills` (the repo path).
|
|
- Links: The CONTRIBUTING.md and LICENSE links at the bottom must point to files that exist in the repo.
|
|
|
|
PR number for this run (use this exact number in gh pr comment; if blank/empty, do not comment—print conclusion to the terminal only): ${{ github.event.pull_request.number }}
|
|
|
|
RULES:
|
|
1. If everything matches, do nothing and exit.
|
|
2. If you find discrepancies: Update README.md with the correct content (use the Write or Edit tool). If the PR number line above has a number (i.e. this is a PR-triggered run), commit and push the fix by running each git command as a SEPARATE Bash call (do NOT chain with && or ;):
|
|
- git config user.name "github-actions[bot]"
|
|
- git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
- git add README.md
|
|
- git commit -m "docs: update README to match skills (skill table, install, or links)"
|
|
- git push
|
|
Then post one short comment with gh pr comment <that number> --body "..." summarizing what was fixed (e.g. "README check ran. N issue(s) found and applied: [brief list]. README.md has been updated in this branch."; escape the body for the shell).
|
|
IMPORTANT: Only post the comment AFTER confirming that git push succeeded. If any step failed, say so in the comment.
|
|
If the PR number is empty (manual/workflow_dispatch run), do NOT run git push. Instead, print the summary of discrepancies to the terminal so the user can review them.
|
|
3. The PR comment or terminal output must only state that the check ran and the conclusion. Do not paste full diffs or long suggestion lists.
|
|
claude_args: '--allowed-tools Read Glob Grep Write Edit "Bash(gh pr comment:*)" "Bash(git config *)" "Bash(git add *)" "Bash(git commit *)" "Bash(git push)" "Bash(git push *)"'
|
|
allowed_bots: 'claude[bot]'
|