# Send Pi-hole Control to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "pihole",
    "name": "Pi-hole Control",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/baanish/pihole",
    "canonicalUrl": "https://clawhub.ai/baanish/pihole",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/pihole",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=pihole",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "SECURITY_AUDIT.md",
      "SKILL.md",
      "pihole.sh"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "pihole",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-07T01:59:56.463Z",
      "expiresAt": "2026-05-14T01:59:56.463Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=pihole",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=pihole",
        "contentDisposition": "attachment; filename=\"pihole-2.0.1.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "pihole"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/pihole"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/pihole",
    "downloadUrl": "https://openagent3.xyz/downloads/pihole",
    "agentUrl": "https://openagent3.xyz/skills/pihole/agent",
    "manifestUrl": "https://openagent3.xyz/skills/pihole/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/pihole/agent.md"
  }
}
```
## Documentation

### Pi-hole Skill

Control your Pi-hole DNS ad blocker via the Pi-hole v6 API.

### Setup

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"

### Getting API Credentials

Open Pi-hole Admin at http://pi-hole.local/admin
Navigate to Settings > API
Generate an app password
Use that password as apiToken

### Status

Get current Pi-hole status (enabled/disabled)
View stats: queries blocked, queries today, domains being blocked, active clients
See recent query activity

### Controls

Enable/Disable: Turn Pi-hole on or off
Disable for 5 minutes: Temporarily disable ad blocking for a short period
Disable for custom duration: Set specific disable time (in minutes)

### Block Analysis

Check blocked domains: See what domains were blocked in a time window
Show top blocked: Most frequently blocked domains

### Usage Examples

# 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"

### Authentication

POST /api/auth
Content-Type: application/json
{"password":"your-app-password"}

Response:
{
  "session": {
    "sid": "session-token-here",
    "validity": 1800
  }
}

### Status

GET /api/dns/blocking
Headers: sid: <session-token>

Response:
{
  "blocking": "enabled" | "disabled",
  "timer": 30  // seconds until re-enable (if disabled with timer)
}

### Enable/Disable

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}

### Stats

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
  }
}

### Queries

GET /api/queries?start=-<seconds>
Headers: sid: <session-token>

Response:
{
  "queries": [
    {
      "domain": "example.com",
      "status": "GRAVITY",
      "time": 1768363900,
      "type": "A"
    }
  ]
}

### v5 vs v6 API Changes

Pi-hole v6 introduced significant API changes:

Featurev5 APIv6 APIBase URL/admin/api.php/apiAuthToken in URL/headersSession-basedStatus?status/api/dns/blockingStats?summaryRaw/api/stats/summaryQueries?recentBlocked/api/queriesWhitelistSupported via APINot available via API

Important: Domain whitelisting is no longer available via the v6 API. You must whitelist domains through the Pi-hole Admin UI.

### Production (Valid Cert)

{
  "apiUrl": "https://pi-hole.example.com/api",
  "apiToken": "...",
  "insecure": false
}

### Self-Signed/Local Cert

{
  "apiUrl": "https://pi-hole.local/api",
  "apiToken": "...",
  "insecure": true
}

The insecure flag adds the -k option to curl to bypass certificate validation.

### Security Notes

Session tokens expire after 30 minutes (1800 seconds)
API password is sent in JSON body, not URL
All requests have a 30-second timeout
Token is not visible in process list (passed via environment)

### "Failed to authenticate"

Check that apiToken matches your Pi-hole app password
Verify apiUrl is correct (must end in /api)
Ensure Pi-hole is accessible from your network

### "Could not determine status"

Check API URL is reachable
If using HTTPS with self-signed cert, set insecure: true
Verify API password is correct

### Network Errors

Ensure clawdbot's machine can reach the Pi-hole
Check firewall rules allow API access
Verify URL scheme (http vs https)

### Requirements

Pi-hole v6 or later
App password generated in Pi-hole Admin
Network access to Pi-hole API
curl, jq (installed on most Unix systems)
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: baanish
- Version: 2.0.1
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-05-07T01:59:56.463Z
- Expires at: 2026-05-14T01:59:56.463Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/pihole)
- [Send to Agent page](https://openagent3.xyz/skills/pihole/agent)
- [JSON manifest](https://openagent3.xyz/skills/pihole/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/pihole/agent.md)
- [Download page](https://openagent3.xyz/downloads/pihole)