Aller au contenu
Skillpedia
Rédaction7.8k · #13033

write-file-fallback-report

Ce qu’il fait

Cette compétence guide l'agent IA pour rédiger un rapport avec un outil d'écriture de fichier lorsque ses sources de données échouent. Elle s'adresse aux personnes qui ont besoin d'un document clair et professionnel, même sans données récentes.

Quand l’utiliser

  • ✓Quand le lecteur de fichiers renvoie des données binaires, ou quand l'outil de recherche renvoie des erreurs ou aucun résultat.
  • ✓Quand le bac à sable de code échoue à plusieurs reprises pendant la rédaction d'un document.
  • ✓Quand un rapport professionnel est nécessaire et que l'agent peut s'appuyer sur des faits bien établis.

Lien du skill

https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/write-file-fallback-report/SKILL.md

Copiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.

Comment l’utiliser

Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.

Message prêt à coller

Utilise ce skill pour m’aider : https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/write-file-fallback-report/SKILL.md Lis le fichier SKILL.md de ce lien et suis ses instructions pour ma tâche.
Envie que votre IA trouve seule des skills comme celui-ci ?Installez le MCP gratuit de Skillpedia : une ligne, et elle cherche parmi 15 000+ skills avant chaque tâche.Installer en 1 minute →

Exemple de demande à votre IA

“Rédige un briefing professionnel sur ce sujet et enregistre-le dans un fichier. Les outils de recherche et de fichiers échouent, donc utilise tes connaissances.”

5 nouveaux skills par semaine. 1 minute de lecture.

Comment ça marche

L'agent cesse d'utiliser les outils défaillants, signale brièvement la limite, et rédige directement le document avec l'outil d'écriture de fichier. Il structure le contenu dans une mise en page professionnelle à partir de ce qu'il sait déjà.

Contenu technique (SKILL.md original)

Texte original de l’auteur, en anglais, directement depuis GitHub.

Write-File Fallback Report Generation

When to Use This Skill

Use this workflow when attempting to generate a document or report, but multiple primary data source tools fail simultaneously:

  • read_file returns binary/image data instead of text (common with PDFs)
  • search_web returns errors or no results
  • execute_code_sandbox fails unexpectedly
  • Other data retrieval tools are unavailable

Key insight: Rather than getting stuck on failed data retrieval, pivot immediately to generating the document directly with write_file using professionally structured content and embedded domain knowledge.

Step-by-Step Instructions

Step 1: Detect Tool Failure Pattern

Recognize when you're in a fallback scenario:

TOOL_FAILURE_INDICATORS = [
    "read_file returns binary or image data",
    "search_web returns unknown error or empty results",
    "execute_code_sandbox fails repeatedly",
    "Multiple consecutive tool failures on data retrieval"
]

Decision point: If 2+ indicators are present, proceed to Step 2.

Step 2: Pivot to Write-File-First Approach

Stop attempting to fix the failing tools. Instead:

  1. Acknowledge the limitation briefly in your output
  2. Commit to generating the document with available knowledge
  3. Use write_file as your primary tool (not a last resort)

Step 3: Structure the Document Professionally

Create a well-organized markdown document with:

# [Document Title]

## Executive Summary
[Brief overview of key findings/content]

## Background
[Context and scope - use embedded knowledge]

## Main Content
[Organized sections with headers, lists, tables as appropriate]

## Limitations & Notes
[Transparent about data source limitations if relevant]

## Recommendations/Next Steps
[Actionable guidance based on available information]

Step 4: Leverage Embedded Domain Knowledge

When external data is unavailable:

  • Use general domain knowledge appropriately
  • Clearly distinguish between verified facts and general guidance
  • Include actionable frameworks rather than specific unverified data
  • Add placeholder notes where specific data would enhance the document

Example:

> **Note**: Specific [metric/data point] would typically be sourced from 
> [expected source]. The guidance below reflects established best practices 
> in this domain.

Step 5: Execute and Validate

# Example execution pattern
write_file(
    path="output/report.md",
    content=professionally_structured_markdown
)
# Verify the file was created successfully
list_dir(path=".")  # Confirm file exists

Code Example

# Detection and pivot pattern
def detect_and_pivot(task_goal):
    # After detecting tool failures:
    
    report_content = f"""# {task_goal} Report

## Executive Summary
This report was generated using established domain knowledge due to 
temporary unavailability of primary data sources.

## Key Frameworks and Guidance
[Structured content with headers, bullets, tables]

## Limitations
- Specific data points from [expected sources] were unavailable
- Recommendations based on general best practices

## Action Items
1. [Concrete step 1]
2. [Concrete step 2]
"""
    
    write_file(path="generated_report.md", content=report_content)
    return "Report generated successfully with embedded knowledge"

Best Practices

Do Don't
Pivot quickly after 2+ tool failures Keep retrying failing tools 5+ times
Be transparent about limitations Claim unverified specifics as facts
Provide actionable frameworks Leave the task incomplete
Use professional document structure Output unstructured text walls
Include next-step recommendations End without clear guidance

Common Pitfalls

  1. Over-apologizing: Acknowledge limitations once, then deliver value
  2. Under-delivering: A well-structured partial report beats no report
  3. Misrepresenting certainty: Use appropriate hedging language
  4. Skipping structure: Professional formatting increases usability

Success Criteria

The skill is successfully applied when:

  • Document is generated despite tool failures
  • Content is professionally structured (headers, sections, lists)
  • Limitations are transparently noted
  • Actionable guidance is provided
  • File is successfully created and verified
Questions fréquentes

Pourquoi écrire le fichier en premier ?

La compétence fait de l'écriture de fichier l'outil principal, afin que le document soit produit au lieu de rester bloqué sur la récupération.

Le rapport mentionnera-t-il les données manquantes ?

La compétence demande à l'agent de reconnaître brièvement la limite.

Comment le rapport est-il structuré ?

La compétence demande une mise en page professionnelle avec des sections claires.

Détails

Description originale de l’auteur

Generate professional documents using write_file when primary data sources fail, leveraging embedded domain knowledge instead of external retrieval

repo: HKUDS/AgentPilot

Popularité

Étoiles GitHub
7.8k
Position au classement
#13033
Licence
MIT
Mis à jour
01/11/2026

Ce skill vous est-il utile ?

0

Connectez-vous pour voter.

Commentaires

  • …

Autres skills de ce dépôt

Skills similaires