web-of-flaws
AGENTS.md8 starsChanged 3 months agoMITView on GitHub
This directory contains GitHub Actions workflows, workflow-local shell scripts and tests, repository labels, Dependabot policy, and Copilot integration instructions.
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 35,337 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository8 other files it gives its agents.
- AGENTS.mdAGENTS.md
- catalog/AGENTS.mdAGENTS.md
- .github/actions/AGENTS.mdAGENTS.md
- .github/scripts/AGENTS.mdAGENTS.md
- guides/AGENTS.mdAGENTS.md
- scripts/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
36 rules. About 5 are common, 22 are distinctive, and 9 are very specific to this project.
≈5
Common · estimate
Many files like this have a rule of this kind.
≈22
Distinctive · estimate
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 17
Do not use mutable versions such as latest, main, master, next, or floating ranges.
- Distinctive: line 18
If a dependency cannot be pinned, report it explicitly and add a TODO comment explaining why.
- Distinctive: line 22
Use the minimum required permissions for each workflow and action.
- Distinctive: line 23
Prefer contents: read or no explicit write permissions for validation jobs.
- Distinctive: line 24
Do not grant repository-wide write permissions for convenience.
- Distinctive: line 25
Keep privileged operations isolated from validation and test logic.
- Common: line 32
Never pass secrets through command-line arguments when avoidable.
- Common: line 33
Never write secrets to outputs, logs, caches, or artifacts.
- Common: line 34
Avoid writing secrets to files.
- Common: line 37
Never cache secrets or store them in a way that they can be retrieved by unauthorized workflows or jobs.
- Distinctive: line 41
Avoid unnecessary network access in workflows and don't rely on network access for validation unless it is the explicit purpose of the …
- Distinctive: line 42
If you rely on external data, verify its integrity and authenticity.
- Distinctive: line 43
Add timeout-minutes to jobs that can hang or access external systems.
- Distinctive: line 44
Keep retry counts small and explicit.
- Distinctive: line 49
Treat caches only as performance optimizations.
- Distinctive: line 51
Treat artifacts downloaded from untrusted workflow runs as untrusted input.
- Common: line 53
Do not upload credentials, environment dumps, or sensitive runner state.
- Very specific: line 57
Use actions/checkout only when repository contents are required.
- Very specific: line 58
Use persist-credentials: false unless later authenticated Git operations are explicitly required.
- Distinctive: line 61
Never check out attacker-controlled refs in a privileged workflow context.
- Distinctive: line 65
Don't modify global runner state unless necessary.
- Very specific: line 66
Put complex shell/Python logic in .github/scripts/.
- Distinctive: line 67
Don't depend on commands that are not guaranteed to exist without installing them.
- Distinctive: line 68
Avoid obscure third-party actions when a few shell lines or an official action suffice.
- Distinctive: line 69
Prefer GitHub-authored or well-established actions and minimize the number of third-party actions.
- Distinctive: line 70
Do not use deprecated ::set-output command.
- Very specific: line 71
Do not manually overwrite GITHUB_* / RUNNER_* variables.
- Distinctive: line 72
Treat artifacts and metadata originating from untrusted workflows as untrusted.
- Very specific: line 73
Never execute untrusted PR-controlled code or artifacts inside a privileged workflow_run or pull_request_target context.
- Very specific: line 78
Always start with a descriptive name and appropriate on triggers.
- Very specific: line 80
Add concurrency when duplicate or stale runs can conflict, waste resources, or produce outdated results.
- Very specific: line 81
Prefer cancel-in-progress: true for replaceable PR validation.
- Distinctive: line 82
Do not cancel releases, publishing, deployments, migrations, or other stateful operations unless cancellation is explicitly safe.
- Distinctive: line 83
All steps should have descriptive names.
- Distinctive: line 84
Always try to make code self-explanatory and avoid unnecessary comments.
- Very specific: line 95
If label generation changes, run python3 scripts/check.py --check labels.
≈ “Common” is an estimate: at least 1 in 5 of the 45,344 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
GitHub Automation Instructions
Scope
This directory contains GitHub Actions workflows, workflow-local shell scripts and tests, repository labels, Dependabot policy, and Copilot integration instructions.
Coding Rules
Pin Every External Dependency To An Exact Version Whenever Possible
- For third-party GitHub Actions, pin to a full commit SHA.
- Retain the human-readable release as a comment:
uses: owner/action@<sha> # vX.Y.Z. - Pin language-specific dependencies to exact versions.
- Pin runtime versions such as Node.js, Python, Go, etc. Never use
latestwhen specifyingruns-onorsetup-<language>actions. - Pin system-level packages and external CLI tools when possible.
- Do not use mutable versions such as latest, main, master, next, or floating ranges.
- If a dependency cannot be pinned, report it explicitly and add a TODO comment explaining why.
Principle Of Least Privilege
- Use the minimum required permissions for each workflow and action.
- Prefer contents: read or no explicit write permissions for validation jobs.
- Do not grant repository-wide write permissions for convenience.
- Keep privileged operations isolated from validation and test logic.
- Prefer contents: read or no explicit write permissions for validation jobs.
- Never use
write-all.
Secrets
- Never print secrets.
- Never pass secrets through command-line arguments when avoidable.
- Never write secrets to outputs, logs, caches, or artifacts.
- Avoid writing secrets to files. If a tool requires it, use a temporary permission-restricted file and remove it immediately after use.
- Secrets must be accessed only by authorized workflows/jobs and the steps that require them.
- For greater control, prefer environment-specific secrets, which can be protected by manual approvals or specific branch conditions.
- Never cache secrets or store them in a way that they can be retrieved by unauthorized workflows or jobs.
Timeouts And Network Access
- Avoid unnecessary network access in workflows and don't rely on network access for validation unless it is the explicit purpose of the workflow. Always use timeouts for network operations to avoid hangs.
- If you rely on external data, verify its integrity and authenticity. Don't assume its shape and always check for missing or unexpected fields.
- Add timeout-minutes to jobs that can hang or access external systems.
- Keep retry counts small and explicit.
- Retry transient external failures, not deterministic validation failures.
Cache And Artifact Rules
- Treat caches only as performance optimizations; correctness must not depend on cache presence.
- Include relevant lockfile/configuration hashes in dependency cache keys.
- Treat artifacts downloaded from untrusted workflow runs as untrusted input.
- Upload only artifacts that are intentionally needed.
- Do not upload credentials, environment dumps, or sensitive runner state.
Checkout Rules
- Use
actions/checkoutonly when repository contents are required. - Use
persist-credentials: falseunless later authenticated Git operations are explicitly required. - Fetch only the history required by the workflow.
- Set
fetch-depthexplicitly when Git history or diff computation depends on it. - Never check out attacker-controlled refs in a privileged workflow context.
Other General Rules
- Don't modify global runner state unless necessary.
- Put complex shell/Python logic in
.github/scripts/; keep YAML declarative. - Don't depend on commands that are not guaranteed to exist without installing them.
- Avoid obscure third-party actions when a few shell lines or an official action suffice.
- Prefer GitHub-authored or well-established actions and minimize the number of third-party actions. Review what every third-party action can access if you use it.
- Do not use deprecated ::set-output command.
- Do not manually overwrite
GITHUB_*/RUNNER_*variables. - Treat artifacts and metadata originating from untrusted workflows as untrusted.
- Never execute untrusted PR-controlled code or artifacts inside a privileged
workflow_runorpull_request_targetcontext.
Workflow Structure Guidelines
- Workflows should be clear, modular, and easy to understand, promoting reusability and maintainability.
- Always start with a descriptive name and appropriate
ontriggers. Suggest granular triggers for specific use cases (e.g., on: push: branches: [main] vs. on: pull_request). - Define jobs with clear name and appropriate
runs-on(e.g., ubuntu-24.04). - Add
concurrencywhen duplicate or stale runs can conflict, waste resources, or produce outdated results. - Prefer
cancel-in-progress: truefor replaceable PR validation. - Do not cancel releases, publishing, deployments, migrations, or other stateful operations unless cancellation is explicitly safe.
- All steps should have descriptive names.
- Always try to make code self-explanatory and avoid unnecessary comments. If a comment is needed, explain the "why" rather than the "what."
Required Checks
yamllint .github
zizmor .github
actionlint
shellcheck .github/scripts/*.shIf label generation changes, run python3 scripts/check.py --check labels.
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.

