/SKILL.md
# Chainhost Setup Skill Use this prompt to help set up a new chainhost mirror domain. ## What You Need - A domain name (e.g., `yourdomain.com`) - Cloudflare account (free tier works) - Domain nameservers pointed to Cloudflare ## Setup Steps ### 1. Clone and Deploy Worker ```bash git clone https://github.com/jefdiesel/chainhost cd chainhost/cloudflare-worker npx wrangler login npx wrangler deploy ``` ### 2. Add Routes to wrangler.toml ```toml [[routes]] pattern = "*.yourdomain.com/*" zone
npx skillsauth add jefdiesel/appchain_esp721 appchain_esp721Install this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this prompt to help set up a new chainhost mirror domain.
yourdomain.com)git clone https://github.com/jefdiesel/chainhost
cd chainhost/cloudflare-worker
npx wrangler login
npx wrangler deploy
[[routes]]
pattern = "*.yourdomain.com/*"
zone_name = "yourdomain.com"
[[routes]]
pattern = "yourdomain.com/*"
zone_name = "yourdomain.com"
In subdomain-router.js, add domain detection:
const isYourDomain = parts.length >= 3 && parts[parts.length - 2] === 'yourdomain';
if (!isChainhost && !isChost && !isYourDomain) {
return new Response('Invalid hostname', { status: 400 });
}
const baseDomain = isYourDomain ? 'yourdomain.com' : (isChost ? 'chost.app' : 'chainhost.online');
Add landing page for root domain:
if (hostname === 'yourdomain.com' || hostname === 'www.yourdomain.com') {
// Serve from inscription or static HTML
return new Response(YOUR_LANDING, {
headers: { 'Content-Type': 'text/html' },
});
}
Add these records with Proxy ON (orange cloud):
| Type | Name | Content | |------|------|---------| | A | @ | 192.0.2.1 | | A | * | 192.0.2.1 |
npx wrangler deploy
To serve your root domain from an on-chain inscription:
if (hostname === 'yourdomain.com' || hostname === 'www.yourdomain.com') {
const HOME_TX = '0x...your-inscription-tx-hash...';
const content = await fetchTxContentRaw(HOME_TX);
if (content?.decoded || content?.dataUri) {
let html = content.decoded || content.dataUri;
// Inject favicon and OG tags
const tags = `
<link rel="icon" href="https://chainhost.online/favicon.png">
<meta property="og:title" content="Your Site Title">
<meta property="og:description" content="Your description">
`;
if (html.includes('</head>')) {
html = html.replace('</head>', tags + '</head>');
}
return new Response(html, {
headers: { 'Content-Type': 'text/html' },
});
}
}
After setup, clear cache for any name:
https://anyname.yourdomain.com/_clear?name=SITENAME&key=YOUR_CACHE_KEY
Set the key in wrangler.toml:
[vars]
CACHE_CLEAR_KEY = "your-secret-key"
devops
Local text-to-speech via sherpa-onnx (offline, no cloud)
devops
Feishu cloud storage file management. Activate when user mentions cloud space, folders, drive.
devops
Feishu document read/write operations. Activate when user mentions Feishu docs, cloud docs, or docx links.
devops
Local text-to-speech via sherpa-onnx (offline, no cloud)