agentleFS
d-o-hubd-o-hub/github-template-ai-agents/scripts/AGENTS.md

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…

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
  1. Distinctive:

    Do NOT modify without explicit user instruction:

    line 8
  2. Distinctive:

    Every script must detect repo root portably:

    line 19
  3. Very specific:

    Avoid generic Bash variables like temp_table in global scope.

    line 30
  4. Very specific:

    Use --severity=error in Shellcheck CI to prevent style warnings from blocking functional PRs (LESSON-014)

    line 32
  5. Very specific:

    Before deleting/merging a skill, grep across the entire repo: git grep -l <old-skill-name> will reveal all 5 doc locations that need …

    line 36
  6. Very specific:

    Must pass shellcheck with no warnings

    line 43
  7. Very specific:

    Must have a bats test if stateful

    line 44

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

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 gate
  • pre-commit-hook.sh - Git hook template
  • setup-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.sh must use set +e explicitly to allow full error report (LESSON-011)
  • Avoid generic Bash variables like temp_table in 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=error in 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 shellcheck and markdownlint are 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. Use MAX_SKILL_LINES=999 to 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

  1. Must pass shellcheck with no warnings
  2. Must have a bats test if stateful
  3. Add to agents-docs/SCRIPTS.md
  4. Use #!/usr/bin/env bash shebang

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.