spreadsheet-validated-exec
यह क्या करती है
यह स्किल AI एजेंट को Python में स्प्रेडशीट काम करने से पहले उसके डेटा स्रोतों की पुष्टि करने का निर्देश देती है। यह उन लोगों के लिए है जिनके काम पहुँच से बाहर या अधूरे डेटा पर समय बर्बाद करते हैं।
कब इस्तेमाल करें
- ✓जब स्प्रेडशीट काम कई स्रोतों का उपयोग करे और उनमें से एक पहुँच से बाहर हो सकता हो।
- ✓जब कई शीट वाला जटिल Excel काम चलने वाला हो।
- ✓जब स्रोत विफल होने पर आपको साफ़ एरर संदेश और बैकअप योजना चाहिए।
Skill का लिंक
https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/spreadsheet-direct-python-enhanced-enhanced-f0b1db/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“सारांश बनाने से पहले जाँचिए कि मेरी स्रोत शीट पहुँच में हैं और पूरी हैं। अगर एक विफल हो, तो बताइए कि आप कौन सा बैकअप इस्तेमाल करेंगे।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट प्रोसेसिंग स्क्रिप्ट लिखने से पहले जाँचता है कि हर स्रोत फ़ाइल या URL पहुँच योग्य है और अपेक्षित फ़ील्ड रखता है। मुख्य स्रोत न पहुँचे तो उसके लिए वह बैकअप स्रोत नोट करता है, और जटिल काम सहेजी हुई फ़ाइल से चलाता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Validated Python Execution for Spreadsheet Tasks
Overview
This skill extends direct Python execution for spreadsheet operations by adding a mandatory data validation phase before any processing begins. This prevents wasted iterations on inaccessible data sources and provides clear error documentation when data cannot be accessed.
When to Use This Skill
Use validated direct run_shell with Python scripts for spreadsheet operations when:
- Reading or writing complex Excel files with multiple sheets
- Data sources have already been validated as accessible
- You have fallback sources identified in case of access failures
- Applying formulas, formatting, or data transformations
- Working with
openpyxl,pandas, or similar libraries - The operation involves multiple steps that could exceed agent step limits
- You need precise control over error handling and debugging
- Complex scripts benefit from file-based execution for better reliability
Why Validated Direct Execution?
Beyond standard shell_agent limitations, unvalidated data access causes:
- Wasted iterations attempting to process non-existent data
- Unclear error messages when source files are inaccessible
- No graceful degradation when primary sources fail
- Missing documentation of why data operations couldn't complete
Direct run_shell with Python validation is more reliable because it:
- Executes validation in a single step with no iteration limits
- Provides clearer, immediate error messages for access failures
- Handles complex operations without step constraints
- Gives full control over library imports and execution flow
- Writing scripts to
.pyfiles first avoids shell_agent parsing issues with heredocs - Documents all access failures for troubleshooting and reporting
Phase 0: Data Source Validation (REQUIRED)
Before writing any spreadsheet processing code, verify your data sources are accessible:
Step 0.1: Verify Data Availability
import os
import requests
from pathlib import Path
# For local files
def verify_local_file(file_path):
path = Path(file_path)
if not path.exists():
raise FileNotFoundError(f"Data file not found: {file_path}")
if not path.is_file():
raise ValueError(f"Path is not a file: {file_path}")
if path.stat().st_size == 0:
raise ValueError(f"Data file is empty: {file_path}")
print(f"✓ Local file verified: {file_path} ({path.stat().st_size} bytes)")
return True
# For remote URLs
def verify_remote_url(url, timeout=30):
try:
# Try HEAD request first (lighter than GET)
response = requests.head(url, timeout=timeout, allow_redirects=True)
if response.status_code == 405: # HEAD not allowed, try GET
response = requests.get(url, timeout=timeout, stream=True)
response.raise_for_status()
# Check content type if available
content_type = response.headers.get('Content-Type', '')
if 'text/html' in content_type and 'excel' not in url.lower():
print(f"⚠ Warning: URL may return HTML, not data file")
print(f"✓ Remote URL verified: {url} (Status: {response.status_code})")
return True
except requests.exceptions.SSLError as e:
print(f"✗ SSL Error: {str(e)}")
return False
except requests.exceptions.ConnectionError as e:
print(f"✗ Connection Error: {str(e)}")
return False
except requests.exceptions.Timeout as e:
print(f"✗ Timeout Error: {str(e)}")
return False
except Exception as e:
print(f"✗ Verification Failed: {str(e)}")
return False
Step 0.2: Handle Inaccessible Sources
If primary data source is unavailable:
Check alternative locations:
- Is data available from a backup URL?
- Is there a cached/local copy available?
- Can data be obtained from an API instead of web scraping?
- Is there an alternative data provider?
Document the failure:
def log_access_failure(source, error_type, timestamp=None): from datetime import datetime if not timestamp: timestamp = datetime.now().isoformat() error_log = { 'timestamp': timestamp, 'source': source, 'error_type': error_type, 'alternatives_attempted': [], 'resolution': 'pending' } # Save to error log file import json with open('data_acce
अक्सर पूछे जाने वाले सवाल
स्रोत गायब हो तो क्या होता है?
स्किल कहती है कि एरर साफ़ बताएँ और मौजूद हो तो सूचीबद्ध बैकअप स्रोत इस्तेमाल करें।
प्रोसेसिंग से पहले जाँच क्यों?
स्किल बताती है कि पहले जाँच करने से उस डेटा पर बर्बाद प्रयास टलते हैं जो है ही नहीं।
क्या यह फ़ॉर्मूला और फ़ॉर्मैटिंग संभालता है?
हाँ, स्किल डेटा सत्यापित होने के बाद फ़ॉर्मूला, फ़ॉर्मैटिंग और बदलाव को कवर करती है।
जानकारी
लेखक का मूल विवरण
Execute Python scripts for spreadsheets with prerequisite data validation and source accessibility checks
repo: HKUDS/AgentPilot
लोकप्रियता
- GitHub स्टार
- 7.8k
- रैंकिंग में स्थान
- #13009
- लाइसेंस
- 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 आउटपुट के साथ।