ssl-proxy-debug-workflow
できること
このスキルは、政府機関のウェブサイトがスクリプトで開けない理由を見つけるための手順を、AIエージェントに示します。ブラウザーでは開けるのに、スクリプトが失敗する人向けです。
使う場面
- ✓政府機関のウェブサイトで、スクリプトがSSL証明書の検証エラーを受け取るとき。
- ✓ブラウザーでは動くのに、ページがタイムアウトしたり403や407のエラーを返したりするとき。
- ✓プロキシの設定が、公開サイトへのリクエストを妨げているかもしれないとき。
スキルのリンク
https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/ssl-proxy-debug-workflow/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“私のスクリプトは政府のデータサイトに接続できませんが、ブラウザーでは開けます。接続が失敗する理由を調べるのを手伝ってください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは、まずDNSと基本的な接続を確認し、その後、プロトコルやアドレスの組み合わせを変えて試します。毎回エラーの種類を読み、SSL、プロキシ、接続の問題を区別します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
SSL/Proxy Debugging Workflow for Government Websites
This skill provides a systematic approach to troubleshoot and resolve SSL certificate, proxy, and connectivity issues commonly encountered when accessing government and institutional websites.
Recognizing the Problem
Typical symptoms indicating SSL/proxy issues:
requests.exceptions.SSLErrororcertificate verify failederrors- Connection timeouts despite the site being publicly accessible
- Proxy authentication failures
- HTTP 403/407 errors on otherwise valid requests
- Mixed success across different access methods (browser works, script fails)
Systematic Troubleshooting Steps
Step 1: Verify Basic Connectivity
Before assuming SSL issues, confirm the target is reachable:
import requests
import socket
# Test DNS resolution
try:
ip = socket.gethostbyname('example.gov')
print(f"DNS resolved: {ip}")
except Exception as e:
print(f"DNS failure: {e}")
# Test basic TCP connectivity
try:
sock = socket.create_connection(('example.gov', 443), timeout=5)
sock.close()
print("TCP connection successful")
except Exception as e:
print(f"TCP failure: {e}")
Step 2: Try Protocol Variations
Test both HTTP and HTTPS, and try without www prefix:
urls_to_try = [
'https://example.gov',
'http://example.gov',
'https://www.example.gov',
'http://www.example.gov',
'https://subdomain.example.gov',
]
for url in urls_to_try:
try:
response = requests.get(url, timeout=10)
print(f"SUCCESS: {url} - Status: {response.status_code}")
break
except Exception as e:
print(f"FAILED: {url} - {type(e).__name__}: {e}")
Step 3: Disable SSL Verification (Temporary Debug)
For debugging only - never use in production with sensitive data:
import urllib3
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
response = requests.get('https://example.gov', verify=False, timeout=10)
print(f"Status: {response.status_code}")
Step 4: Manipulate Proxy Settings
Government networks often require specific proxy configurations:
# Try without proxy
session = requests.Session()
session.trust_env = False # Ignore system proxy settings
response = session.get('https://example.gov', timeout=10)
# Try with explicit proxy
proxies = {
'http': 'http://proxy.example.com:8080',
'https': 'http://proxy.example.com:8080',
}
response = requests.get('https://example.gov', proxies=proxies, timeout=10)
# Try with proxy authentication
proxies = {
'https': 'http://username:password@proxy.example.com:8080',
}
Step 5: Adjust Request Headers
Some government sites block automated requests:
headers = {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36',
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
'Accept-Language': 'en-US,en;q=0.5',
'Accept-Encoding': 'gzip, deflate',
'Connection': 'keep-alive',
}
response = requests.get('https://example.gov', headers=headers, timeout=10)
Step 6: Test Alternative Domains/Endpoints
Government data may be available through multiple portals:
# Common alternative patterns
alternative_domains = [
'data.example.gov',
'api.example.gov',
'services.example.gov',
'example.illinois.gov', # State-specific
'www.epa.gov/example', # Federal parent site
]
# Search for data mirrors
# Check data.gov, state open data portals, etc.
Step 7: Increase Timeouts and Add Retries
Government sites may be slow or rate-limit:
from requests.adapters import HTTPAdapter
from urllib3.util.retry import Retry
session = requests.Session()
retry = Retry(
total=5,
backoff_factor=2,
status_forcelist=[429, 500, 502, 503, 504],
)
adapter = HTTPAdapter(max_retries=retry)
session.mount('https://', adapter)
session.mount('http://', adapter)
response = session.get('https://example.gov', timeout=30)
Fallback Strategies When Primary Source Fails
Strategy A: Find Alternative Data Sources
# 1. Check federal aggregators
# - data.gov
# - epa.gov (for environmental data)
# - census.gov (for demographic data)
# 2. Check state open data portals
# - Format: data.{state}.gov or {state}.gov/open-data
# 3. Check county/municipal portals
# - Often have more accessible APIs
# 4. Search for cached/archived versions
# - Web Archive (archive.org)
#
よくある質問
最初の手順は何ですか?
SSLを調べる前に、サイト名が解決でき、ポートに到達できるかを確認します。
なぜhttpとhttpsの両方を試すのですか?
政府のサイトは、リダイレクトの設定が誤っていたり、特定のプロトコルしか受け付けなかったりすることがあるためです。
この作業の主な目的は何ですか?
接続の問題がどの種類かを見つけて、適切な対処法を選べるようにすることです。
詳細
作者による元の説明
Systematic debugging workflow for SSL/proxy connectivity issues with government and institutional websites
repo: HKUDS/AgentPilot
人気
- GitHubのスター
- 7.8k
- ランキング
- #13019
- ライセンス
- 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のイシューを探し、取り組むものを選び、修正を含むプルリクエストを開くようエージェントを支援します。レビューコメントへの対応も含みます。