github-template-ai-agents / scripts
AGENTS.md2 starsChanged 9 days agoMITView on GitHub
Scoped guidance for agents working in this directory. Nearest AGENTS.md takes precedence over root. Do NOT modify without explicit user instruction: - quality_gate.sh - Core quality gate - pre-commit-hook.sh - Git hook template - setup-skills.sh - Skill symlink creation Scripts use snake_case.sh. New scripts must follow this convention. Every script must detect repo root portably: Never hardcode paths. - validate-skills.sh must use set +e explicitly to allow full error report (LESSON-011) - Avoid generic Bash variables like temp_table in global…
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 31,843 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 repository63 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .agents/skills/avoid-ai-writing/AGENTS.mdAGENTS.md
- .agents/skills/do-web-doc-resolver/AGENTS.mdAGENTS.md
- .agents/skills/skill-evaluator/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- llms-full.txtllms.txt
- llms.txtllms.txt
- accessibility-auditorSkill
- agent-browserSkill
- agentic-abstentionSkill
- agents-mdSkill
- api-design-firstSkill
- architecture-diagramSkill
- avoid-ai-writingSkill
- cicd-pipelineSkill
- cloudflare-worker-apiSkill
- codacySkill
- codeberg-apiSkill
- code-review-assistantSkill
- css-render-performanceSkill
- database-devopsSkill
- debuggerSkill
- delegateSkill
- dependency-upgradesSkill
- dist-channel-selectionSkill
- docs-hookSkill
- document-rendering-and-locatorsSkill
- dogfoodSkill
- dora-reportSkill
- do-web-doc-resolverSkill
- durable-objectsSkill
- eu-ai-act-complianceSkill
- git-github-workflowSkill
- goap-agentSkill
- implementerSkill
- intent-classifierSkill
- iterative-refinementSkill
- jules-delegatorSkill
- learnSkill
- lifecycle-managementSkill
- local-context-sanitizationSkill
- memory-contextSkill
- migration-refactoringSkill
- nested-build-isolationSkill
- privacy-firstSkill
- progressive-deliverySkill
- pwa-offline-syncSkill
- reader-ui-uxSkill
- readme-best-practicesSkill
- secrets-managementSkill
- secure-invite-and-accessSkill
- security-code-auditorSkill
- shell-script-qualitySkill
- skill-creatorSkill
- skill-evaluatorSkill
- static-analysisSkill
- testing-strategySkill
- test-runnerSkill
- triz-solverSkill
- turso-dbSkill
- The first 60 shown.
The file
We split this AGENTS.md into the rules it gives an agent
7 rules. About 0 are common, 2 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Do NOT modify without explicit user instruction:
- Distinctive: line 19
Every script must detect repo root portably:
- Very specific: line 30
Avoid generic Bash variables like temp_table in global scope.
- Very specific: line 32
Use --severity=error in Shellcheck CI to prevent style warnings from blocking functional PRs (LESSON-014)
- Very specific: line 36
Before deleting/merging a skill, grep across the entire repo: git grep -l <old-skill-name> will reveal all 5 doc locations that need …
- Very specific: line 43
Must pass shellcheck with no warnings
- Very specific: line 44
Must have a bats test if stateful
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 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
scripts/ AGENTS.md
Scoped guidance for agents working in this directory. Nearest AGENTS.md takes precedence over root.
Protected Scripts
Do NOT modify without explicit user instruction:
quality_gate.sh- Core quality gatepre-commit-hook.sh- Git hook templatesetup-skills.sh- Skill symlink creation
Naming Convention
Scripts use snake_case.sh. New scripts must follow this convention.
REPO_ROOT Detection
Every script must detect repo root portably:
REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"Never hardcode paths.
Non-Obvious Lessons
validate-skills.shmust useset +eexplicitly to allow full error report (LESSON-011)- Avoid generic Bash variables like
temp_tablein global scope; use script-specific prefixes (LESSON-012) - CI hangs can be caused by BATS recursion if a script under test calls BATS itself (LESSON-013)
- Use
--severity=errorin Shellcheck CI to prevent style warnings from blocking functional PRs (LESSON-014) - GitHub API 403 errors in CI usually mean the workflow needs explicit
permissions: issues: write(LESSON-015) - Linting results for
shellcheckandmarkdownlintare cached in.git/lint-cache/to speed up subsequent runs. The cache is per-file and aware of configuration changes. - The 250-line SKILL.md limit in
lib/skill-validation.sh(MAX_SKILL_LINES=250) is a WARNING, not a CI failure — it uses yellow ⚠ prefix without incrementing the FAILED counter. UseMAX_SKILL_LINES=999to suppress for legitimately long skills. - Before deleting/merging a skill, grep across the entire repo:
git grep -l <old-skill-name>will reveal all 5 doc locations that need updates (skill-rules.json, registry docs, llms-full.txt, agent configs, command files). - Repository and standalone skill-eval validators ship independently. Pin their acceptance parity with the same malformed/bucket/path fixtures, not just equal constants; both static commands must agree (LESSON-047).
Adding a New Script
- Must pass
shellcheckwith no warnings - Must have a
batstest if stateful - Add to
agents-docs/SCRIPTS.md - Use
#!/usr/bin/env bashshebang
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.

