agents.md: Teaching AI Agents How to Scrape (The Future of Web Automation) A developer has created a Markdown file called "agents.md" that teaches AI coding agents how to work on a specific project, solving the problem of AI-generated code not matching a developer's style or conventions. By placing this file in the project root, AI agents like Claude Code first read the developer's naming conventions, architectural decisions, and error-handling patterns before generating code, eliminating the need for manual rewrites. The approach mirrors how README.md documents projects for humans, with agents.md serving as a universal instruction set for AI agents across tools like GitHub Copilot, Cursor, and OpenAI Codex CLI. You're building a Scrapy scraper. You ask Claude Code for help. "Add pagination to my spider." Claude reads your code. It sees scraper.py, settings.py, the folder structure. Then it makes suggestions. But the suggestions don't match your style. You use specific naming conventions. Your error handling is particular. Your Scrapy middleware is custom. Claude doesn't know any of this. So it writes code that technically works but doesn't fit. You spend 30 minutes rewriting it to match your patterns. You ask again. Same problem. Claude doesn't learn. You have to explain everything every time. This is frustrating. You want the AI to understand your project. Not just the code, but the philosophy. The patterns. The conventions. The way you actually work. Then you discover agents.md. A simple Markdown file. You drop it in your project root. It teaches AI agents how you work. Your naming conventions. Your architectural decisions. Your scraping patterns. Your error handling approach. Everything. Now when you ask Claude Code for help, it reads agents.md first. It understands your project. The code it writes matches your style immediately. No rewriting. No repeating yourself. You're not building a scraper anymore. You're building a scraper that teaches AI how to build scrapers. This is agents.md. And it's changing how developers work with AI. Let me show you. agents.md is a Markdown file that teaches AI coding agents how to work on your project. Think of it like this: README.md teaches humans about your project. What it does. How to install it. How to contribute. agents.md teaches AI about your project. The patterns you use. The decisions you made. How to write code that fits your style. Both live in your project. Both are important. They serve different audiences. Scrapy projects are complex. You have spiders, pipelines, middleware, settings. You have patterns for error handling. Conventions for naming. Architectural decisions about how data flows. When you ask AI for help, it sees all this complexity. But it doesn't understand the patterns. The philosophy. The way you think about scraping. agents.md fixes this. You document your patterns once. AI reads it. Now every suggestion, every piece of generated code, follows your patterns automatically. There are several variants of this concept: agents.md: Open standard for any AI coding agent. Works with GitHub Copilot, Cursor, OpenAI Codex CLI, and more. SKILL.md: Anthropic's format for specific reusable skills. More structured. Separate folder per skill. CLAUDE.md: Claude Code's specific variant newer, more features . agents.md is the universal format. It works everywhere. This blog focuses on agents.md. agents.md has two parts: Here's a minimal agents.md file: --- name: ecommerce-scraper description: Web scraper for e-commerce product data --- E-commerce Scraper Project Structure - spiders/ - Scrapy spiders for different sites - pipelines.py - Data cleaning and storage - settings.py - Scrapy configuration - items.py - Item definitions Naming Conventions Spiders are named: spider