Agent skills for NextDNS API integration and DNS management.
🚧 Early Experiment
This repository is an early experiment in creating specialized skills for AI agents to enhance their capabilities in NextDNS API integration and DNS management. The skills are derived from official API documentation and best practices.
Please give feedback when encountering any issues.
npx add-skill tuanductran/nextdns-skillsFor most reliable results, prefix your prompt with use nextdns skill:
use nextdns skill, <your prompt here>
This explicitly triggers the skill and ensures the AI follows the documented patterns. Without the prefix, skill triggering may be inconsistent depending on how closely your prompt matches the skill's description keywords.
NextDNS API integration best practices covering authentication, profile management, analytics, logs, and real-time streaming.
| Type | Count | Examples |
|---|---|---|
| Capability | 15 | Authentication, Profile management, Security settings, Privacy settings, Parental control, Analytics queries, Time series data, Logs streaming, Error handling, Pagination |
| Efficiency | 2 | Response format parsing, Logs download |
NextDNS CLI client best practices for installation, configuration, and management of DNS-over-HTTPS proxy.
| Type | Count | Examples |
|---|---|---|
| Capability | 11 | Installation, Daemon control, System configuration, Profile configuration, Advanced features, Monitoring, Platform-specific, Troubleshooting |
| Efficiency | 3 | Upgrade/uninstall, Best practices, Docker deployment |
NextDNS Web UI configuration and management best practices via the web dashboard.
| Type | Count | Examples |
|---|---|---|
| Capability | 7 | Security settings, Privacy settings, Parental control, Denylist/Allowlist, DDNS settings, Analytics & Logs, Configuration management |
| Efficiency | 3 | Threat modeling, Setup optimization, Troubleshooting via UI |
NextDNS integration guides for third-party platforms and services including routers, network management, and home automation.
| Type | Count | Examples |
|---|---|---|
| Capability | 3 | DNSMasq integration, Public DNS and AdGuard Home, OpenWrt installation and troubleshooting |
| Efficiency | 0 | Future: Multi-platform deployment, Integration testing |
Rules are classified into two categories:
-
Capability: AI cannot solve the problem without the skill. These address API-specific patterns, authentication requirements, endpoint structures, or edge cases that require deep knowledge of the NextDNS API.
-
Efficiency: AI can solve the problem but not well. These provide optimal patterns, best practices, and consistent approaches that improve solution quality and prevent common mistakes.
- Authentication: Proper API key usage with X-Api-Key header
- Error Handling: Handle API errors and validation responses correctly
- Response Format: Parse API response structure (data, meta, errors)
- Profile Management: Create, read, update, and delete NextDNS profiles
- Nested Endpoints: Work with nested objects and arrays in profile configuration
- Security Settings: Configure threat protection and security features
- Privacy Settings: Configure privacy blocklists and native tracking protection
- Parental Control: Configure parental controls and content filtering
- Allowlist/Denylist: Manage custom domain allow/deny lists
- Analytics Queries: Use correct query parameters for analytics endpoints
- Analytics Endpoints: Access various analytics endpoints (status, domains, reasons, devices, protocols, etc.)
- Time Series Data: Retrieve time series data for charts and visualizations
- Date Formats: Use correct date formats (ISO 8601, Unix timestamp, relative dates)
- Logs Management: Query, filter, and search DNS logs
- Logs Streaming: Stream DNS logs in real-time using Server-Sent Events (SSE)
- Logs Download: Download logs as CSV files
- Pagination: Correctly paginate through API responses using cursors
- Installation: Install NextDNS CLI on various platforms (Linux, macOS, Windows, routers, NAS)
- System Configuration: Configure system DNS to use NextDNS (activate/deactivate)
- Profile Configuration: Configure NextDNS profile ID and settings
- Daemon Control: Control NextDNS daemon (start, stop, restart, status)
- Upgrade/Uninstall: Upgrade or remove NextDNS CLI
- Advanced Features: Conditional forwarders, profile selection, client detection
- Platform Specific: Platform-specific configurations (OpenWRT, pfSense, Synology, Ubiquiti)
- Monitoring: Monitor DNS queries, cache stats, and discovered clients
- Troubleshooting: Diagnose and fix DNS issues
- Best Practices: Performance optimization and security tips
- Security Settings: Advanced threat protection rules
- Privacy Settings: Blocklists and tracking protection
- Parental Control: Advanced filtering and schedules
- Denylist/Allowlist: Manual domain management
- DDNS Settings: Dynamic DNS configuration
- Analytics & Logs: Identify and analyze network traffic
- Configuration Management: Profile settings and performance
- Threat Modeling: Security risk assessment and mitigation
- Setup Optimization: Best practices for dashboard setup
- Troubleshooting UI: Debugging issues using the web interface
- DNSMasq Integration: Configure DNSMasq and NextDNS together while maintaining client reporting
- Public DNS Setup: Configure NextDNS public DNS servers on browsers and operating systems
- AdGuard Home: Integrate NextDNS with AdGuard Home as upstream DNS provider
- OpenWrt: Installation, upgrade, and troubleshooting on OpenWrt routers
- Routers: OpenWrt, pfSense, Ubiquiti UniFi, DD-WRT
- Network: DNSMasq, AdGuard Home, conditional DNS forwarding
- Automation: Home Assistant, Tailscale
- Containers: Docker, Kubernetes
- NAS: Synology, QNAP
const profile = await fetch('https://api.nextdns.io/profiles', {
method: 'POST',
headers: {
'X-Api-Key': 'YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'My Home Network',
security: {
threatIntelligenceFeeds: true,
cryptojacking: true
},
privacy: {
blocklists: [{ id: 'nextdns-recommended' }]
}
})
});const analytics = await fetch(
'https://api.nextdns.io/profiles/abc123/analytics/domains?from=-7d&limit=50',
{ headers: { 'X-Api-Key': 'YOUR_API_KEY' } }
).then(r => r.json());const eventSource = new EventSource(
'https://api.nextdns.io/profiles/abc123/logs/stream?status=blocked',
{ headers: { 'X-Api-Key': 'YOUR_API_KEY' } }
);
eventSource.onmessage = (event) => {
const log = JSON.parse(event.data);
console.log('Blocked:', log.domain);
};# One-line installation
sh -c 'sh -c "$(curl -sL https://nextdns.io/install)"'# Set profile ID
sudo nextdns config set -profile=abc123
# Install as service
sudo nextdns install
# Start daemon
sudo nextdns start
# Activate system DNS
sudo nextdns activate
# Verify
curl https://test.nextdns.io# View logs
nextdns log
# Check cache stats
nextdns cache-stats
# Show discovered clients
nextdns discovered# Configure DNSMasq to use NextDNS on custom port
# In /etc/dnsmasq.conf
server=127.0.0.1#5342
no-resolv
# Configure NextDNS CLI to listen on port 5342
sudo nextdns config set -listen=127.0.0.1:5342
sudo nextdns restart# SSH into OpenWrt router
ssh root@192.168.1.1
# Install NextDNS
sh -c 'sh -c "$(curl -sL https://nextdns.io/install)"'
# Configure profile ID
nextdns config set -profile=abc123
# Install and start service
nextdns install
/etc/init.d/nextdns start
/etc/init.d/nextdns enableConfigure NextDNS as upstream DNS in AdGuard Home settings:
# Upstream DNS Servers
https://dns.nextdns.io/abc123
# Bootstrap DNS Servers
1.1.1.1
1.0.0.1
Every skill in this repository is created through a rigorous, evidence-based process:
Skills are sourced from the official NextDNS API documentation and real-world integration patterns.
Each skill is validated against:
- Official API specifications
- Common integration patterns
- Error handling requirements
- Performance considerations
Skills are tested with:
- Multiple API endpoints
- Various query parameters
- Error scenarios
- Edge cases
This repository follows strict quality standards to ensure AI agents can reliably use the skills.
# Install dependencies
pnpm install
# Run linting
pnpm lint
# Fix linting issues
pnpm lint:fix- Use the template from
templates/rule-template.md - Create a new file in
skills/<skill-name>/rules/using kebab-case naming - Add required YAML frontmatter (title, impact, impactDescription, type, tags)
- Include the H1 title followed by the bolded Impact Line
- Add the entry to the skill's capability or efficiency table in
SKILL.md - Run
pnpm lint:fixto ensure compliance
- Language: All content must be in English
- Indentation: Use 4-space indentation for lists
- Filenames: Use kebab-case for all rule files
- Case Police: Follow technical term casing (NextDNS, OpenWrt, macOS, etc.)
- Code Blocks: Always specify language for syntax highlighting
MIT