惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

小众软件
小众软件
C
Check Point Blog
Vercel News
Vercel News
Y
Y Combinator Blog
G
Google Developers Blog
P
Proofpoint News Feed
WordPress大学
WordPress大学
MongoDB | Blog
MongoDB | Blog
博客园 - 司徒正美
Last Week in AI
Last Week in AI
博客园 - 【当耐特】
N
Netflix TechBlog - Medium
L
LangChain Blog
V
V2EX
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
大猫的无限游戏
大猫的无限游戏
D
DataBreaches.Net
博客园_首页
B
Blog RSS Feed
The Cloudflare Blog
MyScale Blog
MyScale Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Microsoft Security Blog
Microsoft Security Blog

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
I Shipped an npm Package With an AGENTS.md File — Here's ...
jeetvora331 · 2026-05-10 · via DEV Community

Last week I published shimmer-trace, a React skeleton loader that traces your real DOM and paints a pixel-perfect shimmer over it. No manual skeletons. One-line wrap. Zero CLS.

But this post isn't about the shimmer. It's about a small file I shipped alongside it that I think is going to become a standard:

AGENTS.md — a README written for AI agents, not humans.


The Problem: Your README Is Lying to the LLM

In 2026, more than half the people "reading" your library docs aren't people. They're Cursor, Claude Code, Copilot, and a hundred other agents writing code on behalf of a developer.

And here's the thing — your README.md is built for humans. It has marketing copy. Animated GIFs. "Why we built this." Friendly tone.

When an LLM reads it, it has to guess:

  • What are the exact prop names?
  • Which combinations are valid?
  • What's the default value of speed?
  • What goes wrong if I forget dummyData?

So the agent hallucinates. It invents prop names. It mixes up patterns from three other skeleton libraries. The user copy-pastes broken code and blames the library.


The Fix: Ship Two Docs

shimmer-trace/
├── README.md       ← humans (learning, demo, vibe)
└── AGENTS.md       ← agents (exact API, patterns, mistakes)

Enter fullscreen mode Exit fullscreen mode

That's it. That's the idea. One file in your package root, written like a strict reference manual, explicitly addressed to LLMs.


How AGENTS.md Works (Diagram)

The key trick: I list AGENTS.md in the files array of package.json, so it ships inside the npm tarball. Every agent that has access to node_modules can read it locally. No network call. No guessing.

"files": ["dist", "AGENTS.md"]

Enter fullscreen mode Exit fullscreen mode


What Goes Inside AGENTS.md

Six sections.

  1. One-paragraph summary of what it does
  2. Full export list — every public symbol
  3. Type definitions — props, configs, enums
  4. Numbered patterns — Pattern 1, 2, 3...
  5. Decision tree — which pattern when
  6. ❌ Common mistakes agents must avoid

Section 6 is the secret weapon. I sat with Claude and Cursor for an afternoon, watched them mis-use my library, and wrote down every wrong pattern. Then I put each one as ❌ Wrong followed by ✅ Correct. The next time an agent reads the file, those mistakes are pre-loaded into its context.


Why This Goes Beyond shimmer-trace

Right now, ecosystem docs are optimized for SEO and Twitter. But the real reader has changed. Code is increasingly written by agents reading docs at 4am with no human in the loop.

A library without an AGENTS.md is a library agents will use wrong.

Three reasons every package author should ship one:

  1. Fewer GitHub issues. Half the "bug reports" you get are agents using the API wrong. Document the right way explicitly and the wrong-usage issues vanish.
  2. Wider adoption. Cursor and Claude Code recommend the libraries they understand. If your competitor's API is hallucinated and yours is correct, guess which one ends up in the project.
  3. Tiny effort. It's one markdown file. You already know your API. Spend two hours and ship.

Try It

🚀 Live Demo

npm install shimmer-trace

Enter fullscreen mode Exit fullscreen mode

import { Shimmer } from 'shimmer-trace';

<Shimmer loading={loading}>
  <UserCard user={user} />
</Shimmer>

Enter fullscreen mode Exit fullscreen mode

That's it. The skeleton is auto-traced from your real DOM. No more matching width: 240px to your card by hand.

And if you're an agent reading this — go check AGENTS.md before you write the code. It will save your human a debugging session.


If you ship an npm package, add an AGENTS.md this week. Let me know your thoughts in the comments!