Back to skills
SKILL.md
Adguard Home
FSecurity๐ก๏ธ Query AdGuard Home instances for DNS statistics, blocked domains, and client activity ---
- 2 stars
- 0 votes
- 0 copies
- 2 views
- Added November 11, 2026
Works with
Security analysis
38/100- Modifies startup scripts or system services for persistence
- Modifies startup scripts or system services for persistence
- Sends environment variables or credentials to an external URL
Pro scans all 12 files and shows the line behind each finding
npx -y skills add johnalbertini14-glitch/openclaw-skills --skill adguard-home --agent claude-codeAre you the author of Adguard Home?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/johnalbertini14-glitch-adguard-home)# AdGuard Home Skill
๐ก๏ธ Query AdGuard Home instances for DNS statistics, blocked domains, and client activity
---
## Features
- โ
Multi-instance support
- โ
Real-time DNS query statistics
- โ
Blocked domains leaderboard
- โ
Active client analysis
- โ
Health status check
- โ
Service status monitoring
- โ
DNS configuration details
- โ
Filter rules inspection
- โ
Recent query log
- โ
TLS/encryption status
---
## Usage
### Basic Commands
```bash
# Statistics & Monitoring
/adguard stats [instance] # DNS statistics
/adguard top-clients [instance] # Top 10 active clients
/adguard top-blocked [instance] # Top 10 blocked domains
/adguard health [instance] # Health check
/adguard status [instance] # Service status
# Configuration & Rules
/adguard dns-info [instance] # DNS configuration
/adguard filter-rules [instance] # Filter rules and lists
/adguard clients [instance] # Configured clients
/adguard tls-status [instance] # TLS/encryption status
# Query Log
/adguard querylog [instance] [n] # Recent n queries (default: 10)
```
### Examples
```bash
# Query dns1 instance statistics
/adguard stats dns1
# Check service status
/adguard status dns1
# View DNS configuration
/adguard dns-info dns1
# View filter rules
/adguard filter-rules dns1
# View last 20 DNS queries
/adguard querylog dns1 20
# Check TLS status
/adguard tls-status dns1
# If no instance specified, uses the first configured instance
/adguard stats
```
### Output Examples
**stats command:**
```
๐ AdGuard Home Statistics (dns1)
Total DNS Queries: 141,647
Blocked Requests: 32,540 (23.0%)
Avg Response Time: 0.005ms
```
**status command:**
```
๐ง AdGuard Home Status (dns1)
Version: v0.107.72
Running: โ
Yes
Protection: โ
Enabled
DNS Port: 53
HTTP Port: 1080
Language: zh-cn
DHCP Available: โ
Yes
```
**dns-info command:**
```
๐ DNS Configuration (dns1)
Protection: โ
Enabled
Rate Limit: 20 req/s
Upstream Mode: parallel
Cache: โ
4MB
DNSSEC: โ Disabled
IPv6: โ
Enabled
Upstream DNS Servers:
1. https://dns.alidns.com/dns-query
2. 192.168.1.1:53
3. 8.8.8.8:53
```
**filter-rules command:**
```
๐ก๏ธ Filter Rules (dns1)
Filtering: โ
Enabled
Update Interval: 12 hours
User Rules: 6 custom rules
Filter Lists:
1. โ
AdAway Default Blocklist (6540 rules)
2. โ
gh_100M_block (1110461 rules)
3. โ
Delta Force Blacklist (78126 rules)
```
**querylog command:**
```
๐ Recent DNS Queries (dns1) - Last 5 entries
1. [12:26:44 AM] ๐ซ BLOCKED api.telegram.org (192.168.145.188)
2. [12:26:43 AM] ๐ซ BLOCKED self.events.data.microsoft.com (192.168.145.123)
Rule: ||events.data.microsoft.com^
3. [12:26:42 AM] โ
OK open.feishu.cn (192.168.145.188)
```
---
## Configuration
### ๐ Security Best Practices
**โ ๏ธ Important:** Never store plaintext credentials in files. Always use secure credential injection:
#### Option 1: Environment Variables (Recommended)
Set environment variables before running commands:
```bash
export ADGUARD_URL="http://192.168.145.249:1080"
export ADGUARD_USERNAME="admin"
export ADGUARD_PASSWORD="your-secure-password"
```
Add these to your shell profile (`~/.bashrc`, `~/.zshrc`) for persistence.
#### Option 2: 1Password CLI (Most Secure)
Use `op read` to inject secrets at runtime:
```bash
export ADGUARD_URL=$(op read "op://vault/AdGuard/url")
export ADGUARD_USERNAME=$(op read "op://vault/AdGuard/username")
export ADGUARD_PASSWORD=$(op read "op://vault/AdGuard/password")
```
**โ Deprecated: File-based Config**
Previous versions allowed creating `adguard-instances.json` with credentials. **This is no longer supported** due to the risk of accidental commits and plaintext storage. Migrate to environment variables or 1Password.
---
### Configuration Parameters
| Parameter | Description | Example |
|-----------|-------------|---------|
| `url` | AdGuard Home URL (with port) | `http://192.168.145.249:1080` |
| `username` | Admin username | `admin` |
| `password` | Admin password (use env var or secrets manager) | `your-secure-password` |
---
## Technical Details
- **Authentication:** Cookie-based (POST `/control/login`)
- **Data API:** GET `/control/*` endpoints
- **Runtime:** Node.js (ES Module)
- **Entrypoint:** `index.js`
### API Endpoints Used
- `/control/stats` - Statistics data
- `/control/status` - Service status
- `/control/dns_info` - DNS configuration
- `/control/filtering/status` - Filter rules
- `/control/querylog` - Query log
- `/control/clients` - Client management
- `/control/tls/status` - TLS status
---
## FAQ
**Q: Error "No AdGuard instances configured"?**
A: Set environment variables before running commands:
```bash
export ADGUARD_URL="http://your-adguard:1080"
export ADGUARD_USERNAME="admin"
export ADGUARD_PASSWORD="your-password"
```
Or use 1Password CLI to inject credentials securely.
---
**Q: Authentication error when querying?**
A: Verify username/password. Ensure AdGuard Home service is running.
---
**Q: How to add more instances?**
A: Use a secrets manager (1Password) to store multiple instance credentials, or switch between instances by setting different `ADGUARD_URL` values. For advanced multi-instance setups, consider running separate shell sessions with different environment configurations.
---
**Q: querylog shows no data?**
A: Ensure query log is enabled in AdGuard Home settings (Settings โ DNS Settings โ Query log).
---
## Version History
### v1.2.6 (2026-02-25) - Remove File Config References ๐ง
**Bug Fixes:**
- โ
**Fixed FAQ inconsistency** - Removed `adguard-instances.json` reference from "How to add more instances?" answer
- โ
**Docs match code** - All documentation now consistent with v1.2.2+ env-vars-only implementation
- โ
**Updated multi-instance guidance** - Explains using 1Password or separate shell sessions
### v1.2.5 (2026-02-25) - Fix Registry Metadata ๐ง
**Bug Fixes:**
- โ
**Fixed registry metadata** - `clawhub.json` now correctly declares `requires.env` with `ADGUARD_URL`, `ADGUARD_USERNAME`, `ADGUARD_PASSWORD`
- โ
**Set primaryEnv** - ClawHub store now shows environment variables as required
- โ
**Updated security notes** - Documents metadata fix
### v1.2.2 (2026-02-25) - Remove File-based Credentials ๐
**Security Improvements:**
- โ
**Removed file-based config option** - No longer supports `adguard-instances.json` with plaintext credentials
- โ
**Env vars only** - Credentials must be provided via environment variables or 1Password
- โ
**Updated FAQ** - Removed references to config file creation
- โ
**Clearer warnings** - Explicitly marks file-based config as deprecated and unsupported
### v1.2.1 (2026-02-25) - Credential Security ๐
**Security Improvements:**
- โ
**Removed plaintext credential storage** - No longer instructs creating config files with admin credentials
- โ
**Environment variable support** - Secure credential injection via `ADGUARD_URL`, `ADGUARD_USERNAME`, `ADGUARD_PASSWORD`
- โ
**1Password integration** - Supports secrets management via `op read`
- โ
**Removed multi-path search** - No longer searches `~/.openclaw-*/workspace/` paths
- โ
**Workspace-only config** - Local config file only checked in skill directory (dev use)
- โ
**Updated documentation** - Security best practices prominently featured
### v1.2.0 (2026-02-24) - Security Hardening ๐
**Security Improvements:**
- โ
**Removed command injection vulnerability** - Replaced `execSync` + `curl` with native HTTPS client
- โ
**Input validation** - Sanitized instance names, commands, and parameters
- โ
**Command whitelist** - Only allowed commands can be executed
- โ
**URL validation** - Verified URL format before making requests
- โ
**Parameter bounds** - Limited querylog limit to 1-100 entries
- โ
**No shell escaping issues** - Pure JavaScript HTTP requests
**Technical Changes:**
- Removed dependency on `child_process` and external `curl` commands
- Implemented native `http`/`https` module for all API calls
- Added cookie-based session management
- Improved error handling and validation
### v1.1.0 (2026-02-24) - Enhanced
**New Commands:**
- `status` - Service status (version, protection, ports)
- `dns-info` - DNS configuration details
- `filter-rules` - Filter rules and lists
- `querylog [n]` - Recent DNS queries
- `clients` - Configured clients
- `tls-status` - TLS/encryption status
**Improvements:**
- Better error handling
- Enhanced output formatting
### v1.0.0 (2026-02-24) - Initial
**Features:**
- stats/top-clients/top-blocked/health commands
- Multi-instance configuration support
- ES Module implementation
---
## Author
**Leo Li (@foxleoly)**
License: MIT
Files in this skill
- PUBLISH_GUIDE.md
- README.md
- SECURITY_AUDIT.md
- SECURITY_RESPONSE.md
- SKILL.en.md
- SKILL.md
- SKILL.zh-CN.md
- TEST_REPORT.md
- VERSION_CHECK.md
- _meta.json
- clawhub.json
- index.js
Attribution
Related skills
View all in security โComments
Loading commentsโฆ
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.