local-dns
Add or remove local hostname-to-IP mappings using local-dns-override. Use when you need to resolve a custom hostname (like api.local or *.dev.local) to a local IP address for development, check what a hostname currently resolves to, or test that a DNS record is working. Triggers include "add DNS record", "map hostname to IP", "resolve api.local", "local hostname", "DNS override", or any task that involves making a custom domain point to 127.0.0.1 or another local address.
Best use case
local-dns is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Add or remove local hostname-to-IP mappings using local-dns-override. Use when you need to resolve a custom hostname (like api.local or *.dev.local) to a local IP address for development, check what a hostname currently resolves to, or test that a DNS record is working. Triggers include "add DNS record", "map hostname to IP", "resolve api.local", "local hostname", "DNS override", or any task that involves making a custom domain point to 127.0.0.1 or another local address.
Teams using local-dns should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/local-dns/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How local-dns Compares
| Feature / Agent | local-dns | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Add or remove local hostname-to-IP mappings using local-dns-override. Use when you need to resolve a custom hostname (like api.local or *.dev.local) to a local IP address for development, check what a hostname currently resolves to, or test that a DNS record is working. Triggers include "add DNS record", "map hostname to IP", "resolve api.local", "local hostname", "DNS override", or any task that involves making a custom domain point to 127.0.0.1 or another local address.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# local-dns
Add hostname-to-IP mappings for development environments.
## When to use
- Making `api.local` resolve to `127.0.0.1` so local services respond to readable names
- Adding a wildcard `*.dev.local` that catches any subdomain
- Testing that a hostname resolves correctly through the local DNS server
- Looking up what IP a configured hostname returns
## Add a record via hosts.yaml
Edit `hosts.yaml` and add to the `records` array:
```yaml
records:
# A record - maps hostname to IPv4
- hostname: api.local
type: A
value: 127.0.0.1
# Wildcard - matches any subdomain of dev.local
- hostname: "*.dev.local"
type: A
value: 127.0.0.1
# CNAME - alias one hostname to another
- hostname: www.api.local
type: CNAME
value: api.local
# AAAA record - maps hostname to IPv6
- hostname: api.local
type: AAAA
value: ::1
# Custom TTL (default is 60 seconds)
- hostname: cache.local
type: A
value: 10.0.0.5
ttl: 300
```
The server hot-reloads on file change - no restart needed.
## Trigger a manual reload via API
```bash
curl -s -X POST http://127.0.0.1:5380/api/reload
# Response: { "ok": true, "records": 9, "reloadedAt": "2026-03-20T15:53:10Z" }
```
## Test a hostname via CLI
```bash
# Test A record
node dist/dns-server.js test api.local
# Test CNAME resolution
node dist/dns-server.js test www.api.local --type CNAME
# Test using dig (port 5353 if not running on 53)
dig @127.0.0.1 -p 5353 api.local A
dig @127.0.0.1 -p 5353 api.local AAAA
dig @127.0.0.1 -p 5353 www.api.local CNAME
```
## View current records via API
```bash
curl -s http://127.0.0.1:5380/api/config | jq '.records'
```
## Supported record types
| Type | Value | Use case |
|-------|-------------------|-------------------------------|
| A | IPv4 (1.2.3.4) | Map hostname to IPv4 |
| AAAA | IPv6 (::1) | Map hostname to IPv6 |
| CNAME | Hostname target | Alias one hostname to another |
## Wildcard matching rules
- Only `*.prefix.local` form is supported
- A wildcard matches exactly one subdomain level: `*.dev.local` matches `foo.dev.local` but not `a.b.dev.local`
- Exact matches take priority over wildcards
## Troubleshooting
### Hostname still not resolving
Check that `127.0.0.1` (or `127.0.0.1:5353`) is set as your system DNS resolver. The local-dns-override server must be the first resolver consulted.
### Record added but not resolving
1. Check that the server reloaded: `curl http://127.0.0.1:5380/api/config`
2. Check the query log for NXDOMAIN: `curl http://127.0.0.1:5380/api/log?limit=10`
3. Verify YAML syntax is valid: `node dist/dns-server.js config`Related Skills
Skill: Uptime Monitoring
## Overview
Skill: Status Page
## Overview
Skill: unit-conversion
## Overview
Skill: recipe-scaler
## Overview
reading-list
Operate the reading-list API to save, manage, tag, search, and export articles.
email-digest
Configure, test, and troubleshoot the reading-list daily email digest delivered via nodemailer.
websocket-realtime
Use the WebSocket connection in poll-builder to receive live vote updates. Use when you need to stream real-time poll results, monitor a poll for new votes, or build a live dashboard. Triggers include "live results", "real-time updates", "stream votes", "watch poll", or "WebSocket".
poll-builder
Self-hosted poll creation tool with real-time results. Use when you need to create a poll, check vote counts, close a poll, export results, or get the shareable link for a poll. Triggers include "create poll", "vote", "poll results", "survey", "collect votes", "share poll", or any task involving polling or voting.
Skill: personal-finance
## Overview
Skill: csv-import
## Overview
Skill: Syntax Highlighting
## Purpose
Skill: Pastebin Core
## Purpose