model

An Eloquent model generator for a CatchAdmin module. Eloquent is Laravel's database layer, where a model represents and works with a database table.

In plain words
What is it for?
Use it to generate a model with its table name, fillable fields, search settings, list and form fields, and relationship configuration.
Why use it?
It provides the repeated model configuration needed for editable fields, list fields, searches, statuses, and relationships, reducing manual setup for CRUD modules.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/jaguarjack/catch-admin/03-model
Any agent
npx skills add JaguarJack/catch-admin --skill 03-model
Clone the repo
git clone --depth 1 https://github.com/JaguarJack/catch-admin

Made for: Claude Code, Codex.

Per session 16 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,084 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00016 $0.02084
Opus 5 $0.00008 $0.01042
Sonnet 5 $0.00003 $0.00417
Haiku 4.5 $0.00002 $0.00208

Measured 3d ago against content hash d77ebee50ebf, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

model 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 3d ago.

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.

.claude/skills/03-model/SKILL.md · 406 lines

How it starts

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

Step 3: Generate Model

创建 Eloquent 模型,继承 Catch\Base\CatchModel

File Location

modules/{Module}/Models/{Model}.php

Complete Template

<?php

namespace Modules\{Module}\Models;

use Catch\Base\CatchModel as Model;
use Catch\Enums\Status;
use Illuminate\Database\Eloquent\Casts\Attribute;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
use Illuminate\Database\Eloquent\Relations\HasMany;

class {Model} extends Model
{
    protected $table = '{table}';

    protected $fillable = [
        'id',
        // business fields
        'creator_id',
        'created_at',
        'updated_at',
        'deleted_at',
    ];

    /**
     * 搜索字段配置
     * Operators: like, =, in, between
     */
    public array $searchable = [
        'name' => 'like',
        'status' => '=',
        'category_id' => '=',
    ];

    /**
     * 列表查询字段
     */
    protected array $fields = [
        'id', 'name', 'status', 'created_at'
    ];

    /**
     * 表单提交字段
     */
    protected array $form = [
        'name', 'status'
    ];

    /**
     * 表单关联同步 (多对多)
     */
    protected array $formRelations = ['roles', 'tags'];

    /**
     * 排序字段
     */
    protected string $sortField = 'sort';

    /**
     * 降序排序
     */
    protected bool $sortDesc = true;

    /**
     * 树形结构 (parent_id)
     */
    protected string $parentIdColumn = 'parent_id';

    /**
     * 是否返回树形结构
     */
    protected bool $asTree = false;

    // Relationships
    public function category(): BelongsTo
    {
        return $this->belongsTo(Category::class, 'category_id');
    }
}

CatchModel 核心属性

属性 类型 默认值 说明
$fillable array [] 可填充字段
$searchable array [] 搜索字段及操作符
$fields array ['*'] 列表查询字段
$form array [] 表单提交字段
$formRelations array [] 表单关联同步
$sortField string '' 排序字段
$sortDesc bool true 是否降序
$parentIdColumn string 'parent_id' 父级字段
$asTree bool false 返回树形结构
$isPaginate bool true 是否分页
$dataRange bool false 数据权限
$isFillCreatorId bool true 自动填充创建人

Read the full file on GitHub · 406 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. 3d ago First seen · 406 lines · 16 tokens per session scan A d77ebee50ebf

Subscribe to this mod's changes

model is a skill published in the GitHub repository JaguarJack/catch-admin (928 stars, last pushed 3d ago), licensed Apache-2.0. It adds 16 tokens to every session and 2,084 once invoked, about $0.0001 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

owl-admin-app-dev

Use this skill when developing an application that installed slowlyo/owl-admin, especially backend CRUD, menus, permissions, controllers, services, routes, config/admin.php, app/Admin, helper functions, settings(), adminpages(), AdminPipeline, upload/file preview issues, route conflicts, custom login/menu examples, or…

slowlyo/owl-admin · 114 tokens

owl-admin-devtools-generator

Use this skill for Owl Admin development tools, code generator, dynamic API templates, relationships, visual pages, generated CRUD code, app/ApiTemplates, Support/Apis, Support/CodeGenerator, Controllers/DevTools, or questions about “代码生成器”, “动态 API”, “API 模板”, “关系管理”, “可视化页面”, and “生成 CRUD”.

slowlyo/owl-admin · 82 tokens

owl-admin-frontend-assets

Use this skill for Owl Admin frontend assets, admin-views, public/admin-assets, resource publishing, custom React frontend work, amis-editor frontend, layout/theme frontend files, pnpm commands, or questions about “前端资源”, “admin-views”, “自定义前端”, “发布 assets”, “前端源码”, and “打包后台前端”.

slowlyo/owl-admin · 80 tokens

owl-admin-ops-commands

Use this skill for Owl Admin installation, publishing assets, upgrades, diagnostics, database inspection, menu maintenance, user creation, password reset, route generation, IDE helper, admin:publish, admin:install, admin:update, admin:doctor, admin:db, admin:menu, admin:create-user, or deployment troubleshooting.

slowlyo/owl-admin · 71 tokens

owl-admin-amis-page

Use this skill for Owl Admin pages built with amis, including CRUD pages, forms, tables, detail pages, filters, toolbar actions, iframe pages, custom page schemas, and renderer usage. Trigger when the user mentions amis, schema, Renderers, 后台页面, 列表, 表单, 详情, 筛选, 操作按钮, or admin:make-page.

slowlyo/owl-admin · 84 tokens

owl-admin-extension-module

Use this skill for Owl Admin extensions, modules, multi-admin setup, extension service providers, module routes, module config, menus, permissions, admin-module:init, or extensions under the configured extension directory. Trigger on 扩展, 插件, 多模块, module, extension, ServiceProvider, 菜单导入, or 模块后台.

slowlyo/owl-admin · 75 tokens