claude-code-skills / scripts
AGENTS.md1 starsChanged 46 days agoMITView on GitHub
Holds attention-check.sh, this repo's per-project detector for the ~/projects Attention Hub (header: "S4.6"). It is not part of CI. The Hub collector, ~/projects/scripts/attention-collect.sh, runs it as bash <repo>/scripts/attention-check.sh 2>/dev/null from ~/projects and merges the output into wiki/attention/state.json.
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,774 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 repository16 other files it gives its agents.
- agents/AGENTS.mdAGENTS.md
- AGENTS.mdAGENTS.md
- examples/AGENTS.mdAGENTS.md
- .github/AGENTS.mdAGENTS.md
- .github/workflows/AGENTS.mdAGENTS.md
- skills/AGENTS.mdAGENTS.md
- skills/figma-handoff/AGENTS.mdAGENTS.md
- skills/github-pr-review/AGENTS.mdAGENTS.md
- skills/gmail-workflow/AGENTS.mdAGENTS.md
- skills/skill-compliance-checklist/AGENTS.mdAGENTS.md
- skills/skill-compliance-checklist/references/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- figma-handoffSkill
- github-pr-reviewSkill
- gmail-workflowSkill
- skill-compliance-checklistSkill
The file
We split this AGENTS.md into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 22
Keep set -uo pipefail without -e.
- Very specific: line 37
No skill currently has an eval directory, so each run raises one today signal per skill until evals are added.
≈ “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
<!-- Parent: ../AGENTS.md --><!-- Generated: 2026-06-30 | Updated: 2026-09-27 -->scripts/
Purpose
Holds attention-check.sh, this repo's per-project detector for the ~/projects Attention Hub (header: "S4.6"). It is not part of CI. The Hub collector, ~/projects/scripts/attention-collect.sh, runs it as bash <repo>/scripts/attention-check.sh 2>/dev/null from ~/projects and merges the output into wiki/attention/state.json.
Key Files
| File | Description |
attention-check.sh | Bash scanner with five detectors (missing evals, stale skills, uncommitted changes, missing SKILL.md, stale unmerged branches); prints a JSON array of signals to stdout, [scan] logs to stderr |
For AI Agents
Working In This Directory
- External contract: the collector depends on this exact path, exit status 0, and a JSON array on stdout. A non-zero exit or invalid JSON becomes a critical
scanner_faileditem in the Hub. Do not rename or move the file, and never print anything but the array to stdout. - Shebang is
#!/usr/bin/env bash, but the script also runs under macOS/bin/bash3.2 (verified 2026-09-27). Keep it that way — nodeclare -A,mapfile,${var,,}, or other Bash 4+ features. - Keep
set -uo pipefailwithout-e; detectors are meant to fail softly. - The runner loop reports any detector returning non-zero as a crash (score 40). End every detector on a successful command or
return 0— a barereturnafter a failed test (e.g.detect_stale_skillswhenskills/is missing) counts as a crash. emitpassestitleandbodythroughjson_escape, but notid. Branch or skill names containing"or\would yield invalid JSON — sanitise any newidinput.PROJECT_ROOTis derived from the script's own location, so any cwd works.PROJECTis hard-coded at the top of the script and embedded in every signal — update it if the project is renamed.
Testing Requirements
bash scripts/attention-check.sh 2>/dev/null | python3 -m json.toolmust parse; also run it once with/bin/bashto catch Bash 4-only syntax.- To add a detector: define
detect_*, emit only viaemit, and append its name to thefor detector in …loop at the bottom.
Common Patterns
- Signal schema:
{id, source, project, title, body, score, band};bandfromscore: ≥80 critical, ≥50 today, ≥30 soon, else ambient. - Current scores: missing SKILL.md 75; no
eval//test//tests/dir 55; stale skill 35/45/60 at 30/90/180 days since newest file mtime; uncommitted files 25/40/55/70 at 1/5/10/20 files; stale branch 30/40/50; detector crash 40; setup errors 15–20. Nothing reaches 80, so this script never emitscriticalitself. - No skill currently has an eval directory, so each run raises one
todaysignal per skill until evals are added. - Staleness uses the newest mtime of any file in the skill directory, so editing a skill's
AGENTS.mdresets it even whenSKILL.mdis untouched (the 2026-09-27 deepinit pass cleared all four stale-skill signals this way), and a fresh clone looks fresh. Key onSKILL.mdorgit logif that matters. - Stale-branch detection resolves the default branch from
origin/HEADand falls back tomain; this repo usesmaster, so whereorigin/HEADis unset the check silently finds nothing.
Dependencies
External
- Bash 3.2+, git,
find,date,stat(GNU-c '%Y'tried first, then BSD-f '%m') - Consumer:
~/projects/scripts/attention-collect.sh(outside this repo)
<!-- MANUAL: -->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.

