agentleFS
hostingerhostinger/hostinger-agent-skills/skills/dns/SKILL.md

dns

Skill28 starsChanged 5 months agoMITView on GitHub

Hostinger DNS API for zone record management, snapshots, and validation. Use when creating, updating, or deleting DNS records, restoring DNS snapshots, validating zone changes, or resetting DNS to defaults.

  • Sends data out

2 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions2 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 2

    1. proyecto26/system-design-skills★ 118same name
    2. ffsshhttiikk/opencode-agents-skills★ 2same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository7 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

12 rules. About 0 are common, 5 are distinctive, and 7 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 7

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    When updating DNS records, the overwrite flag controls behavior:

    line 42
  2. Very specific:

    Use overwrite: false when adding records without removing existing ones

    line 248
  3. Very specific:

    Use overwrite: true when you want to completely replace records of a given name/type

    line 249
  4. Very specific:

    Use @ as the name for root domain records

    line 250
  5. Very specific:

    Use the whitelisted_record_types parameter during reset to preserve email records (MX, TXT)

    line 254
  6. Distinctive:

    Use lower TTL (300-600s) when planning changes for faster propagation

    line 258
  7. Distinctive:

    Check the TTL of the old record — resolvers cache for that duration

    line 270
  8. Very specific:

    Use dig or nslookup to verify: dig @8.8.8.8 example.com A

    line 271
  9. Very specific:

    Check MX records: dig example.com MX

    line 279
  10. Distinctive:

    Verify SPF TXT record is intact

    line 280
  11. Distinctive:

    Use the snapshot restore to revert if needed

    line 281
  12. Distinctive:

    If multiple records share name/type and you want to delete only some, use the update endpoint instead

    line 285

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Hostinger DNS

The DNS API enables full management of DNS zone records for domains hosted on Hostinger. You can create, update, delete, validate, and reset DNS records, as well as manage DNS snapshots for backup and restore operations.

Table of Contents

  • Core Concepts
  • Common Patterns
  • API Reference
  • Best Practices
  • Troubleshooting
  • References

Core Concepts

DNS Records

Standard DNS record types are supported:

TypePurposeExample
AIPv4 address192.168.1.1
AAAAIPv6 address2001:db8::1
CNAMECanonical name aliaswww.example.com.
ALIASANAME/ALIAS recordexample.com.
MXMail exchangemail.example.com.
TXTText recordv=spf1 include:...
NSName serverns1.example.com.
SOAStart of authorityZone authority info
SRVService locator_sip._tcp.example.com.
CAACertificate authority auth0 issue "letsencrypt.org"

Zone Updates

When updating DNS records, the overwrite flag controls behavior:

  • overwrite: true (default) — Replaces existing records matching name and type with the new records
  • overwrite: false — Updates TTL on existing records, appends new records; if no match found, creates them

Snapshots

DNS snapshots capture the state of a domain's DNS zone at a point in time. Use them to restore previous configurations if something goes wrong.

TTL (Time-To-Live)

TTL controls how long DNS resolvers cache a record. Default is 14400 seconds (4 hours). Lower values propagate changes faster but increase DNS query load.

Common Patterns

Get DNS Records for a Domain

curl -X GET "https://developers.hostinger.com/api/dns/v1/zones/example.com" \
  -H "Authorization: Bearer $HOSTINGER_API_TOKEN"

Python SDK:

from hostinger_api import Hostinger

client = Hostinger(api_token="YOUR_API_TOKEN")
records = client.dns.zone.get_dns_records("example.com")
for record in records:
    print(f"{record.type} {record.name} -> {record.content}")

TypeScript SDK:

import { Hostinger } from "hostinger-api-sdk";

const client = new Hostinger({ apiToken: "YOUR_API_TOKEN" });

const records = await client.dns.zone.getRecords("example.com");
for (const record of records) {
  console.log(`${record.type} ${record.name} -> ${record.content}`);
}

PHP SDK:

use Hostinger\Api\HostingerApi;

$client = new HostingerApi('YOUR_API_TOKEN');

$records = $client->dns->zone->getRecords('example.com');
foreach ($records as $record) {
    echo "{$record->type} {$record->name} -> {$record->content}\n";
}

Create/Update DNS Records

# Add an A record for www subdomain
curl -X PUT "https://developers.hostinger.com/api/dns/v1/zones/example.com" \
  -H "Authorization: Bearer $HOSTINGER_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "overwrite": true,
    "zone": [
      {
        "name": "www",
        "type": "A",
        "ttl": 14400,
        "records": [
          { "content": "192.168.1.1" }
        ]
      }
    ]
  }'

# Add MX records for email
curl -X PUT "https://developers.hostinger.com/api/dns/v1/zones/example.com" \
  -H "Authorization: Bearer $HOSTINGER_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "overwrite": true,
    "zone": [
      {
        "name": "@",
        "type": "MX",
        "ttl": 14400,
        "records": [
          { "content": "10 mail1.example.com." },
          { "content": "20 mail2.example.com." }
        ]
      }
    ]
  }'

