ssl-proxy-debug-workflow
Skill này làm gì
Skill này hướng dẫn AI agent qua một loạt bước để tìm ra vì sao một trang web chính phủ hoặc tổ chức không tải được trong script. Nó dành cho những người mở được trang trên trình duyệt nhưng script của họ thất bại.
Khi nào nên dùng
- ✓Khi một script gặp lỗi xác minh chứng chỉ SSL trên một trang web chính phủ.
- ✓Khi một trang hết giờ hoặc trả về lỗi 403 hoặc 407 nhưng trang vẫn chạy được trên trình duyệt.
- ✓Khi cài đặt proxy có thể đang chặn một yêu cầu tới một trang công khai.
Liên kết skill
https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/ssl-proxy-debug-workflow/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Script của tôi không kết nối được một trang dữ liệu chính phủ, nhưng trang này mở được trên trình duyệt. Hãy giúp tôi tìm ra vì sao kết nối thất bại.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent trước hết kiểm tra DNS và kết nối cơ bản, rồi thử các biến thể giao thức và địa chỉ khác nhau. Mỗi lần nó đọc loại lỗi để phân biệt sự cố SSL, proxy và kết nối.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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)
#
Câu hỏi thường gặp
Bước đầu tiên là gì?
Skill kiểm tra tên miền có phân giải được và cổng có truy cập được trước khi xem xét SSL.
Tại sao thử cả http và https?
Các trang chính phủ đôi khi có chuyển hướng cấu hình sai hoặc chỉ chấp nhận một số giao thức nhất định.
Mục tiêu chính là gì?
Mục tiêu là tìm ra loại sự cố kết nối đang xảy ra, để chọn đúng cách khắc phục.
Chi tiết
Mô tả gốc của tác giả
Systematic debugging workflow for SSL/proxy connectivity issues with government and institutional websites
repo: HKUDS/AgentPilot
Độ phổ biến
- Sao GitHub
- 7.8k
- Vị trí xếp hạng
- #13019
- Giấy phép
- MIT
- Cập nhật
- 1/11/2026
Bình luận
- …
Thêm skill từ kho mã này
agentpilot
7.8kGiúp agent của bạn cải thiện dự án từng bước bằng cách chuẩn bị tác vụ và chạy vòng lặp AgentPilot, gồm đề xuất, kiểm thử và chấm điểm thay đổi.
openspace
7.8kGiúp agent của bạn thiết lập OpenSpace, công cụ lưu và lấy lại skill của agent, rồi kết nối nó với ứng dụng AI của bạn qua MCP.
rsi-arena
7.8kGiúp agent của bạn thiết lập và chạy các bài kiểm thử benchmark AI chuẩn, như AIME và Terminal-Bench, để so sánh các phương pháp cải tiến khác nhau.
experiment-guide
7.8kGiúp agent của bạn lên kế hoạch các thí nghiệm nhỏ, đọc kết quả và ghi lại phát hiện khi tìm cách cải thiện một chương trình.
Skill tương tự
diffs
394kGiúp agent của bạn tạo một diff có thể chia sẻ về các chỉnh sửa, dưới dạng liên kết xem hoặc file ảnh, thay vì một bản tóm tắt viết tay.
coding-agent
394kGiúp agent của bạn giao một việc lập trình lớn cho Codex, Claude Code hoặc OpenCode chạy nền, rồi theo dõi tiến độ của nó.
gh-issues
394kGiúp agent của bạn tìm issue trên GitHub, chọn những issue cần xử lý và mở pull request với bản sửa, kể cả theo dõi nhận xét đánh giá.