context-anchored-fallback-report
Qué hace
Esta skill guía al agente de IA para mantenerse en el objetivo original del informe cuando fallan varias herramientas de datos. Es para personas que necesitan un documento producido aunque las fuentes no estén disponibles.
Cuándo usarla
- ✓Cuando dos o más herramientas de datos fallan mientras el agente redacta un documento o un informe.
- ✓Cuando el agente corre el riesgo de cambiar a una tarea no relacionada tras errores de herramientas.
- ✓Cuando el informe debe escribirse igualmente con los conocimientos del agente y guardarse en un archivo.
Link de la skill
https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/write-file-fallback-report-enhanced-4bc5c2/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
“Escribe el informe de mercado que te pedí. Las herramientas web siguen fallando, así que usa lo que sabes, mantente en este tema y guárdalo como archivo.”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
Tras dos fallos, el agente se fija en el objetivo original, deja de reintentar las herramientas que fallan y escribe el informe con sus propios conocimientos. Guarda el resultado con una herramienta de escritura de archivos e indica los límites de sus fuentes.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de GitHub.
Context-Anchored Fallback Report Generation
Critical Warning: Context Drift Prevention
DO NOT ABANDON THE ORIGINAL TASK when tools fail. The most common failure mode is switching to an unrelated task after encountering tool errors.
CONTEXT_DRIFT_WARNING:
IF tool_failures occur (read_webpage, search_web, execute_code_sandbox)
THEN you MUST stay on the ORIGINAL task
AND you MUST NOT switch to unrelated tasks
AND you MUST generate output for the original goal using write_file
When to Use This Skill
Activate this workflow when multiple primary data source tools fail during document/report generation:
Trigger Decision Tree
START: Attempting to generate document/report
│
├─→ Tool #1 fails (read_webpage/search_web/read_file/execute_code_sandbox)?
│ │
│ ├─→ YES → Count = 1, Continue attempting
│ │
│ └─→ NO → Proceed normally with retrieved data
│
├─→ Tool #2 fails (same or different tool)?
│ │
│ ├─→ YES → Count = 2, TRIGGER FALLBACK NOW
│ │ │
│ │ ├─→ LOCK to original task goal (write it down)
│ │ ├─→ Stop attempting failing tools
│ │ └─→ Generate document with write_file + embedded knowledge
│ │
│ └─→ NO → Continue with 1-2 more attempts max
│
└─→ 2+ consecutive failures without document output?
│
└─→ CRITICAL ERROR: You are drifting from task. STOP and apply this skill.
Tool Failure Indicators
FALLBACK_TRIGGERS = {
"read_file": "returns binary/image data instead of text, or file not found",
"search_web": "returns unknown error, empty results, or rate limited",
"read_webpage": "returns unknown error, connection timeout, or blocked access",
"execute_code_sandbox": "fails with unknown error or timeout repeatedly",
"any_retrieval_tool": "2+ consecutive failures on data retrieval attempts"
}
Activation threshold: 2+ failures from the above triggers = IMMEDIATE fallback activation.
Step-by-Step Instructions
Step 0: Context Anchor (BEFORE pivoting)
CRITICAL STEP: Before any fallback action, write down the original task:
CONTEXT_ANCHOR = "[Original task goal from user request]"
Example:
CONTEXT_ANCHOR = "Create PACT Act veterans benefits document explaining claim process"
Rule: Every subsequent action must reference and serve this CONTEXT_ANCHOR. Never deviate.
Step 1: Detect and Declare Failure Pattern
When 2+ tool failures occur:
State the limitation clearly (once, briefly):
Note: External data sources (web search, webpage access) are currently unavailable. This report will be generated using established domain knowledge.Declare the pivot explicitly:
Pivoting to write_file-based document generation with embedded knowledge. Task remains: [CONTEXT_ANCHOR]Do NOT:
- Apologize repeatedly
- Continue retrying failed tools beyond 2 attempts
- Suggest the task cannot be completed
- Switch to a different task
Step 2: Pre-Compute Available Knowledge
Before writing, inventory what you CAN provide:
# Knowledge inventory for the task
available_knowledge = {
"domain_frameworks": "General best practices, standard procedures",
"structural_templates": "Professional document formats for this type",
"actionable_guidance": "Step-by-step processes based on established patterns",
"placeholder_markers": "Where specific data would enhance (clearly marked)"
}
Step 3: Generate Document with write_file
Create professionally structured content:
# [Document Title - aligned with CONTEXT_ANCHOR]
## Executive Summary
[2-3 sentences on what this document covers, noting data source limitations if relevant]
## Background & Scope
[Context based on embedded domain knowledge]
## Core Content
[Organized sections with:
- Clear headers (##, ###)
- Bullet points and numbered lists
- Tables where appropriate
- Code blocks for technical content
]
## Data Source Notes
> **Note**: Specific data points that would typically come from [expected sources]
> were unavailable at generation time. Content reflects established practices
> in this domain.
## Actionable Recommendations
1. [Concrete step 1]
2. [Concrete step 2]
3. [Next steps for obtaining specific data if needed]
## Task Completion Status
- **Original Goal**: [CONTEXT_ANCHOR]
- **Completion Method**: Generated via write_file with embedde
Preguntas frecuentes
¿Qué significa deriva de contexto aquí?
Significa cambiar a una tarea no relacionada tras errores de herramientas, algo que la skill advierte que hay que evitar.
¿Cuándo empieza el respaldo?
La skill indica que se active tras el segundo intento fallido de herramienta.
¿Dónde se guarda el informe?
El agente lo guarda como archivo con la herramienta de escritura de archivos.
Detalles
Descripción original del autor
Generate documents with write_file when retrieval tools fail, with explicit guardrails against task context drift
repo: HKUDS/AgentPilot
Popularidad
- Estrellas en GitHub
- 7,8 mil
- Posición en el ranking
- #13031
- 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
obsidian-vault-maintainer
394 milAyuda a tu agente a mantener ordenado un almacén de memoria compatible con Obsidian, con enlaces de wiki que funcionan, propiedades coherentes y secciones generadas seguras.
wiki-maintainer
394 milAyuda a tu agente a mantener una wiki de memoria de OpenClaw con páginas repetibles, bloques gestionados seguros y comprobaciones de contradicciones o huecos.
obsidian
394 milPermite que tu agente lea, busque, cree y edite notas, tareas, enlaces y propiedades de Obsidian con la línea de comandos oficial de Obsidian.