ask-domain-rank

Look up domain names, influence ranks, and favicons from a bundled offline JSON dataset.

74|11|Updated Jul 4, 2024
One-click install
npx skills add https://github.com/OpenSourceAGI/qwksearch-research-agent --skill ask-domain-rank-opensourceagi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ask-domain-rank
Source: https://github.com/OpenSourceAGI/qwksearch-research-agent/tree/main/skills/ask-domain-rank
Command: npx skills add https://github.com/OpenSourceAGI/qwksearch-research-agent --skill ask-domain-rank-opensourceagi

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires tldts.

What problem does it solve? It turns a hostname into a human-readable source name, an influence rank, and a favicon without any network call, using JSON data bundled inside the domain-rank package. ## Core Features & Use Cases - Domain Lookup: Use lookupDomain, getTopDomains, and searchDomains over a merged Tranco + CommonCrawl dataset parsed into a Map at module load. - Source Labels and Titles: Format bare domains into display titles with formatDomainAsTitle, getSourceTitle, and title overrides for search-result labels and autocomplete. - Favicon Retrieval: Get favicons as base64 in Node or as Google favicon URLs in browsers and Workers via getFaviconForDomain. - Use Case: When building a search results page, call lookupDomain on each result's root domain to attach a source label, rank, and favicon without hitting any external API. ## Quick Start Ask the assistant to look up the source name, rank, and favicon for a domain like nytimes.com using the domain-rank package.

Frequently Asked Questions about ask-domain-rank

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I look up a domain's rank and source name offline?

Call lookupDomain from the domain-rank package with a bare lowercase root domain such as nytimes.com. It returns an object with name, rank, title, newsRank, and favicon fields, or null when the domain is unknown, with no network call involved.

How to get a favicon for a domain in a browser or Cloudflare Worker?

Call getFaviconForDomain with formatBase64 set to false, which returns the Google favicon URL and touches no disk. The default base64 path imports node:fs at module scope and only works in Node with the package directory as the working directory.

Why does lookupDomain return null for a real website?

The dataset keys are bare lowercase root domains with no scheme, no www prefix, and no path. Run convertURLToDomain on the input first, and note that only root domains are indexed, so subdomains need their own entries or findMainDomain for known mirrors.

Why does the favicon lookup throw ENOENT for favicons.json?

The base64 favicon path reads ./data/favicons.json relative to process.cwd(), and that file is not shipped in the package. Run bun run favicons to generate it, or use getFaviconForDomain with formatBase64 false to get the URL form instead.

Can I regenerate the bundled Tranco and CommonCrawl datasets?

Yes, run bun run download for the Tranco import, bun run info to parse domain info, bun run merge to merge the lists, and bun run favicons to fetch favicons. These write into the data directory, and the results should be committed since the package ships them.