本文へスキップ
Skillpedia
ライティング7.8k · #13031

context-anchored-fallback-report

できること

このスキルは、複数のデータツールが失敗したときに、AIエージェントが元のレポートの目的に集中し続けるよう導きます。情報源が使えなくても、文書を作る必要がある人向けです。

使う場面

  • ✓エージェントが文書やレポートを書いている途中で、2つ以上のデータツールが失敗したとき。
  • ✓ツールのエラーの後、関係のないタスクに切り替わるおそれがあるとき。
  • ✓自分の知識でレポートを書き、ファイルに保存しなければならないとき。

スキルのリンク

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

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/write-file-fallback-report-enhanced-4bc5c2/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“依頼した市場レポートを書いてください。ウェブツールが失敗し続けているので、知っている内容を使い、このテーマから外れず、ファイルとして保存してください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

2回失敗した後、エージェントは元の目的に集中し、失敗したツールを再試行するのをやめます。自分の知識でレポートを書き、ファイル書き込みツールで保存し、情報源の限界を明記します。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)を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:

  1. 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.
    
  2. Declare the pivot explicitly:

    Pivoting to write_file-based document generation with embedded knowledge.
    Task remains: [CONTEXT_ANCHOR]
    
  3. 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
よくある質問

ここでの「コンテキストのずれ」とは何ですか?

ツールのエラーの後に、無関係な作業に切り替わることを指し、スキルはこれを避けるよう警告しています。

この代替手段はいつ始まりますか?

2回目のツールの失敗の後に始めるよう、スキルは定めています。

レポートはどこに保存されますか?

エージェントは、ファイル書き込みツールを使ってファイルとして保存します。

詳細

作者による元の説明

Generate documents with write_file when retrieval tools fail, with explicit guardrails against task context drift

repo: HKUDS/AgentPilot

人気

GitHubのスター
7.8k
ランキング
#13031
ライセンス
MIT
更新日
2026/11/1

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル