Use Git Diffs to Teach an Agent Your Writing Style

tippersonal

Most people know that AI learns a writing style much better from examples than from instructions. It’s true: the distinctive traits of your writing are easily captured from just a few samples. However, you will probably never be fully satisfied with AI outputs if you stop there. In practice, you simply can’t give AI enough varied examples that are completely free of flaws in style and logic. To teach an AI agent the nuances of your writing style, use an additional trick:

  1. Commit the AI-generated draft to Git before you touch it (it’s easiest to automate this through an instruction in your AGENTS.md).
  2. Make your manual edits, then ask the agent to analyze the diff for patterns (again, it’s better to bake this into your workflow than to prompt the agent every time). A git diff is much easier for AI to process than comparing two long texts. The analysis should also take into account the existing rules of your writing skill.
  3. When the agent suggests general rules based on your edits, always review the extracted rules and cut out anything specific to the current text. When asked to inspect a git diff closely, an agent tends to be overly thorough and pull in accidental changes, so this review is a must.
  4. Have the agent save the patterns it finds into your writing skill. By the way, these patterns fit better in a references/ file loaded only when relevant, rather than in the main SKILL.md.

As you can see, this workflow takes very little extra effort to “teach AI”: you only review a list of suggested patterns or improvements.

Over time, this workflow builds concrete, text-specific editing patterns on top of your writing samples.

Get new entries by email