मुख्य सामग्री पर जाएँ
Skillpedia
एजेंट41k · #6813

editing-agents-md

यह क्या करती है

यह स्किल उन निर्देश फ़ाइलों में क्या जाए, यह चुनने में मदद करती है, जिन्हें AI कोडिंग टूल हर सेशन की शुरुआत में पढ़ते हैं। यह उन लोगों के लिए है जो ये फ़ाइलें रखते हैं और चाहते हैं कि वे छोटी और काम की रहें।

कब इस्तेमाल करें

  • ✓जब आप AGENTS.md या CLAUDE.md फ़ाइल में कोई नया नियम जोड़ना चाहें।
  • ✓जब कोई नियम बार-बार टूटे और कोई उसे लिखने का सुझाव दे।
  • ✓जब कोई निर्देश फ़ाइल बहुत लंबी हो गई हो और उसे छोटा करना हो।

Skill का लिंक

https://github.com/PostHog/posthog/blob/master/.agents/skills/editing-agents-md/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/PostHog/posthog/blob/master/.agents/skills/editing-agents-md/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“मुझे बताइए कि यह नियम मेरी CLAUDE.md फ़ाइल में होना चाहिए या नहीं, और AI उसे माने, इसके लिए उसे फिर से लिखिए।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

एजेंट पहले पूछता है कि क्या कोई और तरीका, जैसे लिंटर या टेस्ट, यह नियम लागू कर सकता है। नियम फ़ाइल में तभी रखा जाता है जब इससे बेहतर कोई तरीका न हो, और उसे साफ़ रूप में फिर से लिखा जाता है।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

Editing AGENTS.md

The root AGENTS.md loads in full at the start of every session, in every tool that reads it. A line you add is paid for by every task in the repo, forever, whether or not that task touches the subject. So the question is never "is this true?" — it is "is this worth loading into every session?"

Two findings set the frame:

  • Adding a context file raises inference cost by over 20% on average, and does not reliably raise task success (2602.11988). A second study measured the opposite sign on runtime and tokens (2601.20404). The evidence is mixed, which argues for a small sharp file rather than no file.
  • File size, instruction position, file architecture, and contradictions between adjacent files each produced no detectable effect on whether an agent follows a rule, across 1,650 sessions (2605.10039).

Read the second one carefully, because it kills a whole class of proposals. Moving a section higher "so the agent sees it" is churn against a null result. Do not reorder for attention. Reorder only when a heading makes a rule easier for a human to find or cite.

1. Does this belong in the file at all?

Work down this ladder and stop at the first rung that fits. It is the same ladder AGENTS.md states for itself.

Rung Mechanism Use when
1 Linter — ruff, oxlint, semgrep (.semgrep/rules/devex/) The violation is a code pattern a matcher can see
2 lint-staged / pre-commit It needs the file list or the working tree, not the AST
3 Skill (.agents/skills/) It applies to one kind of task, not every task
4 A rule in AGENTS.md None of the above can carry it

Rung 4 is the last resort, not the default. A convention that a semgrep rule could catch belongs in .semgrep/rules/devex/ — read its README for the severity choice and the WARNING-to-ERROR ratchet. Put the migration playbook in the rule's message: field, because that is what an author actually reads when it fires.

Rung 3 is the one people skip most. If a rule only matters while merging a PR, writing a migration, or building a workflow, it belongs in that skill, where it loads on demand and can be ten times longer.

2. Check the six smells

Measured across 100 popular repositories (2606.15828). Prevalence in brackets.

  • Lint leakage [62%] — the rule restates what a linter already blocks. This is the most common failure by a wide margin. Do not delete the reasoning, but cut it to the reason plus the rule id, and tag it. CI is the check; the prose is only the why.
  • Context bloat [42%] — content that does not apply to most sessions. Environment-specific setup, product documentation, anything a docs/ page should hold. Target is under 200 lines.
  • Skill leakage [35%] — task-specific instructions sitting in the always-loaded file instead of a skill.
  • Conflicting instructions [28%] — two rules that disagree, often because one aged. Grep for the other statement before you add yours.
  • Init fossilization [24%] — text nobody has reviewed since it was generated. If you are editing near a stale rule, verify it still holds and fix it in the same diff.
  • Blind references [16%] — a link with no statement of what it holds and when to read it. Every link needs a "read this when …" clause, or an agent has no basis to spend a tool call on it.

