write-ci-workflow
Skill4 starsChanged 2 days agoApache-2.0View on GitHub
Create or change a GitHub Actions workflow in .github/workflows for Pnyx. Covers what the workflow proves, triggers and path filters that keep docs-only changes out of code checks, running safely on pull requests from forks, permissions, timeouts and concurrency, and checking a filter against real PR file lists. Read before adding or editing any workflow file.
In this repository17 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- audit-testsSkill
- deslopSkill
- follow-conventionsSkill
- review-codeSkill
- write-front-endSkill
- write-pull-requestSkill
- write-skillSkill
- inscribeSkill
- pnyx-arrange-columnsSkill
- pnyx-cliSkill
- pnyx-firstmate-as-hydraSkill
- pnyx-manage-workersSkill
- pnyx-orchestrateSkill
- pnyx-report-progressSkill
- pnyx-set-upSkill
The file
Files
Write a CI workflow
A check that runs on changes that cannot affect it, or fails for reasons unrelated to the change, teaches people to ignore red. Pick every trigger and permission on purpose.
- Say first what the workflow proves (the
pnpm verifymarker, the test suite), then trigger it only on the inputs that can change that result: the source it checks,package.json,pnpm-lock.yamland the workflow file itself. A check every PR needs, such as thepnpm verifymarker check, takes no path filter. - Keep docs-only changes out of code checks. GitHub applies
pathspatterns in order and the last match wins, so put'!**/*.md'after the positive patterns, then add back the Markdown that code reads:'skills/**'for the shipped skills and'**/fixtures/**'. - Treat every pull request as untrusted, since anyone can open one from a fork. A
pull_request_targetworkflow runs with base-branch secrets and permissions, so it must never check out, install or run PR code; read the PR through the API only, asverify.ymldoes. A workflow that runs PR code usespull_requestand starts only after a maintainer approves it. - Grant the least
permissionsthe job needs, declared at the top of the file, and passpersist-credentials: falsetoactions/checkoutunless a later step pushes. Never print a secret or pass one to PR code. - Set
timeout-minuteson every job and aconcurrencygroup per PR withcancel-in-progress: true, so a new push replaces the old run. - Use a Node version the project supports and the pnpm version it pins, so CI fails for the same reasons a contributor's machine would.
- Before pushing, check the filter against real file lists from
gh pr view <number> --json files: a merged docs-only PR must not trigger it, and a PR that changes the checked source must. Put both results in the PR description. - Describe when the workflow runs and what it checks in
docs/development.md, and updateCONTRIBUTING.mdif contributors see it as a PR check, in the same change.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

