spreadsheet-source-validated
यह क्या करती है
यह स्किल AI एजेंट को स्प्रेडशीट स्क्रिप्ट चलने से पहले उसकी इनपुट फ़ाइलों की मौजूदगी और उपयोगिता जाँचने का निर्देश देती है। यह उन लोगों के लिए है जिनके स्प्रेडशीट काम इसलिए विफल होते हैं क्योंकि स्रोत फ़ाइल गायब या खराब होती है।
कब इस्तेमाल करें
- ✓जब स्प्रेडशीट स्क्रिप्ट ऐसी स्रोत फ़ाइलों पर निर्भर हो जो गायब या न पढ़ी जा सकने वाली हों।
- ✓जब प्रोसेसिंग से पहले आपको स्प्रेडशीट की शीट और कॉलम जाँचने हों।
- ✓जब स्प्रेडशीट डेटा पर Python चलाना विफल हो और कारण इनपुट हो सकता हो।
Skill का लिंक
https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/spreadsheet-direct-python-enhanced-enhanced-2e6773/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“स्क्रिप्ट चलाने से पहले जाँचिए कि इनपुट वर्कबुक और संदर्भ CSV मौजूद हैं और उनमें मुझे चाहिए वाले कॉलम हैं।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट एक सत्यापन फ़ंक्शन चलाता है, जो जाँचता है कि हर स्रोत पाथ मौजूद और पढ़ने योग्य है। फिर वह वर्कबुक या CSV खोलकर पक्का करता है कि ज़रूरी शीट और कॉलम मौजूद हैं, इससे पहले कि कोई प्रोसेसिंग शुरू हो।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Validated Python Execution for Spreadsheet Tasks
Pre-Execution Data Validation
CRITICAL: Before attempting any spreadsheet operations, validate that your source data is accessible and complete.
Step 1: Verify Data Source Availability
import os
import sys
from pathlib import Path
def validate_source_data(source_paths):
"""Validate all required data sources before processing."""
missing = []
inaccessible = []
for path in source_paths:
p = Path(path)
if not p.exists():
missing.append(str(path))
elif not os.access(path, os.R_OK):
inaccessible.append(str(path))
if missing:
print(f"ERROR: Missing data sources: {', '.join(missing)}", file=sys.stderr)
return False
if inaccessible:
print(f"ERROR: Inaccessible data sources: {', '.join(inaccessible)}", file=sys.stderr)
return False
print(f"VALIDATED: {len(source_paths)} source(s) available")
return True
# Usage
sources = ['input.xlsx', 'reference_data.csv']
if not validate_source_data(sources):
sys.exit(1)
Step 2: Verify Data Integrity
import pandas as pd
from openpyxl import load_workbook
def validate_spreadsheet_integrity(file_path, required_sheets=None, required_columns=None):
"""Check spreadsheet structure before processing."""
try:
# Check file is readable
wb = load_workbook(file_path, read_only=True)
# Verify required sheets exist
if required_sheets:
missing_sheets = [s for s in required_sheets if s not in wb.sheetnames]
if missing_sheets:
print(f"ERROR: Missing sheets: {missing_sheets}", file=sys.stderr)
wb.close()
return False
# Verify required columns (sample first sheet)
if required_columns:
ws = wb.active
headers = [cell.value for cell in ws[1]]
missing_cols = [c for c in required_columns if c not in headers]
if missing_cols:
print(f"ERROR: Missing columns: {missing_cols}", file=sys.stderr)
wb.close()
return False
wb.close()
print(f"VALIDATED: Spreadsheet structure OK")
return True
except Exception as e:
print(f"ERROR: Cannot validate spreadsheet: {str(e)}", file=sys.stderr)
return False
Step 3: External Data Source Verification
For data retrieved from APIs, websites, or external services:
import requests
from urllib3.exceptions import SSLError, MaxRetryError
def validate_external_source(url, timeout=30, max_retries=2):
"""Verify external data source is accessible."""
for attempt in range(max_retries + 1):
try:
response = requests.head(url, timeout=timeout, allow_redirects=True)
if response.status_code == 200:
print(f"VALIDATED: External source accessible ({url})")
return True
else:
print(f"WARNING: External source returned {response.status_code}", file=sys.stderr)
except (SSLError, MaxRetryError, requests.ConnectionError) as e:
if attempt == max_retries:
print(f"ERROR: External source inaccessible after {max_retries + 1} attempts: {url}", file=sys.stderr)
return False
print(f"RETRY {attempt + 1}/{max_retries}: {str(e)}", file=sys.stderr)
return False
When to Use This Skill
Use validated Python execution for spreadsheet operations when:
- Source data must be verified before processing begins
- Reading or writing complex Excel files with multiple sheets
- External data sources (APIs, websites) must be accessed first
- 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
- Fallback data sources should be identified if primary sources fail
Handling Inaccessible Data Sources
Protocol for Failed Data Access
- Document the failure with specific error messages
- Identify alternative sources (see Alternative Sources section below)
- Report the blockage clearly before attempting workarounds
- Limit retry attempts to 3 before escalating
Alternative Data Source Iden
अक्सर पूछे जाने वाले सवाल
यह जाँच किस चीज़ को रोकती है?
अगर कोई स्रोत गायब या न पढ़ा जाने वाला हो, तो स्क्रिप्ट समस्या बताकर बिना कोई काम किए रुक जाती है।
क्या यह कॉलम के नाम जाँच सकता है?
हाँ, स्किल का फ़ंक्शन पक्का कर सकता है कि ज़रूरी शीट और कॉलम मौजूद हैं।
क्या यह CSV फ़ाइलों के साथ भी काम करता है?
हाँ, स्किल CSV फ़ाइलों और Excel वर्कबुक दोनों को पढ़ने के लिए pandas इस्तेमाल करती है।
जानकारी
लेखक का मूल विवरण
Execute Python scripts for spreadsheet operations with mandatory source data validation and fallback protocols
repo: HKUDS/AgentPilot
लोकप्रियता
- GitHub स्टार
- 7.8k
- रैंकिंग में स्थान
- #13008
- लाइसेंस
- 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 आउटपुट के साथ।