3. Write the rule as an invariant, not an instruction

The file is read by authors and reviewers alike. An invariant serves both; an instruction has to be translated.

  • Say what must be true: "Every tenant-data model must have team_id."
  • Not what to do: "Remember to add team_id when you make a model."

Be specific and imperative. A vague preference changes nothing. "Use uv pip, never pip" works. "We prefer uv" does not. Name the trigger the rule fires on, so a reader scanning a diff knows when it applies.

Keep to the repo's prose conventions: ASD-STE100 Simplified Technical English, active voice, one

अक्सर पूछे जाने वाले सवाल

हर नियम फ़ाइल में क्यों न डाला जाए?

हर लाइन हर सेशन में लोड होती है, इसलिए लंबी फ़ाइलें खर्च बढ़ाती हैं और हमेशा मदद नहीं करतीं। छोटी और सटीक फ़ाइलें बेहतर काम करती हैं।

क्या यह CLAUDE.md फ़ाइलों पर भी लागू होता है?

हाँ। यही सलाह AGENTS.md और CLAUDE.md दोनों पर लागू होती है, क्योंकि दोनों हर सेशन की शुरुआत में लोड होती हैं।

क्या AI के देखने के लिए नियम को फ़ाइल में ऊपर ले जाना चाहिए?

आम तौर पर नहीं। इस स्किल के पीछे की रिसर्च में पाया गया कि स्थान बदलने से यह भरोसेमंद रूप से नहीं बदला कि एजेंट नियम मानेगा या नहीं, इसलिए क्रम केवल लोगों को सेक्शन ढूँढने में मदद के लिए बदलें।

जानकारी

लेखक का मूल विवरण

Decide whether a rule belongs in an AGENTS.md / CLAUDE.md file, and write it so it holds. Use before adding, editing, or removing any instruction in a root or nested AGENTS.md, when a convention keeps getting broken and someone proposes documenting it, when reviewing a diff that touches one, or when a file has grown and needs a trim. Carries the enforcement-tag convention (`[lint: <id>]` / `[review]`), the six configuration smells to check against, and the size budget. Trigger terms: AGENTS.md, CLAUDE.md, agent instructions, context file, add a rule, document this convention, the file is too l

repo: PostHog/posthog

लोकप्रियता

GitHub स्टार
41k
रैंकिंग में स्थान
#6813
लाइसेंस
—
अपडेट की गई
2/11/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

depot-ci

41k

यह आपके एजेंट को Depot CI वर्कफ़्लो सेट अप करने, चलाने और माइग्रेट करने में मदद करती है, साथ ही रन के लॉग पढ़ने में।

कोडिंगडिप्लॉय और क्लाउड (DevOps)

depot-container-builds

41k

यह आपके एजेंट को Depot के रिमोट बिल्डर पर Docker इमेज बनाने में मदद करती है, जिसमें मल्टी-प्लेटफ़ॉर्म इमेज और बिल्ड सुधार शामिल हैं।

कोडिंगडिप्लॉय और क्लाउड (DevOps)

depot-github-runners

41k

यह आपके एजेंट को GitHub Actions जॉब Depot के मैनेज्ड रनर पर ले जाने, रनर का साइज़ और लेबल चुनने, और रनर सेटअप की समस्याएँ ठीक करने में मदद करती है।

कोडिंगडिप्लॉय और क्लाउड (DevOps)

formatting-slack-messages

41k

यह आपके एजेंट को Slack के मौजूदा नियमों के अनुसार जाँचे गए साफ़ मैसेज, मॉडल और होम स्क्रीन बनाने में मदद करती है।

प्रोडक्टिविटीईमेल और मैसेज

मिलती-जुलती skills