audit-hosting
Audit a Hostinger web hosting account (Shared, Cloud and Agency plans) and report what needs attention: every plan and website,…
Step 7 (validate) of the Hostinger Headless flow. Quick gate before deploy: every prior stage already self-verifies, so this is a fast confirmation (instance live + backend API answers with seeded content), an npm audit of the frontend before the first deploy (fix high/critical
Claude Code
$ npx -y skills add hostinger/api-mcp-server --skill 07-validate --agent claude-code
Codex
$ npx skills add hostinger/api-mcp-server --skill 07-validate -a codex -y
Cursor
$ npx skills add hostinger/api-mcp-server --skill 07-validate -a cursor -y
Gemini CLI
$ npx skills add hostinger/api-mcp-server --skill 07-validate -a gemini-cli -y
GitHub Copilot
$ npx skills add hostinger/api-mcp-server --skill 07-validate -a github-copilot -y
OpenCode
$ npx skills add hostinger/api-mcp-server --skill 07-validate -a opencode -y
Windsurf
$ npx skills add hostinger/api-mcp-server --skill 07-validate -a windsurf -y
name: headless-step-validate description: "Step 7 (validate) of the Hostinger Headless flow. Quick gate before deploy: every prior stage already self-verifies, so this is a fast confirmation (instance live + backend API answers with seeded content), an npm audit of the frontend before the first deploy (fix high/critical advisories, rebuild clean), plus optional local preview and user sign-off. Skip the heavy parts when nobody needs to approve."
> **Fast.** Every stage before this one already verifies its own work (provision checks the > backend, content-model push checks the REST counts, frontend builds clean and looks right at desktop > and phone width), and **deploy verifies the live result**. So validate is **not** a re-run of all > that — it's two quick checks, an npm audit before the first deploy, and the optional human > preview/sign-off. **Skip Steps 4–5 (rebuild + approval) entirely** on an autonomous or temp-domain run > where no one is signing off. Spend time here only when a person wants to see it before it goes live.
**In:** project in `~/.hostinger/<domain>/src/`, `site.json`, `state.json`.
`provision.status == "completed"` in `state.json`. Anything else → not ready; return to the instance barrier, don't deploy. Deploy's pre-flight asks the connector again (see *State and artifacts* in the top-level `SKILL.md`).
Hit the live API from `site.json` and confirm it answers **with the content the push created** — a 200 with an empty catalog means the push didn't land:
planned post count, and `GET {urls.rest_api}/media?per_page=1` → `X-WP-Total` matches the planned image count (more = duplicates).
`GET {urls.store_api}/products?per_page=100` → 200 with the seeded products and `prices` (minor units); count matches the plan. Don't test checkout while `woocommerce.payment_enabled` is `false`.
prices *(confirm against the store)*.
collection with `seed` records in `pocketbase/schema.json` lists them (`GET {urls.api}/collections/<name>/records?perPage=1` → `totalItems` at least the seed count, for collections visitors may list). `pb-verify.mjs` already ran at the content-model push, so don't repeat it here.
throwaway test submissions in [`../04-content-model/wordpress/contact-form.md`](../04-content-model/wordpress/contact-form.md) §5: the first must return `status` **`mail_sent`**, the one with the honeypot filled **`spam`**.
Fail or counts off → fix content-model push before building against live data.
Run this only when `~/.hostinger/<domain>/deploy.json` doesn't exist yet: deploy writes it after the first passing deploy, so iterate and redeploy runs skip this step and don't report the skip. Deploy ships `package-lock.json` and the server installs from it, so the fix lands in the lockfile here. In `~/.hostinger/<domain>/src/`:
1. **Audit.** `npm audit`. No vulnerabilities → note "npm audit clean" in validate's *Steps completed* row of the final report and go on to Step 4. If it can't run (no `package-lock.json`, registry unreachable), log an `issue` event `{"stage":"validate","symptom":"npm audit could not run","cause":"<error>","severity":"medium","resolved":false}`, list it under *Gaps / follow-ups*, and go on. 2. **Back up.** Copy `package.json` and `package-lock.json` to `~/.hostinger/<domain>/audit-backup/` (outside `src/`, so the deploy archive doesn't pick them up). This is the last working pair. Delete `audit-backup/` when this step ends. 3. **Safe fixes.** `npm audit fix`, then rebuild clean: delete the build output (`.next` for Next.js, `.output` for Nuxt, `build` for SvelteKit, `dist` for Astro and Vite/React/Vue; for any other framework, the folder `npm run build` writes), run `npm run build`, and run the project's `check` or `check:dist` script if it has one. Passes → copy the pair to the backup again. Fails → restore the backup and `npm ci`. Never run `npm audit fix --force`: it takes breaking major upgrades across the whole tree. Low and moderate advisories this can't fix stay. 4. **High and critical.** If `npm audit --audit-level=high` still fails, run `npm audit --json`. For each entry under `vulnerabilities` whose `severity` is `high` or `critical` and whose `fixAvailable` is an object, run `npm install <fixAvailable.name>@<fixAvailable.version>`. Rebuild clean as in item 3. Fails → restore the backup, `npm ci`, and treat those advisories as leftovers. `fixAvailable: false` means no dependency upgrade fixes it.
**Leftovers.** A high or critical advisory that no upgrade fixes, or whose upgrade breaks the build, doesn't block the deploy: deploy the last working pair, log one event for all of them, and list each (package, severity, advisory ID, why it stays) under *Gaps / follow-ups* in the final report ([`../09-done/SKILL.md`](../09-done/SKILL.md)):
node <skill>/run-log.mjs <domain> event issue '{"stage":"validate","symptom":"npm audit: <n> high/critical advisories left","cause":"<package>@<version> <advisory ID>: no fix through an upgrade | upgrade breaks the build; …","severity":"high","resolved":false}'Frontend already produced a clean build; only redo this if you want a from-scratch guarantee be
Audit a Hostinger web hosting account (Shared, Cloud and Agency plans) and report what needs attention: every plan and website,…
Audit every Hostinger VPS (KVM plans) on the account and report what needs attention: server state and failed actions, CPU,…
Connect a custom domain to a website on Hostinger web hosting (Shared, Cloud or Agency plans) end to end: attach the domain to…
Deploy an existing project to a website on Hostinger web hosting (Shared, Cloud or Agency plans) and keep it deployed: picks the…
Deploy an existing project to a Hostinger VPS (KVM plans): sets up SSH key access, applies a Hostinger firewall group, runs…
Orchestrator for the Hostinger Headless build flow — build and deploy a real website on the user's Hostinger account from a…
Use when the user needs to run GitNexus CLI commands like analyze/index a repo, check status, clean the index, generate a wiki,…
Query and invoke tools on MCP servers using fastmcp list and fastmcp call. Use when you need to discover what tools a server…
Design n8n AI agents the right way. Use when building or editing any @n8n/n8n-nodes-langchain.* AI node — an AI Agent, LLM chain,…
小红书内容发布技能。支持两种发布模式:(1) 上传图文模式 - 图片+短文;(2) 写长文模式 - 长篇文章+排版模板。 支持两种输入方式:用户提供完整内容和图片/图片URL,直接发布;或提供网页URL,自动提取内容和图片。…