# Add a TXT record for SPF
curl -X PUT "https://developers.hostinger.com/api/dns/v1/zones/example.com" \
  -H "Authorization: Bearer $HOSTINGER_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "overwrite": false,
    "zone": [
      {
        "name": "@",
        "type": "TXT",
        "ttl": 14400,
        "records": [
          { "content": "v=spf1 include:_spf.google.com ~all" }
        ]
      }
    ]
  }'

Validate Before Updating

# Validate records first (returns 200 if valid, 422 if invalid)
curl -X POST "https://developers.hostinger.com/api/dns/v1/zones/example.com/validate" \
  -H "Authorization: Bearer $HOSTINGER_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "overwrite": true,
    "zone": [
      {
        "name": "www",
        "type": "CNAME",
        "ttl": 14400,
        "records": [
          { "content": "example.com." }
        ]
      }
    ]
  }'

Delete Specific DNS Records

curl -X DELETE "https://developers.hostinger.com/api/dns/v1/zones/example.com" \
  -H "Authorization: Bearer $HOSTINGER_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "filters": [
      { "name": "www", "type": "A" },
      { "name": "old", "type": "CNAME" }
    ]
  }'

Reset DNS to Defaults

curl -X POST "https://developers.hostinger.com/api/dns/v1/zones/example.com/reset" \
  -H "Authorization: Bearer $HOSTINGER_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "sync": true,
    "reset_email_records": false,
    "whitelisted_record_types": ["MX", "TXT"]
  }'

Work with DNS Snapshots

# List available snapshots
curl -X GET "https://developers.hostinger.com/api/dns/v1/snapshots/example.com" \
  -H "Authorization: Bearer $HOSTINGER_API_TOKEN"

# Get a specific snapshot with contents
curl -X GET "https://developers.hostinger.com/api/dns/v1/snapshots/example.com/42" \
  -H "Authorization: Bearer $HOSTINGER_API_TOKEN"

# Restore from a snapshot
curl -X POST "https://developers.hostinger.com/api/dns/v1/snapshots/example.com/42/restore" \
  -H "Authorization: Bearer $HOSTINGER_API_TOKEN"

API Reference

Zone Records

MethodEndpointDescription
GET/api/dns/v1/zones/{domain}Get DNS records
PUT/api/dns/v1/zones/{domain}Update DNS records
DELETE/api/dns/v1/zones/{domain}Delete DNS records
POST/api/dns/v1/zones/{domain}/resetReset DNS to defaults
POST/api/dns/v1/zones/{domain}/validateValidate DNS records

Snapshots

MethodEndpointDescription
GET/api/dns/v1/snapshots/{domain}List DNS snapshots
GET/api/dns/v1/snapshots/{domain}/{snapshotId}Get snapshot with contents
POST/api/dns/v1/snapshots/{domain}/{snapshotId}/restoreRestore from snapshot

Best Practices

Record Management

  • Always validate records with the /validate endpoint before applying changes
  • Use overwrite: false when adding records without removing existing ones
  • Use overwrite: true when you want to completely replace records of a given name/type
  • Use @ as the name for root domain records

Safety

  • Take a snapshot (or note existing records) before making bulk changes
  • Use the whitelisted_record_types parameter during reset to preserve email records (MX, TXT)
  • Set reset_email_records: false when resetting if you use third-party email services

TTL

  • Use lower TTL (300-600s) when planning changes for faster propagation
  • Increase TTL (14400s+) for stable records to reduce DNS query load
  • Remember: old cached records persist until the previous TTL expires

Email Records

  • Be careful with MX records — incorrect changes break email delivery
  • SPF, DKIM, and DMARC records are TXT records — don't overwrite them accidentally

Troubleshooting

Records Not Propagating

  • DNS propagation can take up to 48 hours (usually much less)
  • Check the TTL of the old record — resolvers cache for that duration
  • Use dig or nslookup to verify: dig @8.8.8.8 example.com A

422 Validation Error

  • Invalid record content format (e.g., CNAME must end with .)
  • Conflicting records (e.g., CNAME at root with other records)
  • Invalid record type for the operation

Email Stopped Working After DNS Change

  • Check MX records: dig example.com MX
  • Verify SPF TXT record is intact
  • Use the snapshot restore to revert if needed

Delete Not Working as Expected

  • Filters match by name AND type — both must match
  • If multiple records share name/type and you want to delete only some, use the update endpoint instead

See Also

The following deep-dive guide is available in this skill directory:

  • email-dns-setup.md — Complete email DNS setup (MX, SPF, DKIM, DMARC for Google Workspace, Microsoft 365, and Hostinger Email)

References

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.