Podcasts पर वापस जाएंClaude
Claude Code subagents
सबएजेंट्स का प्रभावी उपयोग
You know how to create sub agents and design them well.
आप सब-एजेंट बनाना और उन्हें सही तरह डिज़ाइन करना जानते हैं।
Now, let's cover when they actually help and when they get in the way.
अब, देखते हैं कि वे कब सच में मदद करते हैं और कब बाधा बनते हैं।
Simply put, the difference comes down to whether the intermediate work matters to your main thread.
सीधे शब्दों में, अंतर इस बात पर निर्भर करता है कि intermediate work आपके मेन थ्रेड के लिए मायने रखता है या नहीं।
When exploration is separate from execution, sub agents shine.
जब exploration, execution से अलग हो, तो सब-एजेंट बेहतरीन काम करते हैं।
When each step depends on what the previous step discovered, well, information gets lost in the handoff process.
जब हर कदम पिछले कदम की खोज पर निर्भर हो, तो handoff process में जानकारी खो जाती है।
Sub agents excel at research tasks where you just need an answer, not the journey.
सब-एजेंट research tasks में उत्कृष्ट होते हैं, जहाँ आपको सिर्फ जवाब चाहिए, पूरी प्रक्रिया नहीं।
Consider investigating how authentication works in an unfamiliar code base.
सोचिए कि किसी अपरिचित कोडबेस में authentication कैसे काम करती है, यह समझना हो।
Well, the main thread might need to know where is the JWT validated, but doesn't need to see every file that was searched.
मेन थ्रेड को जानना जरूरी है कि JWT कहाँ validate होता है, लेकिन हर खोजी गई फ़ाइल देखने की जरूरत नहीं।
A research sub agent can read dozens of files, trace through function calls, and explore different code paths.
एक research सब-एजेंट दर्जनों फ़ाइलें पढ़ सकता है, function calls को trace कर सकता है, और अलग-अलग code paths explore कर सकता है।
All that exploration stays in the sub agent's context.
वह सारी exploration सब-एजेंट के कॉन्टेक्स्ट में ही रहती है।
Your main thread receives JWT validation happens in middleware/auth.js at line 42, called from the Express router and route/api.js, or something like that.
मेन थ्रेड को मिलता है: JWT validation middleware/auth.js में line 42 पर होती है, Express router और route/api.js से call होती है, या कुछ इस तरह।
Claude reviews work more effectively when the code is presented as being authored by someone else.
Claude तब ज़्यादा प्रभावी ढंग से काम review करता है जब code किसी और का लिखा बताया जाए।
If you build a feature over many turns with your main thread, asking the main thread to then review it often doesn't give the best feedback.
अगर आप मेन थ्रेड के साथ कई steps में कोई feature बनाते हैं, तो उसी से review माँगने पर अक्सर सबसे अच्छा feedback नहीं मिलता।
Claude was involved in creating it, so it has trouble seeing it with fresh eyes.
Claude उसे बनाने में शामिल था, इसलिए उसे ताज़ी नज़र से देखने में मुश्किल होती है।
A reviewer sub agent sees the changes in a separate context.
एक reviewer सब-एजेंट बदलावों को अलग कॉन्टेक्स्ट में देखता है।
It runs get diff, reads the modified files, and applies its specialized review criteria without the history of how the code was written.
यह git diff चलाता है, बदली हुई फ़ाइलें पढ़ता है, और code कैसे लिखा गया उसके history के बिना अपने specialized review criteria लागू करता है।
And this separation also lets you encode project-specific review standards in the sub agent system prompt, ensuring consistent review criteria across the team.
और यह अलगाव आपको project-specific review standards को सब-एजेंट के system prompt में encode करने देता है, जिससे पूरी team में review criteria consistent रहते हैं।
Claude Code's default system prompt emphasizes concise, code-focused response.
Claude Code का default system prompt संक्षिप्त, code-focused response पर ज़ोर देता है।
And this works great for coding, but not for everything.
और यह coding के लिए बेहतरीन है, लेकिन हर चीज़ के लिए नहीं।
So, one is a copywriting sub-agent with instructions about tone, audience, and style.
तो, एक copywriting सब-एजेंट जिसे tone, audience और style के बारे में instructions दी गई हों।
This will produce better marketing text than the main thread would.
यह मेन थ्रेड से बेहतर marketing text बनाएगा।
Claude Code's default prompt tends towards concise, technical writing, which really isn't what you want for a landing page or email campaign, unless you want to put your customers to sleep.
Claude Code का default prompt concise, technical writing की तरफ झुका होता है, जो landing page या email campaign के लिए सही नहीं है, जब तक आप अपने customers को नींद नहीं सुलाना चाहते।
A copywriting sub-agent can have completely different instructions about voice and structure.
एक copywriting सब-एजेंट के पास voice और structure के बारे में बिल्कुल अलग instructions हो सकती हैं।
A styling sub-agent that at mentions your design system files will apply consistent CSS patterns.
एक styling सब-एजेंट जो आपके design system files mention करे, consistent CSS patterns लागू करेगा।
When the sub-agent runs, those files load into the context automatically, so it knows your color variables, spacing conventions, and component patterns before it even starts writing any CSS.
जब सब-एजेंट चलता है, वे फ़ाइलें automatically कॉन्टेक्स्ट में load हो जाती हैं, ताकि CSS लिखना शुरू करने से पहले उसे आपके color variables, spacing conventions और component patterns की जानकारी हो।
Sub-agents that claim expertise rarely help.
expertise का दावा करने वाले सब-एजेंट कम ही काम आते हैं।
Prompts like, "You are a Python expert." or "You are a Kubernetes specialist." add no value because Claude already has that knowledge.
जैसे prompts "आप Python expert हैं" या "आप Kubernetes specialist हैं" ये कोई value नहीं जोड़ते क्योंकि Claude के पास पहले से यह knowledge है।
The overhead of launching a sub-agent, losing visibility into its work, and compressing its findings into a summary only makes sense when the sub-agent does something that the main thread can't.
सब-एजेंट launch करने, उसके काम की visibility खोने और उसके findings को summary में compress करने का overhead तभी समझ में आता है जब सब-एजेंट कुछ ऐसा करे जो मेन थ्रेड नहीं कर सकता।
Like applying a custom system prompt or keeping exploratory work isolated.
जैसे कि custom system prompt लागू करना या exploratory work को isolated रखना।
Sequential sub-agent pipelines create problems.
Sequential सब-एजेंट pipelines समस्याएँ पैदा करती हैं।
Consider a three-agent flow.
एक three-agent flow पर विचार करें।
One to reproduce a bug, one to debug it, and one to fix it.
एक bug reproduce करने के लिए, एक उसे debug करने के लिए, और एक उसे fix करने के लिए।
Pipelines work when tasks are truly independent.
Pipelines तब काम करती हैं जब tasks वाकई independent हों।
They fail when each step depends on discoveries from the previous step.
वे तब fail होती हैं जब हर step पिछले step की खोजों पर निर्भर हो।
Test runner sub-agents tend to hide information you need.
Test runner सब-एजेंट आपकी ज़रूरी जानकारी छिपाते हैं।
When tests fail, you want the full output to diagnose issues.
जब tests fail हों, तो समस्याओं को diagnose करने के लिए पूरा output चाहिए।
A sub-agent that returns a test failed forces you to create additional debug scripts to get details that would have been visible in direct output.
एक सब-एजेंट जो सिर्फ "test failed" return करे, वह आपको additional debug scripts बनाने पर मजबूर करता है, जबकि वह जानकारी direct output में दिखती।
Testing has showed that the test runner pattern performed worse among all configurations.
Testing ने दिखाया कि test runner pattern ने सभी configurations में सबसे खराब performance दी।
Across the series, we covered how sub-agents work as isolated threads that return summaries.
इस series में हमने देखा कि सब-एजेंट isolated threads के रूप में कैसे काम करते हैं जो summaries return करते हैं।
How to create them with the /agents command, and how to design them with structured outputs and specific descriptions.
/agents command से उन्हें कैसे बनाएं, और structured outputs और specific descriptions के साथ उन्हें कैसे design करें।
Use them for research, reviews, and tasks needing custom system prompts.
इनका उपयोग research, reviews और custom system prompts वाले tasks के लिए करें।
But, avoid them for expert claims, multi-step pipelines, and test runners.
लेकिन expert claims, multi-step pipelines और test runners के लिए इनसे बचें।
The key question, does the intermediate work matter?
मुख्य सवाल: क्या intermediate work मायने रखता है?
If not, then delegate it.
अगर नहीं, तो उसे delegate करें।