
Acorn routes API
Guides adding HTTP endpoints, webhooks and virtual pages via Acorn routes or WP REST
Acorn routes API is an open-source agent skill for developer tools. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.
- Scripts
- None
- Platforms
- Claude Code, Codex, Cursor
- GitHub stars
- 14
- Last commit
- License
- MIT
- Listing updated
Similar skills
About Acorn routes API
This skill helps an AI coding agent decide between two HTTP mechanisms in a WordPress project running Acorn: WordPress REST endpoints registered with register_rest_route, and Laravel-style routes defined in Acorn's route files. It walks through the choice using a decision table, then follows a branch for each option covering validation, authorisation, nonces, controllers and middleware.
The workflow starts by reading the withRouting() boot call to see which route files and prefixes are active, and listing existing routes with the Acorn route list command. It then covers request lifecycle pitfalls, such as Acorn answering matched routes before WordPress template output runs, and reminds the agent to set page metadata for virtual pages. It also includes checks with curl and tests, plus a troubleshooting table for common failures like missing auth aliases, 404s and rate limiter errors.
The skill expects a WordPress project with Acorn installed and assumes command-line access through the project's runner tooling. It refers to supporting reference files for routes, REST patterns and middleware auth.
When your agent uses it
Use when adding or fixing an HTTP endpoint or virtual page in an Acorn project - Acorn routes (routes/web.php, routes/api.php, withRouting, Route::get, controllers, middleware, route:list) versus register_rest_route (permission_callback, /wp-json, X-WP-Nonce); webhooks, JSON APIs, CORS, throttle, API-key or JWT auth, "Target class [auth] does not exist", 404 on a defined route. For Livewire use acorn-livewire; for models use acorn-data; for nonces and capabilities in depth use wp-security-escaping.
From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.
What it can access
From a static check of its 4 files (26 KB) on GitHub on 4 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.
Check another skill before you install it.
Install
This skill ships in the kivo-wise plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):
/plugin marketplace add hekivo/kivo-wise
/plugin install kivo-wise@kivo-wiseOr copy only this skill to ~/.claude/skills/acorn-routes-api:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/hekivo/kivo-wise.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/acorn-routes-api &&
cp -R "$tmp/plugins/kivo-wise/skills/acorn-routes-api" ~/.claude/skills/acorn-routes-api &&
rm -rf "$tmp"For one project only, put the folder in .claude/skills/acorn-routes-api inside it instead.
Copy the skill folder to ~/.agents/skills/acorn-routes-api to use it in every repository:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/hekivo/kivo-wise.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/acorn-routes-api &&
cp -R "$tmp/plugins/kivo-wise/skills/acorn-routes-api" ~/.agents/skills/acorn-routes-api &&
rm -rf "$tmp"For one repository only, put the folder in .agents/skills/acorn-routes-api inside it instead.
Copy the skill folder to ~/.cursor/skills/acorn-routes-api to use it in every project:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/hekivo/kivo-wise.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/acorn-routes-api &&
cp -R "$tmp/plugins/kivo-wise/skills/acorn-routes-api" ~/.cursor/skills/acorn-routes-api &&
rm -rf "$tmp"For one project only, put the folder in .cursor/skills/acorn-routes-api inside it instead.
Run in a terminal (add --scope workspace to install it for the current workspace only):
gemini skills install https://github.com/hekivo/kivo-wise.git --path plugins/kivo-wise/skills/acorn-routes-apiOr copy the folder to ~/.gemini/skills/acorn-routes-api yourself.
For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/acorn-routes-api:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/hekivo/kivo-wise.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/acorn-routes-api &&
cp -R "$tmp/plugins/kivo-wise/skills/acorn-routes-api" ~/.copilot/skills/acorn-routes-api &&
rm -rf "$tmp"For one project only, put the folder in .github/skills/acorn-routes-api inside it instead.
Get the folder:
git clone --depth 1 https://github.com/hekivo/kivo-wise.gitThen copy kivo-wise/plugins/kivo-wise/skills/acorn-routes-api into your agent's skills folder as acorn-routes-api. Agents that support SKILL.md read one folder per skill.
What it does
- Mechanism selection guide
- A decision table for choosing between WordPress REST endpoints and Acorn routes for a given need.
- Acorn route workflow
- Steps for generating controllers and middleware, validating input and authorising requests in Acorn.
- WordPress REST workflow
- Guidance on registering REST routes with permission callbacks, argument schemas and nonce headers.
- Cross-cutting setup
- Notes on CORS configuration and rate limiting for endpoints.
- Troubleshooting table
- Common symptoms such as missing auth aliases, route 404s and cache issues, with their fixes.
- Verification steps
- Route listing, curl checks and test commands to confirm an endpoint behaves as intended.
Good for
- Add a webhook receiver endpoint to a WordPress site
- Create a JSON API for a block editor feature
- Build a virtual page with its own URL rendered by Blade
- Add API key middleware to an existing Acorn route
- Debug a defined route that returns 404 in Acorn
Acorn routes API FAQ
When should I use Acorn routes instead of register_rest_route?
Use Acorn routes for Laravel validation, controllers with dependency injection, middleware stacks, Blade or redirect responses, and virtual pages. Use register_rest_route when the endpoint is called by the block editor or wp-admin JavaScript, must appear in /wp-json discovery, or needs application passwords or the REST cookie and nonce flow.
Why does my Acorn route show a 'Target class [auth] does not exist' error?
Acorn's default middleware aliases omit auth, can, guest and verified. You can write your own middleware class for the capability check or define the alias in withMiddleware().
Does Acorn protect browser POST requests against cross-site requests?
Not by default. Acorn's web group has no CSRF middleware, so the skill recommends verifying a WordPress nonce or enabling ValidateCsrfToken through withMiddleware().
Why does a WordPress page disappear after adding a route?
An Acorn route that matches the same path takes priority over the WordPress page, so the skill advises prefixing Acorn routes and checking the route list against the page tree.
How do I install Acorn routes API in Claude Code?
Copy the skill folder from GitHub to ~/.claude/skills/acorn-routes-api to use it in all your projects, or to .claude/skills/acorn-routes-api in one project. Or install the kivo-wise plugin, which includes it: /plugin marketplace add hekivo/kivo-wise, then /plugin install kivo-wise@kivo-wise.
Does Acorn routes API run scripts?
No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.
Which AI agents can use Acorn routes API?
Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.
What are the best alternatives to Acorn routes API?
The closest alternatives to Acorn routes API are Acorn background, Acorn stack, Acorn data, Wp hooks lifecycle and Acorn scaffolding.
Where this comes from
- Description: from the skill's own SKILL.md.
More from hekivo/kivo-wise

Writes approved design plans as WordPress block markup and scaffolds missing blocks
- Open source
- 14 GitHub stars
- Developer tools

Maps Figma components to project code blocks through Code Connect, with approval first
- Open source
- 14 GitHub stars
- Design and media

Turns a Figma frame, HTML file or URL into a WordPress page on the Roots stack
- Open source
- 14 GitHub stars
- Developer tools

Turns a Figma frame into neutral section specs for kivo-creator via the Figma MCP server
- Open source
- 14 GitHub stars
- Design and media

Turns an HTML file or URL into kivo-creator section specs with reference screenshots
- Open source
- 14 GitHub stars
- Developer tools

Maps design sections to a project's existing blocks before any code is generated
- Open source
- 14 GitHub stars
- Developer tools

