Commit 4d0dfa8
committed
fix(agent-skills): generatedAt tracks the source, not the clock
`build-agent-skills-index.ts` sorted its entries with the comment "Sort
alphabetically for deterministic output" and then, two lines later, stamped
`generatedAt: new Date().toISOString()`. So every build rewrote a committed
file whose content was otherwise byte-identical, and left the working tree
dirty. I reverted that one-line diff by hand twice today before looking at why
it kept coming back.
The timestamp was churn dressed as information: it recorded when the build ran,
which no consumer of a `.well-known` index can act on, while each skill entry
already carries a `sha256` that answers the question that actually matters.
Now derived from the newest source `SKILL.md` mtime, so it changes when a skill
changes and not otherwise. Kept the field rather than dropping it: the
`$schema` URL the file advertises —
https://agentskills.io/schemas/v0.2.0/index.json — currently returns 404, so I
could not confirm whether `generatedAt` is required, and removing a field from
a published document on a guess is worse than making it truthful. That dead
schema URL is worth its own look; we are pointing consumers at a document that
does not exist.
Verified by running the generator twice: identical output both times, and the
committed file now carries the source mtime (2026-04-19) instead of a build
clock. Tree stays clean across builds.1 parent 890a809 commit 4d0dfa8
2 files changed
Lines changed: 22 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
| 122 | + | |
| 123 | + | |
122 | 124 | | |
123 | 125 | | |
124 | 126 | | |
| |||
132 | 134 | | |
133 | 135 | | |
134 | 136 | | |
| 137 | + | |
135 | 138 | | |
136 | 139 | | |
137 | 140 | | |
| |||
159 | 162 | | |
160 | 163 | | |
161 | 164 | | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
162 | 182 | | |
163 | 183 | | |
164 | | - | |
| 184 | + | |
165 | 185 | | |
166 | 186 | | |
167 | 187 | | |
| |||
0 commit comments