# Acorn data

> Acorn data is an open-source agent skill for databases. Guides an agent through Acorn database work: Eloquent models, custom tables and migrations. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/hekivo/kivo-wise/tree/main/plugins/kivo-wise/skills/acorn-data
- **Repository:** https://github.com/hekivo/kivo-wise
- **GitHub stars:** 14
- **License:** MIT
- **Skill name:** acorn-data
- **Collection:** https://github.com/hekivo/kivo-wise
- **Categories:** [databases](https://ai-powered.com/categories/databases)
- **Listing updated:** 2026-12-04

## About

This skill covers storing and querying data in WordPress projects that run Laravel's database layer through Acorn. It explains how the default wordpress connection picks up the WordPress database constants and table prefix, so models, DB facade calls and migrations are prefixed automatically. It also helps the agent decide between post meta, options, user or term meta, a custom post type, and a custom table before writing any code.

The workflow walks through creating an unprefixed migration with make:migration, running and checking it with migrate and migrate:status, generating a model with the WordPress primary key and timestamp settings, and writing WordPress-owned data through WordPress APIs rather than directly. It includes guidance on object cache invalidation, seeders and hand-written factories, and running migrations once per release during deploys. Common failure modes such as doubled table prefixes and mass assignment errors are listed with fixes.

The skill expects an Acorn-based project, with commands run through the project's own WP-CLI, Acorn and Composer runners. It relies on the Acorn CLI and Composer, and factories need the fakerphp/faker dev dependency. It states that destructive migrations and direct writes to WordPress core tables should be confirmed with the user first.

## When your agent uses it

> Use when storing or querying data through Acorn's database layer - Eloquent models (app/Models, models over wp_posts, postmeta, users), custom tables, migrations (make:migration, migrate --force on deploy), seeders and factories, the DB facade, table prefix errors ("Table wp_wp_x doesn't exist"), and choosing post meta vs options vs a post type vs a custom table. For queues use acorn-background; for endpoints use acorn-routes-api; for post type registration use acorn-scaffolding.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/hekivo/kivo-wise/tree/HEAD/plugins/kivo-wise/skills/acorn-data)
- [License: MIT](https://github.com/hekivo/kivo-wise/tree/HEAD/plugins/kivo-wise/skills/acorn-data)

## Features

- **Store selection guidance:** Helps choose between post meta, options, user or term meta, a post type or a custom table.
- **Migrations with prefix handling:** Creates unprefixed migrations that the connection prefixes automatically, with down() expected.
- **Eloquent model setup:** Covers table names, WordPress primary keys, disabled timestamps and fillable attributes.
- **WordPress-safe writes:** Routes writes to posts, meta and users through WordPress APIs and handles object cache cleanup.
- **Seeders and factories:** Explains seeding data and writing hand-made factories with the faker dev dependency.
- **Deploy migration steps:** Runs migrations once per release after code and caches are updated, with backward-compatible changes.

## Good for

- Create a custom table for form submissions in an Acorn project
- Write a migration and matching Eloquent model for a sync-state table
- Decide whether settings should be stored as post meta, options or a custom table
- Query WordPress posts with an Eloquent model that maps to wp_posts
- Fix a doubled table prefix error such as wp_wp_ in migrations
- Add seed data for a custom table in local development

## Install

### Claude Code

This skill ships in the `kivo-wise` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add hekivo/kivo-wise
/plugin install kivo-wise@kivo-wise
```

Or copy only this skill to `~/.claude/skills/acorn-data`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/hekivo/kivo-wise.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/acorn-data &&
cp -R "$tmp/plugins/kivo-wise/skills/acorn-data" ~/.claude/skills/acorn-data &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/acorn-data` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/acorn-data` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/hekivo/kivo-wise.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/acorn-data &&
cp -R "$tmp/plugins/kivo-wise/skills/acorn-data" ~/.agents/skills/acorn-data &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/acorn-data` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/acorn-data` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/hekivo/kivo-wise.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/acorn-data &&
cp -R "$tmp/plugins/kivo-wise/skills/acorn-data" ~/.cursor/skills/acorn-data &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/acorn-data` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/hekivo/kivo-wise.git --path plugins/kivo-wise/skills/acorn-data
```

Or copy the folder to `~/.gemini/skills/acorn-data` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/acorn-data`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/hekivo/kivo-wise.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/acorn-data &&
cp -R "$tmp/plugins/kivo-wise/skills/acorn-data" ~/.copilot/skills/acorn-data &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/acorn-data` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/hekivo/kivo-wise.git
```

Then copy `kivo-wise/plugins/kivo-wise/skills/acorn-data` into your agent's skills folder as `acorn-data`. Agents that support SKILL.md read one folder per skill.

## FAQ

### Does the skill need any extra tools installed?

It expects an Acorn project with the WP-CLI and Composer runners available, and factories need fakerphp/faker as a dev dependency.

### Will Acorn data add table prefixes manually?

No. Table names should be unprefixed in migrations and models because the wordpress connection adds the WordPress table prefix automatically.

### Does Acorn data cover queues or API endpoints?

No. The skill points to acorn-background for queues, acorn-routes-api for endpoints and acorn-scaffolding for post type registration.

### Are destructive database commands run without asking?

No. Destructive migrations on shared data, such as dropping columns or rolling back on production, require the agent to stop and ask first.

### How do I install Acorn data in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/acorn-data to use it in all your projects, or to .claude/skills/acorn-data 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 data 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 data?

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 data?

The closest alternatives to Acorn data are Acorn stack, Acorn background, Acorn routes API, Craft cloud and Db migration agent.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Acorn stack](https://ai-powered.com/skills/acorn-stack): Acorn stack is an open-source agent skill for developer tools.
- [Acorn background](https://ai-powered.com/skills/acorn-background): Acorn background is an open-source agent skill for developer tools.
- [Acorn routes API](https://ai-powered.com/skills/acorn-routes-api): Acorn routes API is an open-source agent skill for developer tools.
- [Craft cloud](https://ai-powered.com/skills/craft-cloud): Craft cloud is an open-source agent skill for databases.
- [Db migration agent](https://ai-powered.com/skills/db-migration-agent): Db migration agent is an open-source agent skill for databases.
- [Database migrations](https://ai-powered.com/skills/database-migrations-nabwinsaud): Database migrations is an open-source agent skill for databases.
- [Data layer patterns edho ferdian](https://ai-powered.com/skills/data-layer-patterns-edho-ferdian): Data layer patterns edho ferdian is an open-source agent skill for databases.
- [Axiom data](https://ai-powered.com/skills/axiom-data-charleswiltgen-2): Axiom data is an open-source agent skill for databases.

---
Source: https://ai-powered.com/skills/acorn-data
