Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Control your Pi-hole DNS ad blocker via the Pi-hole v6 API.
.claude/skills/sundial-org-pihole/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-02 | ✗→✓ | ▲ Improved | 203% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 150% | 0% |
| case-04 | ✗→✓ | ▲ Improved | 19% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 112% | 0% |
| case-10 | ✗→✓ | ▲ Improved | 8% | 0% |
Control your Pi-hole DNS ad blocker via the Pi-hole v6 API.
Set your Pi-hole API configuration in Clawdbot config:
yamlskills: 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:
bashexport 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.
yaml{ "apiUrl": "https://pi-hole.example.com/api", "apiToken": "...", "insecure": false }
yaml{ "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)Other measured skills in the registry, with their headline benchmark lift.