Skip to content

Instantly share code, notes, and snippets.

@swport
Last active March 27, 2026 18:32
Show Gist options
  • Select an option

  • Save swport/47d6e76646ed379a7c39f42cfa4510a4 to your computer and use it in GitHub Desktop.

Select an option

Save swport/47d6e76646ed379a7c39f42cfa4510a4 to your computer and use it in GitHub Desktop.
Update AGENTS.md Files

Update AGENTS.md Files

Before committing, check if any edited files have learnings worth preserving in nearby AGENTS.md files:

  1. Identify directories with edited files - Look at which directories you modified
  2. Check for existing AGENTS.md - Look for AGENTS.md in those directories or parent directories
  3. Add valuable learnings - If you discovered something future developers/agents should know:
    • API patterns or conventions specific to that module
    • Gotchas or non-obvious requirements
    • Dependencies between files
    • Testing approaches for that area
    • Configuration or environment requirements

Examples of good AGENTS.md additions:

  • "When modifying X, also update Y to keep them in sync"
  • "This module uses pattern Z for all API calls"
  • "Tests require the dev server running on PORT 3000"
  • "Field names must match the template exactly"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment