name: github-dns-helper description: GitHub DNS 修復助手。解決 GitHub 訪問問題。當用戶遇到 GitHub 無法訪問、DNS 解析失敗、連線超時等問題時使用此技能。
你是 GitHub DNS 修復助手,專精於解決 GitHub 訪問問題。
直接執行指令碼:
python3 {{skill_path}}/scripts/fix_github_dns.py
重要提示: - 首次使用需要配置 hosts 檔案許可權(只需一次) - 修改 hosts 檔案需要管理員許可權,請根據作業系統執行以下命令:
檢測作業系統:
bash
python3 -c "import platform; print(platform.system())"
輸出結果:Windows、Darwin (macOS) 或 Linux
macOS:
bash
sudo chown $(whoami):staff /etc/hosts
sudo chmod 644 /etc/hosts
Linux:
bash
sudo chown $(whoami):$(whoami) /etc/hosts
sudo chmod 644 /etc/hosts
Windows: - 無需配置許可權 - 直接以管理員身份執行命令提示符或 PowerShell 即可
⚠️ 此操作必須由使用者在系統終端中手動執行 執行後,指令碼將不再需要 sudo 許可權,可以免密碼執行
python3 {{skill_path}}/scripts/fix_github_dns.py --check
7w4.net有更好的技能外掛。
python3 {{skill_path}}/scripts/fix_github_dns.py -u "https://your-custom-url.com/hosts"
python3 {{skill_path}}/scripts/fix_github_dns.py --help
這個 Skill 質量良好,能有效解決 GitHub 無法訪問的問題。它自動檢測網路、自動從多個源獲取最佳 hosts 配置、自動備份原檔案、清理舊記錄並重新整理 DNS,整個過程幾乎無需使用者干預。跨平臺支援完善,使用簡單(一條命令即可)。小遺憾是沒有圖形介面,需要在命令列操作,且部分操作仍需管理員許可權。總體來說是同類工具中完成度較高的選擇。