ssl-proxy-troubleshoot
できること
このスキルは、政府機関のサイトに関するSSL、プロキシ、接続の問題を、AIエージェントが順を追って確認する方法を示します。公的機関からのデータ取得が失敗し続ける人向けです。
使う場面
- ✓スクリプトから政府機関や公的機関のウェブサイトに接続できないとき。
- ✓公開サイトでSSL証明書の検証エラーが出るとき。
- ✓同じサイトがブラウザーでは開けるのに、自動化したタスクでは失敗するとき。
スキルのリンク
https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/ssl-proxy-troubleshoot/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“州のウェブサイトからのデータ取得が、プロキシのエラーで失敗し続けています。どの手順で止まっているかを突き止め、修正案を教えてください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントはPythonのリクエストを実行し、結果をSSL、プロキシ、接続、その他のエラーに分類します。その後、httpとhttpsなどのプロトコルの組み合わせを試し、どのアクセス方法が機能するかを確認します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
SSL/Proxy Troubleshooting for Government Websites
This skill provides a systematic approach to diagnosing and resolving SSL certificate and proxy connectivity issues when accessing government websites, which often have stricter security configurations than commercial sites.
When to Use This Skill
- Cannot access a government or institutional website
- SSL certificate validation errors occur
- Proxy configuration blocks or interferes with requests
- Primary data sources are intermittently or persistently inaccessible
Systematic Troubleshooting Workflow
Step 1: Diagnose the Connection Issue
First, identify what type of connectivity problem you're facing:
import requests
import ssl
url = "https://example.gov/data"
# Test basic connectivity
try:
response = requests.get(url, timeout=10)
print(f"Status: {response.status_code}")
except requests.exceptions.SSLError as e:
print(f"SSL Error: {e}")
except requests.exceptions.ProxyError as e:
print(f"Proxy Error: {e}")
except requests.exceptions.ConnectionError as e:
print(f"Connection Error: {e}")
except Exception as e:
print(f"Other Error: {e}")
Step 2: Try Protocol Variations
Government sites sometimes have misconfigured redirects or support only specific protocols:
urls_to_try = [
"https://example.gov/data",
"http://example.gov/data", # Try unencrypted
"https://www.example.gov/data", # Try www subdomain
"http://www.example.gov/data",
]
for url in urls_to_try:
try:
response = requests.get(url, timeout=10, verify=False)
if response.status_code == 200:
print(f"Success with: {url}")
break
except Exception as e:
print(f"Failed {url}: {e}")
Step 3: Disable SSL Verification (Temporary Debug)
Only use this for debugging. If it works, the issue is SSL certificate-related:
# Option A: Disable verification entirely (debug only)
response = requests.get(url, verify=False, timeout=30)
# Option B: Use custom SSL context with relaxed settings
import ssl
ssl_context = ssl.create_default_context()
ssl_context.check_hostname = False
ssl_context.verify_mode = ssl.CERT_NONE
response = requests.get(url, verify=False, timeout=30)
Warning: Never use verify=False in production. If this is the only working option, document the SSL issue and seek alternative data sources.
Step 4: Manipulate Proxy Settings
Government networks often require specific proxy configurations:
# Option A: Disable proxy entirely
session = requests.Session()
session.trust_env = False # Ignore environment proxy settings
response = session.get(url, timeout=30)
# Option B: Explicitly set proxy
proxies = {
"http": "http://proxy.example.com:8080",
"https": "http://proxy.example.com:8080",
}
response = requests.get(url, proxies=proxies, timeout=30, verify=False)
# Option C: Try without any proxy configuration
import os
os.environ.pop("HTTP_PROXY", None)
os.environ.pop("HTTPS_PROXY", None)
os.environ.pop("http_proxy", None)
os.environ.pop("https_proxy", None)
response = requests.get(url, timeout=30)
Step 5: Test Alternative Domains and Endpoints
Government data is often mirrored or available through alternative access points:
# Common alternative patterns for government sites
alternative_urls = [
url.replace(".gov", ".gov.uk"), # Regional variations
url.replace("data.", "api."), # API subdomain
url.replace("https://", "https://archive."), # Archive mirror
url.replace("/data", "/download"), # Alternative path
]
# Check for data.gov or similar portals
portal_search = f"site:data.gov {topic_keyword}"
Step 6: Use Different HTTP Clients
Some clients handle SSL/proxy differently:
# Try urllib instead of requests
import urllib.request
import ssl
ssl_context = ssl._create_unverified_context()
response = urllib.request.urlopen(url, context=ssl_context, timeout=30)
# Try curl via subprocess
import subprocess
result = subprocess.run(
["curl", "-k", "-L", "--max-time", "30", url],
capture_output=True,
text=True
)
Fallback Strategies When Primary Sources Fail
When all troubleshooting attempts fail after 5-10 iterations:
Strategy 1: Search for Alternative Data Sources
# Search for the same data from different sources
search_queries = [
f"{dataset_name} site:epa.gov",
f"{dataset_name} site:data.gov",
f"{dataset_name} state datab
よくある質問
政府機関のサイトはなぜ接続が難しいのですか?
商用サイトより厳しいセキュリティ設定になっていることが多いとスキルは述べています。
どの種類のエラーを分類しますか?
SSL、プロキシ、接続、その他のカテゴリに分類します。
必ず動く修正策が出ますか?
いいえ。スキルは診断の手順なので、修正策は原因が分かった手順によって異なります。
詳細
作者による元の説明
Systematic workflow for troubleshooting SSL/proxy connectivity issues with government websites
repo: HKUDS/AgentPilot
人気
- GitHubのスター
- 7.8k
- ランキング
- #13021
- ライセンス
- MIT
- 更新日
- 2026/11/1
コメント
- …
このリポジトリの他のスキル
agentpilot
7.8kエージェントが、作業を準備し、変更案を提案してテストし、評価するAgentPilotのループを実行することで、プロジェクトを段階的に改善できるよう支援します。
openspace
7.8kエージェントが、スキルを保存し取り出すツールであるOpenSpaceをセットアップし、MCPを通じてAIアプリに接続できるよう支援します。
rsi-arena
7.8kエージェントが、AIMEやTerminal-Benchなどの標準的なAIベンチマークテストをセットアップして実行し、異なる改善方法を比較できるよう支援します。
experiment-guide
7.8kエージェントが、プログラムを改善する方法を調べる間に、小さな実験を計画し、その結果を読み、発見を記録できるよう支援します。
似ているスキル
diffs
394k編集内容の実際の共有可能な差分を、手書きの要約ではなく、ビューアーのリンクや画像ファイルとして作成するようエージェントを支援します。
coding-agent
394kCodex、Claude Code、OpenCodeに大きめのコーディング作業をバックグラウンドのワーカーとして渡し、その進捗を確認するようエージェントを支援します。
gh-issues
394kGitHubのイシューを探し、取り組むものを選び、修正を含むプルリクエストを開くようエージェントを支援します。レビューコメントへの対応も含みます。