My Commit Log Remembered What My Chat History Forgot, So I Turned It Into 16 Agent Skills

12 minute read

Published:

Every correction I ever made to an AI writing partner was already sitting in my git history, dated, diffed, and impossible to argue with, and that history turned out to be a mine of reusable agent skills.

Author: Koutian Wu; GitHub: ktwu01

Here is the problem that kept nagging at me. A large language model, or LLM for short, meaning a model trained on huge amounts of text that can draft prose, write code, and edit files, can produce a scientific paragraph that reads beautifully and is still wrong in the ways that matter. It cites a review paper where a primary source was needed. It writes that one model outperformed another without naming a metric, a variable, or a time period. It starts coding a figure before anyone has decided what the figure is supposed to show. None of these are grammar problems. They are procedural problems, failures of the small operational judgments researchers pick up through years of getting things wrong and fixing them. An agent that starts fresh in every session accumulates none of that judgment, so it makes the same mistakes with great fluency, over and over again.

My own project handed me a way to watch that judgment form. For seven weeks, from February 22 to April 11, 2026, I worked on an AI-assisted computational geoscience project and committed everything to one repository, more than 150 commits in total. Three streams of work ran through it at once. I was validating a port of the Plant Hydraulics Scheme, or PHS for short, the part of a land surface model that simulates how water moves through plants, into version 5 of Noah-MP, a land surface model that simulates how land exchanges water and energy with the atmosphere. I was also writing a project proposal, and drafting a review paper on land surface model development. Around me sat Cursor, an AI coding environment, Claude Code, an agent that works from the command line, a high performance computing cluster, GitHub, observational data from AmeriFlux, a network of sites measuring carbon, water, and energy fluxes, and the Noah-MP codebase itself. Every fix and frustrated rewrite landed in the log with a timestamp.

So instead of treating that log as a productivity trace, I treated it as a record of procedural learning, and built a simple method for mining it. I looked for repeated failures, the corrections that kept coming back in new clothing. For each pattern I asked what action would have prevented the failure, or shortened the repair. Then I wrote that action down as a concise rule with a scope, a reason, and a bad and good example pair from an actual draft. Finally I checked later commits to see whether the rule had become part of the workflow or stayed a one-off patch. That last check matters, because a rule nobody follows again is just a diary entry.

What came out was a set of sixteen agent skills. In the SKILL.md format, a skill is a short file, in my case five to twenty five lines, that an agent loads as an instruction, with a small header saying when it applies. The format is now used across Claude Code, Gemini CLI, OpenClaw, Codex, and more than thirty agent platforms, so a skill is portable in a way chat history never is. Two of my sixteen skills are always on, meaning they constrain every edit no matter the context. The other fourteen are triggered, meaning they wake up only when the agent enters a specific subtask, like repairing a citation or designing a figure.

The sixteen skills fall into five families, and the families tell the story of the project. Two epistemic skills guard the scientific stance, how causal claims get framed and comparisons get stated. Four citation skills fight bibliographic drift, the slow slide toward placeholder references and secondhand sources. Four prose skills enforce coherence and strip out common habits of machine writing. Three figure skills force conceptual planning before implementation. Three validation skills connect manuscript quality to the trustworthiness of the computation underneath it. Across all sixteen there are 94 constraints in total, a mean of 5.6 constraints per skill, distributed unevenly. The two epistemic skills average 8.0 constraints each, while the three validation skills average 5.3. I think that gap is honest. Vague claims come in endless variety, so many rules are needed to cover bad phrasings. Validation failures are more uniform, so a shorter checklist does the job.

One skill shows the whole idea in miniature, and it is the one I would keep if I had to throw away the rest. The geoscience comparison skill bans vague verbs like outperform and better, and requires every comparison to name the variable, the metric, the value, the period, and the benchmark. A bad sentence from one of my drafts claimed that PHS outperformed SHS across all variables, which sounds strong and says almost nothing. The corrected version says PHS reduced the root mean square error, or RMSE for short, a standard measure of the typical size of a model error, for latent heat flux by 8 watts per square meter, with a Kling Gupta efficiency, or KGE for short, a score combining correlation, bias, and variability into one number, of 0.70 against 0.61, while showing comparable bias in sensible heat. That sentence is longer and less heroic. It is also checkable, and checkable is the whole point.

The log also showed the shape of the seven weeks, and the shape explains when different skills were born. From February 22 to March 9, validation debugging dominated, and manuscript writing stayed limited because the model did not work correctly yet. From March 9 to April 1, the project proposal took over, and writing and documentation dominated while bug fixing receded. From April 3 to April 11 came a synthesis sprint around the review paper. Figure commits tell the shift plainly, dominating the final two weeks with 31 out of 44 commits in that window, a fifteenfold increase over the first two weeks, where fix commits had dominated with 13 out of 19. Validation skills appear when infrastructure is unstable, citation and prose skills become urgent during concentrated drafting, and figure skills only emerge once enough material exists to synthesize.

