Control Pi-hole v6 DNS ad blocker: check status, view stats, enable/disable block, and analyze blocked domains via API.
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install pihole或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install pihole⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/pihole/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
Control your Pi-hole DNS ad blocker via the Pi-hole v6 API.
Set your Pi-hole API configuration in Clawdbot config:
skills:
entries:
pihole:
apiUrl: "https://pi-hole.local/api" # v6 API path
apiToken: "your-app-password-here" # Get from Pi-hole Admin
insecure: false # Set to true for self-signed certs
Alternatively, set environment variables:
export PIHOLE_API_URL="https://pi-hole.local/api"
export PIHOLE_API_TOKEN="your-app-password-here"
export PIHOLE_INSECURE="false"
http://pi-hole.local/adminapiToken# Check Pi-hole status
"pihole status"
# Turn off ad blocking
"pihole off"
# Turn on ad blocking
"pihole on"
# Disable for 5 minutes (for a site that needs ads)
"pihole disable 5m"
# Disable for 30 minutes
"pihole disable 30"
# See what was blocked in the last 30 minutes
"pihole blocked"
# See blocked domains in last 10 minutes (600 seconds)
"pihole blocked 600"
# Show statistics
"pihole stats"
POST /api/auth
Content-Type: application/json
{"password":"your-app-password"}
Response:
{
"session": {
"sid": "session-token-here",
"validity": 1800
}
}
GET /api/dns/blocking
Headers: sid: <session-token>
Response:
{
"blocking": "enabled" | "disabled",
"timer": 30 // seconds until re-enable (if disabled with timer)
}
POST /api/dns/blocking
Headers: sid: <session-token>
Content-Type: application/json
Enable:
{"blocking":true}
Disable:
{"blocking":false}
Disable with timer (seconds):
{"blocking":false,"timer":300}
GET /api/stats/summary
Headers: sid: <session-token>
Response:
{
"queries": {
"total": 233512,
"blocked": 23496,
"percent_blocked": 10.06
},
"gravity": {
"domains_being_blocked": 165606
},
"clients": {
"active": 45
}
}
GET /api/queries?start=-<seconds>
Headers: sid: <session-token>
Response:
{
"queries": [
{
"domain": "example.com",
"status": "GRAVITY",
"time": 1768363900,
"type": "A"
}
]
}
Pi-hole v6 introduced significant API changes:
| Feature | v5 API | v6 API | |---------|----------|----------| | Base URL | /admin/api.php | /api | | Auth | Token in URL/headers | Session-based | | Status | ?status | /api/dns/blocking | | Stats | ?summaryRaw | /api/stats/summary | | Queries | ?recentBlocked | /api/queries | | Whitelist | Supported via API | Not available via API |
Important: Domain whitelisting is no longer available via the v6 API. You must whitelist domains through the Pi-hole Admin UI.
{
"apiUrl": "https://pi-hole.example.com/api",
"apiToken": "...",
"insecure": false
}
{
"apiUrl": "https://pi-hole.local/api",
"apiToken": "...",
"insecure": true
}
The insecure flag adds the -k option to curl to bypass certificate validation.
apiToken matches your Pi-hole app passwordapiUrl is correct (must end in /api)insecure: truecurl, jq (installed on most Unix systems)安装 Pi-hole Control 后,可以对 AI 说这些话来触发它
Help me get started with Pi-hole Control
Explains what Pi-hole Control does, walks through the setup, and runs a quick demo based on your current project
Use Pi-hole Control to control Pi-hole v6 DNS ad blocker: check status, view stats, enable...
Invokes Pi-hole Control with the right parameters and returns the result directly in the conversation
What can I do with Pi-hole Control in my marketing & growth workflow?
Lists the top use cases for Pi-hole Control, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/pihole/ 目录(个人级,所有项目可用),或 .claude/skills/pihole/(项目级)。重启 AI 客户端后,用 /pihole 主动调用,或让 AI 根据上下文自动发现并使用。
Pi-hole Control 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
Pi-hole Control 可免费安装使用。请查阅仓库了解许可证信息。
Control Pi-hole v6 DNS ad blocker: check status, view stats, enable/disable block, and analyze blocked domains via API.
Pi-hole Control 属于「Marketing & Growth」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my marketing & growth tasks using Pi-hole Control
Identifies repetitive steps in your workflow and sets up Pi-hole Control to handle them automatically