ops_dns_regru
Skill17 starsChanged 4 months agoMITView on GitHub
Point a subdomain to IPv4 via REG.API 2 (zone/get_resource_records, zone/add_alias); credentials from REGRU_* in the environment
- Reads credentials
- Sends data out
In this repository12 other files it gives its agents.
- app_controlSkill
- aws_opsSkill
- code_executionSkill
- desktop_automationSkill
- docker_deploySkill
- file_operationsSkill
- gitlab_apiSkill
- gitlab_pages_ciSkill
- ops_reverse_proxySkill
- ops_tmux_remote_deploySkill
- system_infoSkill
- vps_host_sshSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 75
If the user gives only an FQDN (app.example.ru), split: dname=example.ru, subdomain=app.
- Very specific: line 79
Before add_alias, prefer get_resource_records: if an A with the right content and subname already exists, do not duplicate (or use …
- Very specific: line 83
If the account has a separate test endpoint (doc §2.5), set REGRU_API_BASE_URL accordingly in .env.
≈ “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.
Files
REG.API 2 — documented calls only
Official docs: REG.API 2.
Zone base URL: ${REGRU_API_BASE_URL}/api/regru2/zone/<function> (default host https://api.reg.ru).
Bot process credentials (exported from settings into os.environ): REGRU_API_USERNAME, REGRU_API_PASSWORD, optional REGRU_DNS_ZONE (apex zone, e.g. example.ru).
Do not print the password or full API responses to the user; log-level summaries with result / error_text only.
Prerequisite
The domain must use REG.RU nameservers (ns1.reg.ru / ns2.reg.ru), otherwise the API returns DOMAIN_IS_NOT_USE_REGRU_NSS.
1) List current records
POST Content-Type: application/x-www-form-urlencoded, fields input_format=json, input_data = one-line JSON string (per docs). Zone examples include username / password inside input_data.
Build JSON with Python (avoids password showing up in ps from inline flags — use env only):
REGRU_ZONE="${REGRU_DNS_ZONE:?set REGRU_DNS_ZONE}"
INPUT_DATA="$(REGRU_ZONE="$REGRU_ZONE" python3 -c '
import json, os
z = os.environ["REGRU_ZONE"]
print(json.dumps({
"username": os.environ["REGRU_API_USERNAME"],
"password": os.environ["REGRU_API_PASSWORD"],
"domains": [{"dname": z}],
"output_content_type": "json",
}))
')"
curl -sS -X POST "${REGRU_API_BASE_URL}/api/regru2/zone/get_resource_records" \
-H "Content-Type: application/x-www-form-urlencoded" \
--data-urlencode "input_format=json" \
--data-urlencode "input_data=${INPUT_DATA}"2) Add A (IPv4) for a subdomain — zone/add_alias
Parameters (doc §9.2): domains — list of {dname}, shared subdomain label without the zone (www, api, or @ for apex), ipaddr.
Example: subdomain app → IP 203.0.113.10:
REGRU_ZONE="${REGRU_DNS_ZONE:?set REGRU_DNS_ZONE}"
export SUB="${SUBDOMAIN:-app}"
export IP="${TARGET_IPV4:?set TARGET_IPV4}"
INPUT_DATA="$(REGRU_ZONE="$REGRU_ZONE" python3 -c '
import json, os
z, sub, ip = os.environ["REGRU_ZONE"], os.environ["SUB"], os.environ["IP"]
print(json.dumps({
"username": os.environ["REGRU_API_USERNAME"],
"password": os.environ["REGRU_API_PASSWORD"],
"domains": [{"dname": z}],
"subdomain": sub,
"ipaddr": ip,
"output_content_type": "json",
}))
')"
curl -sS -X POST "${REGRU_API_BASE_URL}/api/regru2/zone/add_alias" \
-H "Content-Type: application/x-www-form-urlencoded" \
--data-urlencode "input_format=json" \
--data-urlencode "input_data=${INPUT_DATA}"If the user gives only an FQDN (app.example.ru), split: dname=example.ru, subdomain=app.
3) Idempotency
Before add_alias, prefer get_resource_records: if an A with the right content and subname already exists, do not duplicate (or use documented update flows if the IP must change).
Test API endpoint
If the account has a separate test endpoint (doc §2.5), set REGRU_API_BASE_URL accordingly in .env.
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
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.

