resilient-data-gathering
यह क्या करती है
यह स्किल AI एजेंट को तब फ़ॉलबैक देती है जब कई टूल एक के बाद एक विफल हों। यह उन लोगों के लिए है जिन्हें बाद में जाँचा जा सकने वाला नतीजा चाहिए, भले ही सामान्य टूल जवाब न दें।
कब इस्तेमाल करें
- ✓जब खोज, सहायक एजेंट और कोड सैंडबॉक्स टूल सब दो-तीन प्रयासों के बाद विफल हों।
- ✓जब ज़रूरी डेटा पहले से ज्ञात हो या बातचीत से उचित अनुमान लगाया जा सके।
- ✓जब आपको बीच के नतीजे सहेजे हुए चाहिए ताकि उन्हें बाद में जाँचा या वापस पाया जा सके।
Skill का लिंक
https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/resilient-data-gathering/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“खोज और कोड टूल लगातार विफल हो रहे हैं। मैंने जो उत्पाद कीमतें दी हैं, उन्हें इस्तेमाल कीजिए, स्क्रिप्ट में डालिए, और नतीजे JSON फ़ाइल में सहेजिए।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट जो डेटा उसके पास है उसे इकट्ठा करता है, उसे शेल Python स्क्रिप्ट में डालता है, और हर चरण JSON फ़ाइल में सहेजता है। ये फ़ाइलें आपको काम की जाँच करने देती हैं और कुछ गलत होने पर जहाँ रुका था वहीं से आगे बढ़ने देती हैं।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Resilient Data Gathering Workflow
Purpose
When search_web, shell_agent, and execute_code_sandbox all fail repeatedly with 'unknown error' or similar tool execution failures, fall back to embedding known domain data directly into run_shell Python scripts and persisting intermediate data to JSON files for auditability and recovery.
When to Use This Pattern
Apply this pattern when:
- Trigger condition: 2-3 consecutive failures across multiple tools (
search_web,shell_agent,execute_code_sandbox) with 'unknown error' messages - You have domain knowledge: The required data is known or can be reasonably estimated from context
- Auditability needed: Intermediate results must be preserved for verification or rollback
Step-by-Step Instructions
Step 1: Recognize Tool Failure Pattern
Monitor for repeated failures across multiple execution tools:
search_webreturns errors or empty resultsshell_agentfails to complete autonomous tasksexecute_code_sandboxthrows 'unknown error' repeatedly
Decision point: After 2-3 failures, switch to the fallback pattern rather than continuing to retry failing tools.
Step 2: Gather Known Domain Data
Collect all data you already know or can reasonably infer:
- Product specifications, prices, SKUs
- Competitor information from context
- Business rules and constraints
- Historical data from previous task phases
Document this data in a structured format before embedding.
Step 3: Embed Data in run_shell Python Script
Create a Python script that embeds the known data directly as literals or constants:
import json
import os
from datetime import datetime
# ============================================
# EMBEDDED DOMAIN DATA (known from context)
# ============================================
PRODUCT_DATA = {
"sku_001": {
"name": "Product A",
"competitor_price": 29.99,
"weight_oz": 12,
"category": "beverage"
},
"sku_002": {
"name": "Product B",
"competitor_price": 34.99,
"weight_oz": 16,
"category": "snack"
}
}
BUSINESS_RULES = {
"margin_target": 0.25,
"price_floor": 19.99,
"price_ceiling": 99.99
}
# ============================================
# ANALYSIS LOGIC
# ============================================
def analyze_products(products, rules):
results = {}
for sku, data in products.items():
price_per_oz = data["competitor_price"] / data["weight_oz"]
recommended_price = data["competitor_price"] * (1 + rules["margin_target"])
recommended_price = max(rules["price_floor"], min(rules["price_ceiling"], recommended_price))
results[sku] = {
**data,
"price_per_oz": round(price_per_oz, 2),
"recommended_price": round(recommended_price, 2),
"analysis_timestamp": datetime.now().isoformat()
}
return results
# Execute analysis
analysis_results = analyze_products(PRODUCT_DATA, BUSINESS_RULES)
# ============================================
# PERSIST INTERMEDIATE DATA (audit trail)
# ============================================
output_file = "intermediate_analysis.json"
with open(output_file, "w") as f:
json.dump({
"metadata": {
"generated_at": datetime.now().isoformat(),
"source": "embedded_domain_data",
"fallback_reason": "tool_execution_failures"
},
"results": analysis_results
}, f, indent=2)
# Signal artifact location for downstream tools
print(f"ARTIFACT_PATH:{os.path.abspath(output_file)}")
# Output results for immediate consumption
print("\n=== ANALYSIS RESULTS ===")
print(json.dumps(analysis_results, indent=2))
Step 4: Execute via run_shell
Run the embedded script using run_shell:
python3 << 'EOF'
[paste the full script from Step 3]
EOF
Or save to a file first:
cat > analysis_script.py << 'SCRIPT'
[paste script content]
SCRIPT
python3 analysis_script.py
Step 5: Persist and Verify Intermediate Results
Ensure JSON files are created and contain valid data:
import json
# Verify persistence
with open("intermediate_analysis.json", "r") as f:
验证数据 = json.load(f)
assert "results" in 验证数据
assert "metadata" in 验证数据
print(f"✓ Persisted {len(验证数据['results'])} records")
Step 6: Chain Subsequent Operations
Use persisted JSON as input for downstream operations:
import json
अक्सर पूछे जाने वाले सवाल
एजेंट इस तरीके पर कब स्विच करता है?
स्किल कहती है कि खोज, सहायक और सैंडबॉक्स टूल्स में दो-तीन विफलताओं के बाद स्विच करें।
JSON फ़ाइलों में डेटा क्यों सहेजें?
सहेजी हुई फ़ाइलें नतीजों की जाँच आसान बनाती हैं और कुछ गलत होने पर काम आगे बढ़ाने देती हैं।
क्या एजेंट गायब संख्याएँ गढ़ सकता है?
स्किल ज्ञात या उचित रूप से अनुमानित डेटा पर निर्भर है, इसलिए इस्तेमाल से पहले किसी भी अनुमान की जाँच करें।
जानकारी
लेखक का मूल विवरण
Fallback pattern when primary tools fail - embed known data in scripts and persist to JSON for auditability
repo: HKUDS/AgentPilot
लोकप्रियता
- GitHub स्टार
- 7.8k
- रैंकिंग में स्थान
- #12973
- लाइसेंस
- MIT
- अपडेट की गई
- 1/11/2026
कमेंट
- …
इस repository की और skills
agentpilot
7.8kआपके एजेंट को AgentPilot से प्रोजेक्ट को चरण-दर-चरण सुधारने में मदद करती है, जिसमें बदलाव सुझाए, परखे और स्कोर किए जाते हैं।
openspace
7.8kआपके एजेंट को OpenSpace सेट करने में मदद करती है, जो एजेंट स्किल्स सहेजता और वापस लाता है, और MCP के ज़रिए आपके AI ऐप से जुड़ता है।
rsi-arena
7.8kआपके एजेंट को AIME और Terminal-Bench जैसे मानक AI बेंचमार्क टेस्ट सेट करने और चलाने में मदद करती है, ताकि सुधार के तरीकों की तुलना हो सके।
experiment-guide
7.8kआपके एजेंट को छोटे प्रयोग बनाने, उनके नतीजे पढ़ने और जाँच के दौरान उपयोगी निष्कर्ष लिखने में मदद करती है।
मिलती-जुलती skills
gitcrawl
394kयह आपके एजेंट को GitHub issues और pull requests के सेव आर्काइव में खोजने, मिलते-जुलते मामलों को समूह में रखने और लाइव स्थिति जांचने देती है।
slacrawl
394kयह आपके एजेंट को स्थानीय Slack आर्काइव में संदेश खोजने और गिनने, उसकी ताज़गी जांचने और ज़रूरत पड़ने पर उसे ताज़ा करने देती है।
goplaces
394kयह आपके एजेंट को Google Places से जगहें खोजने, उनका विवरण और समीक्षाएं पाने, और जगह के नाम हल करने में मदद करती है, स्क्रिप्ट के लिए JSON आउटपुट के साथ।