
Namecheap DNS Management
OfficialFreeManage your Namecheap DNS records effortlessly.
Free · Opens the source repo
What Namecheap DNS Management does
The Namecheap DNS Management skill allows users to efficiently manage DNS records for domains registered with Namecheap through its API. This skill simplifies the process of listing domains, viewing, adding, updating, and removing various DNS host entries such as A, AAAA, CNAME, MX, and TXT records. It also provides guidance on setting up the API, including public IP detection and credential configuration, ensuring that users can get started quickly and securely.
This skill is particularly beneficial for developers and IT professionals who need to automate DNS management tasks or perform bulk updates to DNS records. By using the provided Python script, users can execute commands directly from their terminal, making it a versatile tool for both individual and team environments. The skill ensures that users are always aware of their current DNS configurations before making changes, which helps prevent accidental data loss.
The setup process is straightforward, requiring users to verify their API credentials and configure their public IP for secure access. Once configured, users can execute a variety of operations, such as adding new records or modifying existing ones, all while adhering to best practices for DNS management. The skill also includes features for managing email forwarding rules and child nameservers, making it a comprehensive solution for domain management.
Overall, the Namecheap DNS Management skill is tailored for users who frequently interact with Namecheap's DNS services and require a reliable method for managing their domain records efficiently. It is a practical addition for anyone looking to streamline their domain management tasks without the need for a complex interface or extensive manual processes.
When to use it
Use this skill when you need to add, update, or remove DNS records for your Namecheap domains or when setting up the Namecheap API.
When not to use it
This skill is not suitable for domain registration, SSL certificate management, or managing DNS records with providers other than Namecheap.
What you can build with it
Automating DNS Updates
Use the skill to automate the process of updating DNS records for multiple domains, saving time and reducing manual errors.
Setting Up Email Forwarding
Quickly configure email forwarding rules for your domains using the skill, making it easy to manage communications.
Bulk DNS Record Management
Utilize the JSON file support to update multiple DNS records at once, streamlining your domain management tasks.
How to install Namecheap DNS Management
View source1. Install with the skills CLI
npx skills add github/awesome-copilot/namecheap --agent claude-code2. Or install it manually
Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.
Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs
Inside SKILL.md
Written by githubNamecheap DNS Management
UTILITY SKILL — manages DNS records via the Namecheap API. USE FOR: "add DNS record", "update A record", "manage Namecheap domains", "set CNAME", "add MX record", "add TXT record", "list my domains", "show DNS records", "namecheap setup", "configure namecheap API", "what is my public IP" DO NOT USE FOR: domain registration/purchase, SSL certificate management, hosting configuration, non-Namecheap DNS providers
Workflow
First-time Setup
Before executing any API commands, verify credentials are configured:
- Check for existing config — look for
~/.namecheap-api - If not configured, guide the user through setup:
a. Show public IP — run
python3 namecheap.py public-ipto display the user's public IP b. Instruct IP whitelisting — tell the user to go to https://ap.www.namecheap.com/settings/tools/apiaccess/, enable API (select ON), and whitelist the displayed IP c. Have the user run setup themselves — ask the user to runpython3 namecheap.py setupdirectly in their own terminal. The script prompts for the username and reads the API key with a hidden prompt (getpass), writes~/.namecheap-apiwithchmod 600, and validates the connection. Never ask the user to paste their API key into the chat, and never log, echo, or display the API key value. If you cannot run an interactive terminal for the user, instruct them to runsetupthemselves, or to exportNAMECHEAP_API_USERandNAMECHEAP_API_KEYas environment variables in their own shell — rather than collecting the secret viaask_user. d. Confirm — once the user reports setup succeeded, proceed with DNS operations.
DNS Operations
Use the namecheap.py script (bundled in this skill's directory) for all API interactions. It requires only Python 3 (standard library only — no pip install needed) and works the same on macOS, Linux, and Windows:
# Show public IP (for setup)
python3 namecheap.py public-ip
# Run setup flow
python3 namecheap.py setup
# List domains
python3 namecheap.py domains.getList
# Get nameservers for a domain (shows if using Namecheap DNS or custom)
python3 namecheap.py domains.dns.getList --domain example.com
# Get DNS records for a domain
python3 namecheap.py domains.dns.getHosts --domain example.com
# Add a single record (preserves existing records)
python3 namecheap.py dns.addHost --domain example.com --type A --name www --address 1.2.3.4 --ttl 1800
# Remove a single record
python3 namecheap.py dns.removeHost --domain example.com --type A --name www --address 1.2.3.4
# Replace all records from a JSON file
python3 namecheap.py domains.dns.setHosts --domain example.com --hosts records.json
# Switch to Namecheap default DNS
python3 namecheap.py domains.dns.setDefault --domain example.com
# Switch to custom nameservers
python3 namecheap.py domains.dns.setCustom --domain example.com --nameservers ns1.cloudflare.com,ns2.cloudflare.com
# Get email forwarding rules
python3 namecheap.py domains.dns.getEmailForwarding --domain example.com
# Set email forwarding (single rule)
python3 namecheap.py domains.dns.setEmailForwarding --domain example.com --mailbox info --forward-to user@gmail.com
# Set email forwarding (from JSON file)
python3 namecheap.py domains.dns.setEmailForwarding --domain example.com --forwards forwards.json
# Create a child nameserver (glue record)
python3 namecheap.py domains.ns.create --domain example.com --nameserver ns1.example.com --ip 1.2.3.4
# Delete a child nameserver
python3 namecheap.py domains.ns.delete --domain example.com --nameserver ns1.example.com
# Get nameserver info
python3 namecheap.py domains.ns.getInfo --domain example.com --nameserver ns1.example.com
# Update nameserver IP
python3 namecheap.py domains.ns.update --domain example.com --nameserver ns1.example.com --old-ip 1.2.3.4 --ip 5.6.7.8
JSON file formats
domains.dns.setHosts --hosts records.json expects an array of objects with Namecheap API field names:
[
{ "HostName": "@", "RecordType": "A", "Address": "1.2.3.4", "TTL": 1800 },
{ "HostName": "www", "RecordType": "CNAME", "Address": "@", "TTL": 1800 },
{ "HostName": "@", "RecordType": "MX", "Address": "mail.example.com.", "TTL": 1800, "MXPref": 10 }
]
domains.dns.setEmailForwarding --forwards forwards.json expects an array of mailbox rules:
[
{ "MailBox": "info", "ForwardTo": "team@example.net" },
{ "MailBox": "sales", "ForwardTo": "owner@example.net" }
]
Behavior
- Always check credentials first. Before any API operation, verify
~/.namecheap-apiexists and is readable. If not, run the setup flow. - Show current records before modifying. Before adding or removing records, always fetch and display the current DNS records so the user can confirm the change.
- Use
ask_userto confirm destructive changes. Before removing records or replacing all records withsetHosts, confirm with the user. - The Namecheap
setHostsAPI replaces ALL records. Never calldomains.dns.setHostsdirectly unless you have fetched all existing records first. Usedns.addHostanddns.removeHostfor safe single-record operations — they handle the fetch-modify-write cycle internally. - Explain TTL in human terms. When the user asks about TTL, explain that 1800 = 30 minutes, 3600 = 1 hour, etc.
- Handle multi-part TLDs. Domains like
example.co.ukhave SLD=example and TLD=co.uk. The script recognizes a built-in list of common second-level suffixes (e.g.co.uk,com.au,co.jp,com.br). This list is best-effort and not a full public-suffix database — if a domain with an unlisted multi-part suffix returns a2019166("Domain not found") error, the SLD/TLD split was likely wrong. In that case, confirm the registered domain with the user and report the limitation.
Credential Storage
Credentials are stored in ~/.namecheap-api:
NAMECHEAP_API_USER="username"
NAMECHEAP_API_KEY="api-key-here"
This file must have 600 permissions (owner read/write only). Alternatively, the script reads credentials from the NAMECHEAP_API_USER and NAMECHEAP_API_KEY environment variables, which take precedence over the file when both are set.
Supported Record Types
A, AAAA, CNAME, MX, MXE, TXT, URL, URL301, FRAME
References
See references/namecheap-api.md for full API documentation including request/response formats.
Frequently asked questions about Namecheap DNS Management
Similar skills
WinMD API Search
Easily find and explore Windows desktop APIs.
WebMCPify
Transform any web app into an agent-ready platform.
Phoenix Tracing
Instrument LLM applications with OpenInference tracing.
Foundry Hosted Agent CopilotKit
Guidance for developing agentic web apps on Azure.
Power Automate Foundation
Connect AI agents to Power Automate seamlessly.
Power Automate Flow Builder
Efficiently build and deploy Power Automate flows programmatically.
