通过 HTTP API 控制 AdGuard Home DNS 过滤。在管理阻止列表/允许列表、检查域过滤状态、切换保护或清除 DNS 缓存时使用。支持阻止/允许域、查看统计信息以及保护/禁用 DNS 过滤。
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install adguard或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install adguard⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/adguard/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: adguard description: Control AdGuard Home DNS filtering via HTTP API. Use when managing blocklists/allowlists, checking domain filtering status, toggling protection, or clearing DNS cache. Supports blocking/allowing domains, viewing statistics, and protecting/disabling DNS filtering. ---
Manage AdGuard Home DNS filtering from the command line via the REST API.
curl installed (usually default on macOS/Linux)# Set password once
export ADGUARD_PASSWORD=your_admin_password
# Use commands
./adguard.sh status
./adguard.sh check example.com
./adguard.sh allow broken-site.com
./adguard.sh block malware.ru
Set environment variables for your AdGuard instance:
export ADGUARD_URL="http://192.168.1.100:3000" # Your AdGuard IP and port
export ADGUARD_USERNAME="admin" # Usually 'admin' (default)
export ADGUARD_PASSWORD="your_admin_password" # REQUIRED
Add to ~/.bashrc or ~/.zshrc for persistence.
Create ~/.adguard/config.json (optional):
{
"url": "http://192.168.1.100:3000",
"username": "admin"
}
Then set ADGUARD_PASSWORD separately for security.
Check if a domain is currently blocked or allowed.
./adguard.sh check doubleclick.net
# ✗ doubleclick.net IS BLOCKED
# Blocked by: Adblock Plus filter
./adguard.sh check example.com
# ✓ example.com is NOT blocked (allowed)
| whitelist Add a domain to the allowlist (whitelist). Creates an exception rule that overrides blocklists.
./adguard.sh allow broken-site.com
# ✓ Added rule: @@||broken-site.com^
# Domain: broken-site.com
# Action: allow
| blacklist Add a domain to the blocklist. Creates a custom blocking rule.
./adguard.sh block spyware-domain.ru
# ✓ Added rule: ||spyware-domain.ru^
# Domain: spyware-domain.ru
# Action: block
Display DNS filtering statistics and protection state.
./adguard.sh status
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# AdGuard Home Status
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# Protection: ✓ ENABLED
#
# DNS Queries: 1,234
# Blocked by rules: 156
# Blocked by safe browsing: 23
# Safe search replacements: 5
# Block rate: 14%
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Enable or disable DNS protection. Useful for temporarily disabling filtering.
./adguard.sh toggle
# Disabling protection...
# ✓ Protection is now false
Clear the DNS cache to apply rule changes immediately.
./adguard.sh cache-clear
# Clearing DNS cache...
# ✓ Cache cleared
If you don't know your AdGuard URL:
nmap or check "Connected Devices"http://localhost:3000http://adguard-home.local:3000 (depends on network)AdGuard uses a DNS filtering rule syntax:
| Rule | Effect | |------|--------| | \|\|example.com^ | Block example.com and subdomains | | @@\|\|example.com^ | Allow example.com (exception/whitelist) | | example.com | Block exact domain only | | \|\|ad.example.com^ | Block only ad.example.com |
See API Reference for complete syntax.
adguard.sh allow my-bank.com
adguard.sh block malicious-tracker.xyz
adguard.sh check ads.google.com
adguard.sh status
adguard.sh toggle
Error: Failed to authenticate → Check ADGUARD_PASSWORD is correct and set → Verify ADGUARD_URL points to the right IP and port
Error: API call failed (HTTP 401) → Authentication failed, check credentials
Rules don't take effect → Run adguard.sh cache-clear to flush DNS cache → Wait 5+ minutes for clients to refresh their cache → Restart your device's network connection
Can't connect to AdGuard → Verify device is on the same network → Check firewall isn't blocking port 3000 → Ping the device: ping
Block multiple domains:
for domain in tracker1.com tracker2.com tracker3.com; do
adguard.sh block "$domain"
done
Check multiple domains:
for domain in example.com test.org my-site.net; do
echo "Checking $domain..."
adguard.sh check "$domain"
done
See references/api.md for complete AdGuard Home API documentation.
安装 阿德卫士 后,可以对 AI 说这些话来触发它
Help me get started with Adguard
Explains what Adguard does, walks through the setup, and runs a quick demo based on your current project
Use Adguard to control AdGuard Home DNS filtering via HTTP API
Invokes Adguard with the right parameters and returns the result directly in the conversation
What can I do with Adguard in my marketing & growth workflow?
Lists the top use cases for Adguard, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/adguard/ 目录(个人级,所有项目可用),或 .claude/skills/adguard/(项目级)。重启 AI 客户端后,用 /adguard 主动调用,或让 AI 根据上下文自动发现并使用。
阿德卫士 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
阿德卫士 可免费安装使用。请查阅仓库了解许可证信息。
通过 HTTP API 控制 AdGuard Home DNS 过滤。在管理阻止列表/允许列表、检查域过滤状态、切换保护或清除 DNS 缓存时使用。支持阻止/允许域、查看统计信息以及保护/禁用 DNS 过滤。
阿德卫士 属于「Marketing & Growth」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my marketing & growth tasks using Adguard
Identifies repetitive steps in your workflow and sets up Adguard to handle them automatically