본문으로 건너뛰기
cccskills
무료GitHub에 공개

verify-success-after-unknown-error

Check whether a file creation or transformation task actually succeeded after an unclear execution error. Inspect output files and their contents to distinguish success, partial completion, and failure before deciding whether to retry.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

원문원문 설명 보기

Verify task completion by checking filesystem state when execute_code_sandbox or run_shell return misleading unknown errors

연동 도구Excel
설치 방법 보기

이럴 때 유용합니다

  • Checking output files after an unknown error
  • Validating spreadsheet or JSON contents
  • Deciding whether to retry or fix incomplete output

포함된 파일(2)

  • SKILL.md4.5 KB
  • .skill_id48 B

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Verify Success After Unknown Error

Purpose

When execute_code_sandbox or run_shell return "unknown error" messages, the underlying task may have actually succeeded. This skill provides a systematic approach to verify actual completion before assuming failure and retrying unnecessarily.

When to Apply

Use this pattern when:

  • execute_code_sandbox returns "unknown error" but your code may have completed
  • run_shell fails with unclear error messages
  • File creation, modification, or transformation tasks report errors
  • The error message is generic/unspecified rather than a clear failure reason

Verification Steps

Step 1: Check Expected Output Files

After receiving an unknown error, immediately verify if expected files were created:

# Example: Verify file creation after execute_code_sandbox
from tools import list_dir, read_file

# List directory to check if files exist
files = list_dir(path="/workspace/output")
print(files)

# Check specific file existence
expected_files = ["report.pdf", "data.xlsx"]
for f in expected_files:
    try:
        content = read_file(filetype="pdf", file_path=f"/workspace/output/{f}")
        print(f"✓ {f} exists and is readable")
    except:
        print(f"✗ {f} not found or unreadable")

Step 2: Validate File Content/State

Don't just check existence — verify the files have expected content:

# For spreadsheets
file_content = read_file(filetype="xlsx", file_path="/workspace/output/schedule.xlsx")
# Verify expected sheets, columns, or data exist

# For text/json files
file_content = read_file(filetype="txt", file_path="/workspace/output/result.json")
# Parse and validate structure

# For directories
dir_contents = list_dir(path="/workspace/output")
# Verify expected number of files or specific files exist

Step 3: Decision Logic

IF expected files exist AND content is valid:
    → Task succeeded despite error message
    → Proceed to next step without retry
    
ELIF files exist but content is incomplete:
    → Partial success, may need targeted fix
    
ELSE (files missing or corrupted):
    → True failure, retry or debug required

Code Example: Complete Pattern

def execute_with_verification(code, expected_files):
    """Execute code and verify success even if error returned."""
    
    # Attempt execution
    result = execute_code_sandbox(code=code)
    
    # Check for unknown/generic errors
    if "unknown error" in result.get("output", "").lower() or result.get("error"):
        print("Received error, verifying actual outcome...")
        
        # Verify filesystem state
        all_present = True
        for f in expected_files:
            try:
                list_dir(path=f"/workspace/{f}")  # or appropriate path
                print(f"✓ {f} verified")
            except:
                print(f"✗ {f} missing")
                all_present = False
        
        if all_present:
            print("Task completed successfully despite error message")
            return {"status": "success_verified", "files": expected_files}
        else:
            print("True failure - files not created")
            return {"status": "failed", "error": result.get("error")}
    
    return {"status": "success", "output": result.get("output")}

Shell Command Example

# After run_shell returns error, verify with:
ls -la /workspace/output/
test -f /workspace/output/result.pdf && echo "File exists" || echo "File missing"
file /workspace/output/result.pdf  # Verify file type is correct

Benefits

  • Saves iterations: Avoids unnecessary retries when task already succeeded
  • Handles tool bugs: Works around sandbox/shell tool reporting issues
  • Faster completion: Move forward immediately when verification passes
  • Clearer debugging: Distinguishes true failures from false positives

Anti-Patterns to Avoid

  • ✗ Immediately retrying on any error without verification
  • ✗ Assuming "unknown error" means complete failure
  • ✗ Only checking file existence without validating content
  • ✗ Skipping verification for "minor" tasks (any file output should be verified)

Related Tools

  • list_dir — Check directory contents
  • read_file — Validate file content and accessibility
  • execute_code_sandbox — Primary execution tool this pattern supports
  • run_shell — Shell execution tool this pattern supports

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Prepare audio stems, the separate parts of a track, for mixing by matching their durations with silence, loops, or crossfades. Verify each generated and processed file before moving to the next production step.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Match audio parts with different durations
  • Extend drums and melodic parts using suitable methods
  • Check audio specifications before mixing
HKUDS/OpenSpace7.8천2026년 8월 13일 업데이트

Produce audio in separate stems, meaning individual instrument tracks, and verify each output as you go. Align track lengths with silence, loops, or crossfades, then apply effects, mix a master, and package the files.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Align instrument tracks to a reference audio file
  • Choose how to extend tracks that are too short
  • Verify audio properties after generation and effects
HKUDS/OpenSpace7.8천2026년 8월 13일 업데이트

Build serverless endpoints that relay external API requests for a dashboard while keeping API keys on the server. Includes Vercel examples for input checks, caching, cross-origin access, and consistent JSON responses.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Connect a dashboard to external APIs without exposing API keys
  • Create endpoints for stock quotes and news
  • Standardize API responses and error handling
HKUDS/OpenSpace7.8천2026년 8월 13일 업데이트

Produce a master track and separate audio parts through a structured Python workflow. Apply filters and reverb, export WAV files with consistent settings, package them in a ZIP archive, and check that the deliverables meet the requested specifications.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Export a master track with separate audio parts
  • Apply filters and reverb to audio
  • Check duration and format across deliverables
HKUDS/OpenSpace7.8천2026년 8월 13일 업데이트

Keep document creation moving when web searches and page retrieval repeatedly fail. The skill preserves the original task, uses the model’s existing knowledge, and clearly identifies information that could not be checked against external sources.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Continue drafting after repeated web retrieval failures
  • Preserve task requirements during network errors
  • Mark information that could not be externally verified
HKUDS/OpenSpace7.8천2026년 8월 13일 업데이트

When Python execution repeatedly fails in execute_code_sandbox, use a file-based alternative: save the script, run it through the shell, and capture results or errors. The guidance covers paths, imports, timeouts, structured output, and optional cleanup.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Retry Python work through the shell after repeated sandbox failures
  • Run longer tasks with an adjusted timeout
  • Execute Python work that needs multiple files or system utilities
HKUDS/OpenSpace7.8천2026년 8월 13일 업데이트

HKUDS의 스킬 모두 보기

이 스킬의 문제 신고