hono-void — скилл для Claude Code: тестирование Void-приложений
Скилл hono-void для Claude Code, Cursor, Codex и других платформ, который включается при работе с Void — фреймворком на базе Hono. Агент проверяет страницы, экшены и API через Hono CLI, а не через браузер или curl.
MIT 608 установок ★ 20 обновлён 2026-10-15
npx skills add honojs/skills --skill hono-void -a claude-codeЧто делает hono-void
Void строит Hono-приложение из файловых маршрутов, и код не импортирует hono напрямую. hono-void учит агента запускать npx hono routes, npx hono request и npx hono batch для проверки страниц, page actions и JSON-ответов. Для формы с валидацией агент отправит x-voidpages: true и проверит errors в теле ответа — экшен возвращает 200 даже при ошибке валидации, поэтому код статуса не подходит.
Скилл срабатывает, когда в package.json есть зависимость void, в проекте лежит void.config.ts или вы упоминаете Void в запросе. Для проверки клиентского JavaScript (редирект, сохранение значений формы) агент запустит npx hono browse с happy-dom — это рендерит страницу и выполняет скрипты, но без CSS и раскладки. Без happy-dom в devDependencies команда не сработает.
Какие задачи решает
- протестировать Void-приложение с file-based routing через Hono CLI
- проверить page action с валидацией и
errorsв JSON-ответе - запустить флоу create-then-read одной командой
npx hono batch - проверить клиентский JavaScript и редирект в
npx hono browse - убедиться, что форма не сохраняет старые значения после сабмита
Примеры запросов агенту
- Проверь маршруты в этом Void-приложении и запроси главную страницу
- Отправь POST на
/ramenс пустым полемshopи проверь ошибку валидации - Заполни форму на
/именемHono Ramen, нажми кнопку и проверь редирект в браузере
Как установить hono-void
1Через Skills CLI (Vercel)
npx skills add honojs/skills --skill hono-void -a claude-code2Вручную: положить файлы
~/.claude/skills/hono-void/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/hono-void/
1Через Skills CLI (Vercel)
npx skills add honojs/skills --skill hono-void -a codex2Вручную: положить файлы
.agents/skills/hono-void/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add honojs/skills --skill hono-void -a cursor2Вручную: положить файлы
.cursor/skills/hono-void/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install honojs/skills skills/hono-void2Вручную: положить файлы
.github/skills/hono-void/SKILL.md1Через Skills CLI (Vercel)
npx skills add honojs/skills --skill hono-void -a gemini-cli2Командой платформы
gemini skills install https://github.com/honojs/skills --path skills/hono-voidВручную: положить файлы
.devin/skills/hono-void/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add honojs/skills --skill hono-void -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о hono-void
Как установить hono-void в Claude Code?
Выполни npx skills add honojs/skills --skill hono-void -a claude-code, скилл окажется в ~/.claude/skills/hono-void/SKILL.md.
Что делает hono-void?
Скилл включается в Void-проектах и учит агента тестировать страницы, экшены и API через Hono CLI: npx hono request, npx hono batch и npx hono browse. Void строит приложение из файлов, и обычные способы проверки не подходят.
Зачем нужен x-voidpages: true в запросе?
Страница Void возвращает HTML, а с этим заголовком — JSON с props, errors и component. Так агент проверяет данные страницы и ошибки валидации, не парся HTML.
Исходный текст
SKILL.md · MIT
---
name: hono-void
description: Use when checking or testing a Void app with Hono CLI — pages, page actions, and API routes. TRIGGER when package.json depends on 'void', the project has void.config.ts, or the user mentions Void. Void is a framework built on Hono.
---
# Hono Void Skill
[Void](https://void.cloud) builds a Hono app from file-based routes, so there is no entry file and the code does not import `hono`. Verify changes with [Hono CLI](https://github.com/honojs/cli), not with a browser, curl, or a dev server. It runs the app through Vite with no flag and no file argument:
```bash
npm install -D @hono/cli@next
npx hono --help
npx hono routes --exclude /__void # hide Void's internal routes
npx hono request /
```
For a flow (create, then read), use one `npx hono batch -` call with `expect` on every step. Send `x-voidpages: true` so a page answers with JSON instead of the full HTML. A page action returns 200 even when it fails, so assert on the body (`body` in `expect` is a deep partial match):
```bash
npx hono batch - <<'EOF'
{"method":"POST","path":"/","headers":{"x-voidpages":"true"},"body":{"shop":""},"expect":{"status":200,"body":{"errors":{"shop":"Enter a shop name"}}}}
{"method":"POST","path":"/","headers":{"x-voidpages":"true"},"body":{"shop":"Hono Ramen"},"expect":{"status":200}}
EOF
```
A create that redirects shows its `location`; follow it with `"save":{"next":"header:location"}` and then `"path":"{{next}}"`. An array in `expect` must match the whole array, so check one item of a list by reading the response, not with `expect`. The path, fields, and messages above are an example. Check yours with `npx hono routes` and one request first.
## Checking the page in a browser
HTTP requests do not run the page's JavaScript, so they miss client-side bugs: a form that keeps its values after a submit, or a redirect that lands on the wrong URL. Check those with `npx hono browse`. It loads the page in happy-dom, runs its JavaScript, and fills and clicks in order. Install happy-dom first:
```bash
npm install -D happy-dom
npx hono browse / --fill "Shop name=Hono Ramen" --click 'button[type=submit]'
```
`--fill` takes a field's name, label text, or placeholder (the keys in `forms` of the output), or a CSS selector. The output has the final `url`, the visible `text`, the `forms` values, and `console` errors. happy-dom has no layout or CSS.
## Checking a Void app
- `pages/**` return HTML. Send the header `x-voidpages: true` to get the page data as JSON: `{ component, props, errors, head, ... }`.
- Page actions are POST/PUT/PATCH/DELETE to the page URL. A named action has a `?name` suffix, e.g. `POST /ramen/1?delete`.
- A validation failure in a page action returns 200, not 422, with the messages in `body.errors` (`{ field: message }`). A success has no `errors`.
- A foreign `Origin` header gets 403. Omit `Origin` or use the app's own origin.
- `npx void db seed --yes` resets the local DB between runs.
For Void itself (routing, pages, the Void CLI), read Void's docs in `node_modules/void/docs/`.
© honojs · MIT · honojs/skills