मुख्य सामग्री पर जाएँ
Skillpedia
प्रॉम्प्ट और LLM33k · #8721

agent-md-refactor

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

यह स्किल आपके AI को कोडिंग एजेंटों के लिए लंबी निर्देश फ़ाइलें व्यवस्थित करने में मदद करती है। यह उन लोगों के लिए है जिनकी CLAUDE.md या AGENTS.md फ़ाइल इतनी बड़ी हो गई है कि काम की नहीं रही।

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

  • ✓जब आपकी CLAUDE.md या AGENTS.md फ़ाइल पढ़ने के लिए बहुत लंबी हो गई है।
  • ✓जब आपके एजेंट निर्देशों में टकराने वाले नियम हैं जिन्हें आप सुलझाना चाहते हैं।
  • ✓जब आप एजेंट निर्देशों को जुड़ी हुई विषय फ़ाइलों में व्यवस्थित करना चाहते हैं।

Skill का लिंक

https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/development/agent-md-refactor/SKILL.md

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

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

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

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

इस skill से मेरी मदद करो: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/development/agent-md-refactor/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

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

“मेरी CLAUDE.md बहुत बड़ी और बिखरी हुई है। इसे एक छोटी मुख्य फ़ाइल और व्यवस्थित पेजों में बाँट दीजिए।”

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

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

एजेंट पहले टकराने वाले निर्देश ढूँढता है, फिर मुख्य फ़ाइल के लिए ज़रूरी बातें निकालता है। बाकी को श्रेणियों में बाँटकर जुड़ी हुई फ़ाइलें बनाता है, और अस्पष्ट या दोहराए गए निर्देश चिह्नित करता है।

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

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

Agent MD Refactor

Refactor bloated agent instruction files (AGENTS.md, CLAUDE.md, COPILOT.md, etc.) to follow progressive disclosure principles - keeping essentials at root and organizing the rest into linked, categorized files.


Triggers

Use this skill when:

  • "refactor my AGENTS.md" / "refactor my CLAUDE.md"
  • "split my agent instructions"
  • "organize my CLAUDE.md file"
  • "my AGENTS.md is too long"
  • "progressive disclosure for my instructions"
  • "clean up my agent config"

Quick Reference

Phase Action Output
1. Analyze Find contradictions List of conflicts to resolve
2. Extract Identify essentials Core instructions for root file
3. Categorize Group remaining instructions Logical categories
4. Structure Create file hierarchy Root + linked files
5. Prune Flag for deletion Redundant/vague instructions

Process

Phase 1: Find Contradictions

Identify any instructions that conflict with each other.

Look for:

  • Contradictory style guidelines (e.g., "use semicolons" vs "no semicolons")
  • Conflicting workflow instructions
  • Incompatible tool preferences
  • Mutually exclusive patterns

For each contradiction found:

## Contradiction Found

**Instruction A:** [quote]
**Instruction B:** [quote]

**Question:** Which should take precedence, or should both be conditional?

Ask the user to resolve before proceeding.


Phase 2: Identify the Essentials

Extract ONLY what belongs in the root agent file. The root should be minimal - information that applies to every single task.

Essential content (keep in root):

Category Example
Project description One sentence: "A React dashboard for analytics"
Package manager Only if not npm (e.g., "Uses pnpm")
Non-standard commands Custom build/test/typecheck commands
Critical overrides Things that MUST override defaults
Universal rules Applies to 100% of tasks

NOT essential (move to linked files):

  • Language-specific conventions
  • Testing guidelines
  • Code style details
  • Framework patterns
  • Documentation standards
  • Git workflow details

Phase 3: Group the Rest

Organize remaining instructions into logical categories.

Common categories:

Category Contents
typescript.md TS conventions, type patterns, strict mode rules
testing.md Test frameworks, coverage, mocking patterns
code-style.md Formatting, naming, comments, structure
git-workflow.md Commits, branches, PRs, reviews
architecture.md Patterns, folder structure, dependencies
api-design.md REST/GraphQL conventions, error handling
security.md Auth patterns, input validation, secrets
performance.md Optimization rules, caching, lazy loading