Underneath the writing story sits a debugging story, the engine of the whole paper. The validation work produced six major bugs with different technical details but a single shared root cause, writing code from assumptions instead of inspecting the actual data, the inherited scripts, the configuration options, and the documentation. A soil type mismatch sent wrong soil parameters into a run. A double precision cancellation broke a pressure related quantity in the plant hydraulics. A quality control threshold set too strictly threw away good data, and fixing it restored 48 percent of the valid observations, meaning that out of every 100 valid observations the strict threshold had discarded, 48 came back into the analysis. A script directory mismatch misaligned the run directories. Missing gross primary production values had been filled with zeros, and fixing that moved its correlation from 0.83 to 0.94. The stubborn bug, a collapsed correlation for the variable the paper labels VPSIS, took six days, and the fix turned out to be a configuration option rather than new science, moving that correlation from 0.42 to 0.86, the largest single gain in the validation. Those six bugs taught the lesson that became the validation checklist skill. Read the data and the configuration before you write the code. It sounds embarrassingly basic. Six bugs say it was not basic for us.

After the proposal went in on April 1, the repository split into two parallel manuscript tracks, and that split generated its own skill, because once two papers move in parallel, naming, directory hygiene, and figure namespaces become operational safety rather than tidiness. I like that about this method. Each skill is a scar, and the commit log is the record proving the injury happened.

Because a list of scars could still be just a memoir, I evaluated the skills against four criteria. Provenance asks whether each skill traces back to repeated failures, and they do, the citation skills to recurring placeholder corrections, the validation checklist to the six bug episode, the figure brief workflow to a late sprint where conceptual ambiguity kept arriving before implementation. Operational specificity asks whether a skill tells an agent what to do rather than what value to admire, and the good ones do, the citation reviewer specifies a three step workflow, and the figure brief skill requires an eight field design brief before any figure code gets written. Failure coverage asks whether the set spans the surfaces where things break, and it covers evidential, rhetorical, workflow, figure design, and validation failures. Transferability asks what travels, and the answer is layered. Citation validation, completeness checking, figure briefing, and parallel paper management should transfer directly. The physics mechanisms phrasing is tailored to land surface modeling, although its underlying form, preserve a model mechanistic reasoning instead of flattening it into a generic baseline, is broader.

There is also commit level evidence that codifying a rule changed later behavior, presented with no more confidence than it earns. Before the citation skills were codified, ahead of March 15, I count eight citation correction commits, including one insisting on a firsthand research paper instead of a secondhand review paper. After codification, zero appear in the remaining four weeks. The figure brief skill arrived on April 8, and of the 23 figure commits in the final week, eleven reference a design brief by name. The validation checklist followed the sixth bug, and no further assumption driven bugs appear in the remaining hundred plus commits. None of this is a controlled experiment. It is first order evidence that codified skills reduced recurrence, which is what a single case study can honestly offer.

The limits deserve the same plain treatment. This is one repository and one researcher, so nothing here is a population level claim. The goal is analytic generalization, showing a real trajectory can be instrumented this way, rather than statistical generalization. Commit classification was manual, and I am both author and evaluator of the skills, a circularity a controlled study would break by handing them to a different researcher with a new manuscript. Not every repeated correction could become a skill either. Paragraph level argument flow was corrected at least five times, yet the best rule I could write was to check logical flow, far too vague to constrain an agent. Skills work best for failures with a clear structural signature and a concrete rewrite target.

Two wider points stayed with me. One is safety. Skills load as system level instructions, so a bad skill is a standing order, not a typo. A companion audit in the paper examined 3,984 publicly shared skills and found 37 percent contained security flaws, meaning 37 out of every 100 audited skills carried problems like prompt injection openings or unsafe shell commands. Commit log grounding helps, since every skill carries a verifiable trail back to its motivating failure, its repair, and its codification commit, and these skills constrain behavior rather than expanding it. The other point is examples. Only five of the sixteen skills include bad and good example pairs, five divided by sixteen, about 31 percent, yet all five are among the most frequently invoked. Example pairs seem to matter most where an agent must judge subtle wording differences, and less where a checklist can carry the load.

The natural next step is to automate parts of this mining, with an agent that watches a commit history, detects repeated correction patterns, and proposes candidate skills for a human to approve. I would keep the approval gate. A mine produces raw material, and somebody still decides what is ore and what is rubble.

If you build agents for science, my suggestion is unfashionable and cheap. Before inventing new prompts, go read the ordinary traces of real work, the commits, the revisions, the fixes, the postmortems. That is where expertise lives, in the repairs. My sixteen skills are released with the paper, readable on Zenodo at https://doi.org/10.5281/zenodo.19582289 and on alphaXiv at https://www.alphaxiv.org/abs/2611.commit-log-agent-skills-scientific-research . I do not know whether this recipe works as well in your field as in mine, and I say that without embarrassment. The evidence sits in a commit log anyone can inspect. The log was never just a record of the work. It was the work, teaching.