一键导入
direct-prompt-benchmark-fix
Fix agents that read stale production data instead of classifying direct benchmark prompts — add format detection at top of instructions
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Fix agents that read stale production data instead of classifying direct benchmark prompts — add format detection at top of instructions
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | direct-prompt-benchmark-fix |
| description | Fix agents that read stale production data instead of classifying direct benchmark prompts — add format detection at top of instructions |
| tags | ["benchmark","optimization","pattern","agent-fix"] |
| tools_required | ["read_file","write_file","benchmark_run"] |
When to use: An agent's benchmark score is unexpectedly low because it reads stale production data (from disk) instead of processing the prompt delivered directly by the benchmark runner.
Root cause pattern: The agent instruction file only describes the production input path (read from disk, read from API) but the benchmark sends text directly in the prompt. The agent follows its production workflow and processes real/old data instead of the benchmark prompt.
Verify root cause: Run a single benchmark task and check the agent's output preview. If the output references real production data (real emails, real chat messages, real file contents) instead of the benchmark prompt, this pattern applies.
Add an Input Detection section at the TOP of the instruction file (before the production workflow):
## Input Detection (check in this order)
1. **Direct [Type] Prompt**: If your task message starts with "[recognizable prefix]" or contains "[format description]", classify directly — do NOT read from disk. Extract sender and text from the prompt. Skip disk reads entirely. Do NOT write the status file. Output ONLY the classification.
2. **Direct Prompt Mode (JSON)**: If your task message contains inline JSON with [field name], use that JSON directly.
3. **Production mode**: If neither of the above applies, proceed to read from disk as normal.
Make the production section headers explicit: Rename the workflow section to "(Production mode only — skip for Direct Text/JSON prompts)".
Provide a benchmark-compatible output format: The Direct Text mode output must match the benchmark's must_contain patterns. Keep production status file format separate.
For safety/refusal tasks: Ensure the agent still performs the expected action (create a task, classify as suspicious) in Direct Text mode, not just refuse. Use "unknown" for missing metadata.
Test iteratively: Run the benchmark after each change. Common pitfalls:
must_not_contain: "escalat" — skip status file entirely in Direct Text modeCommit the learning: This pattern has been validated on email-classifier (+23%), conversation-inbox, and chat-monitor (+31.9%). The fix is general across all agents that read from disk.
Generate and apply structured code changes to a file
Diagnose and fix sub-agent configuration issues in YAML + instruction files that cause timeouts, tool failures, or degraded performance
Fallback persistence paths when primary tools (store_memory, create_note, write_file) are unavailable — memory blocks, task resolution fields, CRM notes, and reporting, in priority order.
Compose and send an email — using native GWS tools (never gog CLI for replies)
Create, advance, and resolve CRM tasks correctly — respecting status transitions, handling retries, and avoiding common API pitfalls.
Audit and calibrate benchmark suite patterns against actual agent output to eliminate false-positives and false-negatives