Grouping rules:

  1. Each file should be self-contained for its topic
  2. Aim for 3-8 files (not too granular, not too broad)
  3. Name files clearly: {topic}.md
  4. Include only actionable instructions

Phase 4: Create the File Structure

Output structure:

project-root/
├── CLAUDE.md (or AGENTS.md)     # Minimal root with links
└── .claude/                      # Or docs/agent-instructions/
    ├── typescript.md
    ├── testing.md
    ├── code-style.md
    ├── git-workflow.md
    └── architecture.md

Root file template:

# Project Name

One-sentence description of the project.

## Quick Reference

- **Package Manager:** pnpm
- **Build:** `pnpm build`
- **Test:** `pnpm test`
- **Typecheck:** `pnpm typecheck`

## Detailed Instructions

For specific guidelines, see:
- [TypeScript Conventions](.claude/typescript.md)
- [Testing Guidelines](.claude/testing.md)
- [Code Style](.claude/code-style.md)
- [Git Workflow](.claude/git-workflow.md)
- [Architecture Patterns](.claude/architecture.md)

Each linked file template:

# {Topic} Guidelines

## Overview
Brief context for when these guidelines apply.

## Rules

### Rule Category 1
- Specific, actionable instruction
- Another specific instruction

### Rule Category 2
- Specific, actionable instruction

## Examples

### Good
\`\`\`typescript
// Example of correct pattern
\`\`\`

### Avoid
\`\`\`typescript
// Example of what not to do
\`\`\`

Phase 5: Flag for Deletion

Identify instructions that should be removed entirely.

Delete if:

| Criterion | Example | Why Delete | |--------

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

क्या यह मेरे निर्देश मिटा देगी?

यह दोहराए गए या अस्पष्ट निर्देशों को हटाने के लिए चिह्नित करती है, ताकि कुछ भी हटाने से पहले आप उन्हें जाँच सकें।

मुख्य फ़ाइल में क्या जाएगा?

हर सत्र के लिए ज़रूरी बातें, और बाकी के लिए अधिक विस्तृत फ़ाइलों के लिंक।

क्या यह टकराने वाले नियम ढूँढती है?

हाँ, इसका पहला चरण ऐसे निर्देश ढूँढता है जो एक-दूसरे का खंडन करते हैं, और पूछता है कि कौन सा प्राथमिक होना चाहिए।

जानकारी

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

Refactor bloated AGENTS.md, CLAUDE.md, or similar agent instruction files to follow progressive disclosure principles. Splits monolithic files into organized, linked documentation.

repo: davila7/claude-code-templates

लोकप्रियता

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

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

0

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

कमेंट

  • …

इस repository की और skills

owasp-security

33k

आपके एजेंट को वेब ऐप, API, मोबाइल, कंटेनर और AI एजेंट्स के लिए OWASP सुरक्षा मार्गदर्शन सिखाती है, ताकि वह आम कमज़ोरियाँ पहचान सके और सुधार सुझा सके।

कोडिंगसिक्योरिटी

agent-management

33k

आपके एजेंट को AI Maestro कमांड-लाइन से AI एजेंट बनाने, सूची देखने, hibernate और wake करने, नाम बदलने और हटाने देती है, हर एजेंट के जीवन-चक्र को संभालते हुए।

AI और एजेंटएजेंट

agent-messaging

33k

Agent Messaging Protocol का उपयोग करके AI एजेंट्स के बीच हस्ताक्षरित संदेश भेजने, प्राप्त करने और उनका जवाब देने देती है, ज़्यादातर आपकी अपनी मशीन पर।

AI और एजेंटएजेंट

docs-search

33k

आपके एजेंट को फ़ंक्शन सिग्नेचर, क्लास परिभाषा और कमेंट के लिए ऑटो-जनरेटेड कोड डॉक्यूमेंटेशन खोजने देती है, ताकि कोड बदलने से पहले वह असली API जाँच सके।

कोडिंगसामान्य कोडिंग

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