superpowers-sage:acorn-eloquent

superpowers-sage:acorn-eloquent is a skill for Claude Code from hekivo/superpowers-sage. It costs 108 tokens per session (2,173 once invoked), scanned A, original, MIT.

Database guidance for using Eloquent, a PHP tool for reading and changing database records, inside Acorn WordPress projects. It explains models, migrations, relationships, factories, and when to use WordPress's own functions instead.

In plain words
What is it for?
Use it to create models and database migrations, connect related records, query custom tables, seed test data, and decide between Eloquent and WordPress database functions.
Why use it?
It helps avoid bypassing WordPress behavior when working with posts and users, while providing a structured approach for custom application data and complex queries.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Part of the superpowers-sage plugin — 36 skills, 3 commands, 11 agents, 7 hooks shipped together

Good fit Use it to create models and database migrations, connect related records, query custom tables, seed test data, and decide between Eloquent and WordPress database functions.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/hekivo/superpowers-sage/acorn-eloquent
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add hekivo/superpowers-sage --skill acorn-eloquent
Clone the repo
git clone --depth 1 https://github.com/hekivo/superpowers-sage

Made for: Claude Code.

Or install superpowers-sage, the plugin that ships this one along with the rest of its 36 skills, 3 commands, 11 agents, 7 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for superpowers-sage:acorn-eloquent

README.md
[![agentmods](https://agentmods.dev/badge/skills/hekivo/superpowers-sage/acorn-eloquent/github.svg)](https://agentmods.dev/skills/hekivo/superpowers-sage/acorn-eloquent)
Your own site
<a href="https://agentmods.dev/skills/hekivo/superpowers-sage/acorn-eloquent"><img src="https://agentmods.dev/badge/skills/hekivo/superpowers-sage/acorn-eloquent/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for superpowers-sage:acorn-eloquent

Your own site · 80×15
<a href="https://agentmods.dev/skills/hekivo/superpowers-sage/acorn-eloquent"><img src="https://agentmods.dev/badge/skills/hekivo/superpowers-sage/acorn-eloquent.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 108 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,173 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00108 $0.02173
Opus 5 $0.00054 $0.01086
Sonnet 5 $0.00022 $0.00435
Haiku 4.5 $0.00011 $0.00217

Measured 12d ago against content hash a8cc915c305c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

superpowers-sage:acorn-eloquent scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/create-model.sh, scripts/run-migration.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/superpowers-sage/skills/acorn-eloquent/SKILL.md · 253 lines

How it starts

The opening of the file, as written. The whole thing — 253 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Eloquent ORM in WordPress via Acorn

When to Use Eloquent vs WordPress Functions

Use case Use Eloquent Use WordPress functions
Custom tables (event logs, testimonials, form entries) Yes No
Complex joins across custom tables Yes No
Relationships between custom models Yes No
Post types, taxonomies, menus No Yes (WP_Query, get_posts)
User management, roles, capabilities No Yes (wp_insert_user, get_userdata)
Options, transients No Yes (get_option, get_transient)
Complex read queries on wp_posts Read-only, carefully Prefer WP_Query first

Rule: WordPress-managed content goes through WordPress functions so hooks fire. Custom application data goes through Eloquent.

Quick Start — Scripts

# Create a model (PascalCase name required)
bash skills/acorn-eloquent/scripts/create-model.sh Testimonial

# Create a model with a migration
bash skills/acorn-eloquent/scripts/create-model.sh EventLog --migration

# Run pending migrations
bash skills/acorn-eloquent/scripts/run-migration.sh

# Run with additional flags (passed through to lando acorn migrate)
bash skills/acorn-eloquent/scripts/run-migration.sh --seed
bash skills/acorn-eloquent/scripts/run-migration.sh --step=2

Scripts: scripts/create-model.sh · scripts/run-migration.sh

Models

Models live in app/Models/. Always declare $table explicitly with the WordPress prefix.

class Testimonial extends Model
{
    use HasFactory;

    protected $table = 'wp_testimonials';

    protected $fillable = ['author_name', 'company', 'body', 'rating', 'is_featured', 'published_at'];

    protected $casts = [
        'rating'       => 'integer',
        'is_featured'  => 'boolean',
        'published_at' => 'datetime',
        'metadata'     => 'array',
    ];
}

See references/models.md for:

  • Full property reference ($primaryKey, $keyType, $incrementing)
  • Custom table example
  • WP core table mirror example with read-only guard
  • Accessors/mutators with Attribute::make()

Read the full file on GitHub · 253 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 253 lines · 108 tokens per session scan A a8cc915c305c

Subscribe to this mod's changes

superpowers-sage:acorn-eloquent is a skill published in the GitHub repository hekivo/superpowers-sage (13 stars, last pushed 3mo ago), licensed MIT. It adds 108 tokens to every session and 2,173 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

truss-schema

Ground a database schema change in this application's real structure using Laravel Truss. Use when adding or altering tables, columns, indexes, or foreign keys, when a migration needs to match what is already there, or when you need to know what a migration actually changed. Structure only, never data.

albertoarena/laravel-truss · 63 tokens

laravel-database-optimization

Laravel database optimization patterns. Use when writing Eloquent queries, creating migrations, configuring caching, debugging slow queries, or optimizing database performance. Triggers on tasks involving N+1 queries, indexing, Redis caching, pagination, or database transactions.

AsyrafHussin/agent-skills · 55 tokens

check-batch-processing

Analyzes PHP code for batch processing issues. Detects single-item vs bulk operations, missing batch inserts, individual API calls in loops, transaction overhead.

dykyi-roman/awesome-claude-code · 35 tokens

eloquent-patterns

Eloquent ORM best practices: query builders, scopes, relations, N+1 prevention, batch operations, soft deletes, model events, raw queries when needed. Apply when: writing or reviewing Eloquent queries and model interactions. Activated automatically by laravel-plugin/stack.md as a convention skill for the development…

AratKruglik/claude-sdlc · 68 tokens

laravel-migrations

Use when designing a database schema or managing Laravel 13 migrations — Schema Builder, columns, indexes, foreign keys, or seeders.

fusengine/agents · 32 tokens

laravel-eloquent

Eloquent and query-layer engineering rules for Laravel — eliminating N+1, choosing a pagination strategy, short atomic transactions, casts and scopes on the model, where raw SQL is allowed, and how migrations declare the schema those queries depend on. Use when writing or reviewing Eloquent models, migrations, query…

Foysal50x/skills · 93 tokens