write-file-fallback-report
Skill này làm gì
Skill này hướng dẫn AI agent viết báo cáo bằng công cụ ghi file khi nguồn dữ liệu thất bại. Nó dành cho những người cần một tài liệu rõ ràng, chuyên nghiệp ngay cả khi không có dữ liệu mới.
Khi nào nên dùng
- ✓Khi công cụ đọc file trả về dữ liệu nhị phân, hoặc công cụ tìm kiếm trả về lỗi hoặc không có kết quả.
- ✓Khi sandbox mã thất bại liên tục trong lúc làm tài liệu.
- ✓Khi cần một báo cáo chuyên nghiệp và agent có thể dựa vào các sự thật đã biết.
Liên kết skill
https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/write-file-fallback-report/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Viết một bản tóm tắt chuyên nghiệp về chủ đề này và lưu thành file. Công cụ tìm kiếm và công cụ file đang lỗi, nên hãy dùng những gì bạn biết.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent ngừng thử các công cụ đang lỗi, ghi nhận giới hạn một cách ngắn gọn và viết tài liệu trực tiếp bằng công cụ ghi file. Nó sắp xếp nội dung theo bố cục chuyên nghiệp bằng những gì đã biết.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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_filereturns binary/image data instead of text (common with PDFs)search_webreturns errors or no resultsexecute_code_sandboxfails 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:
- Acknowledge the limitation briefly in your output
- Commit to generating the document with available knowledge
- Use
write_fileas 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
- Over-apologizing: Acknowledge limitations once, then deliver value
- Under-delivering: A well-structured partial report beats no report
- Misrepresenting certainty: Use appropriate hedging language
- 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
Câu hỏi thường gặp
Tại sao ghi file trước?
Skill biến việc ghi file thành công cụ chính, để tài liệu vẫn được tạo ra thay vì mắc kẹt ở việc lấy dữ liệu.
Báo cáo có đề cập dữ liệu còn thiếu không?
Skill yêu cầu agent thừa nhận giới hạn một cách ngắn gọn.
Báo cáo được cấu trúc thế nào?
Skill yêu cầu bố cục chuyên nghiệp với các phần rõ ràng.
Chi tiết
Mô tả gốc của tác giả
Generate professional documents using write_file when primary data sources fail, leveraging embedded domain knowledge instead of external retrieval
repo: HKUDS/AgentPilot
Độ phổ biến
- Sao GitHub
- 7.8k
- Vị trí xếp hạng
- #13033
- Giấy phép
- MIT
- Cập nhật
- 1/11/2026
Bình luận
- …
Thêm skill từ kho mã này
agentpilot
7.8kGiúp agent của bạn cải thiện dự án từng bước bằng cách chuẩn bị tác vụ và chạy vòng lặp AgentPilot, gồm đề xuất, kiểm thử và chấm điểm thay đổi.
openspace
7.8kGiúp agent của bạn thiết lập OpenSpace, công cụ lưu và lấy lại skill của agent, rồi kết nối nó với ứng dụng AI của bạn qua MCP.
rsi-arena
7.8kGiúp agent của bạn thiết lập và chạy các bài kiểm thử benchmark AI chuẩn, như AIME và Terminal-Bench, để so sánh các phương pháp cải tiến khác nhau.
experiment-guide
7.8kGiúp agent của bạn lên kế hoạch các thí nghiệm nhỏ, đọc kết quả và ghi lại phát hiện khi tìm cách cải thiện một chương trình.
Skill tương tự
obsidian-vault-maintainer
394kGiúp agent của bạn giữ gọn kho ghi nhớ kiểu Obsidian, với liên kết wiki hoạt động tốt, thuộc tính nhất quán và các phần tự tạo an toàn.
wiki-maintainer
394kGiúp agent của bạn duy trì wiki bộ nhớ OpenClaw với các trang có thể lặp lại, khối được quản lý an toàn và kiểm tra mâu thuẫn hoặc thiếu sót.
obsidian
394kCho phép agent của bạn đọc, tìm, tạo và sửa ghi chú, công việc, liên kết và thuộc tính trong Obsidian bằng dòng lệnh Obsidian chính thức.