spreadsheet-validated-exec
Qué hace
Esta skill hace que el agente de IA confirme sus fuentes de datos antes de ejecutar trabajo con hojas de cálculo en Python. Está pensada para quienes pierden tiempo en trabajos con datos inaccesibles o incompletos.
Cuándo usarla
- ✓Cuando un trabajo con hojas de cálculo usa varias fuentes y una puede ser inaccesible.
- ✓Cuando está a punto de ejecutarse un trabajo complejo de Excel con varias hojas.
- ✓Cuando quieres un mensaje de error claro y un plan de alternativa si una fuente falla.
Link de la skill
https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/spreadsheet-direct-python-enhanced-enhanced-f0b1db/SKILL.mdCópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.
Cómo usar
La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.
Mensaje listo para pegar
Para Claude Code, Codex o Cursor: ejecútalo en la carpeta del proyecto y la skill queda instalada.
Descarga el SKILL.md y ponlo en la carpeta de skills de tu agente.
Ejemplo de qué pedirle a la IA
“Comprueba que mis hojas de origen son accesibles y están completas antes de crear el resumen. Si una falla, dime qué alternativa usarías.”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
El agente comprueba que cada archivo de origen o URL es accesible y contiene los campos esperados antes de escribir el script de procesamiento. Anota fuentes alternativas por si no se puede acceder a la principal, y ejecuta los trabajos complejos desde un archivo guardado.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de 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
Preguntas frecuentes
¿Qué pasa si falta una fuente?
La skill indica informar del error con claridad y usar una fuente alternativa de la lista, si existe.
¿Por qué comprobar antes de procesar?
La skill indica que comprobar primero evita intentos desperdiciados con datos que no están.
¿Gestiona fórmulas y formato?
Sí. La skill cubre fórmulas, formato y transformaciones una vez validados los datos.
Detalles
Descripción original del autor
Execute Python scripts for spreadsheets with prerequisite data validation and source accessibility checks
repo: HKUDS/AgentPilot
Popularidad
- Estrellas en GitHub
- 7,8 mil
- Posición en el ranking
- #13009
- Licencia
- MIT
- Actualizada
- 1/11/2026
Comentarios
- …
Más skills de este repositorio
agentpilot
7,8 milAyuda a tu agente a mejorar un proyecto paso a paso, preparando una tarea y ejecutando el bucle de AgentPilot que propone, prueba y puntúa cambios.
openspace
7,8 milAyuda a tu agente a configurar OpenSpace, una herramienta que guarda y recupera skills de agentes, y a conectarla a tu app de IA mediante MCP.
rsi-arena
7,8 milAyuda a tu agente a configurar y ejecutar pruebas de referencia de IA conocidas, como AIME y Terminal-Bench, para comparar distintos métodos de mejora.
experiment-guide
7,8 milAyuda a tu agente a planificar experimentos pequeños, leer sus resultados y anotar conclusiones mientras investiga cómo mejorar un programa.
Skills parecidas
gitcrawl
394 milPermite que tu agente busque en un archivo guardado de incidencias y pull requests de GitHub, agrupe duplicados y revise su estado actual en GitHub.
slacrawl
394 milPermite que tu agente busque y cuente mensajes en un archivo local de Slack, revise qué tan reciente es y lo actualice cuando haga falta.
goplaces
394 milAyuda a tu agente a buscar lugares, obtener sus detalles y reseñas, y resolver nombres de lugares usando Google Places, con salida JSON para scripts.