Agent skill

Arandu Module Generator

by arandu-io in arandu-io/arandu

Adds a new entity, resource or CRUD module to an Arandu Go application by writing a YAML specification instead of hand-writing the Go code.

MITAuto-check passedDevelopment

Install Arandu Module Generator

skills CLI
$ npx skills add arandu-io/arandu --skill arandu-module -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install arandu-io/arandu arandu-module --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/arandu-io/arandu.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/arandu-module .claude/skills/arandu-module && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
arandu-module
GitHub stars
281
Token cost
~2.4k tokens
SKILL.md length
1,003 words
Files
1
Skills in repo
12
Repo updated
First seen
Licence
MIT

At a glance

Adds a new entity, resource or CRUD module to an Arandu Go application by writing a YAML specification instead of hand-writing the Go code.

  • Works in 6 steps: Generate the resource. `aru make:module… → Or write a specification when the module… → Change a table with a new migration,… → …
  • Adding a new database-backed resource to an Arandu application
  • SKILL.md covers When to use, Before you start, Contracts and imports and Procedure, plus 8 more sections
  • Calls go and bash

What it does

In Arandu, a model never writes the entity, policy, service or migration by hand; it writes one YAML specification, and a deterministic generator produces the Go for the entity and its table, a typed query helper, the policy, service, request, controller, migration, screens and tests, printing the route lines and wiring for a person to paste in rather than writing them itself. The stated reasoning is that a new framework can't be in any model's training data, so asking a model for Go directly tends to borrow patterns from frameworks Arandu doesn't use.

The procedure is to read the schema, generated from the validator's own constants so it can't drift from what the generator accepts, write the specification as one YAML file with six top-level properties, check it to see every validation problem at once, then generate for real; the specification is saved beside the generated code. A bundled example module called notes shows the shape to copy, including an ownership rule in the policy's custom block and feature tests proving a cross-tenant read returns 404 and another member's edit returns 403.

When your agent uses it

  • Adding a new database-backed resource to an Arandu application
  • Scaffolding CRUD for a new domain object with access rules
  • Checking a module specification before generating its code

Example prompts

  • “Add an invoices module with the standard CRUD actions to this Arandu app.”
  • “Check my posts.yaml specification before generating the module.”
  • “Scaffold a module for comments where only the author can edit their own.”

Requirements

  • The `aru` CLI

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Generate the resource. `aru make:module note --fields
  2. Or write a specification when the module needs permissions or a
  3. Change a table with a new migration, never by editing one that ran
  4. Put the entity's rules in the entity. A transition is a method on the
  5. Order the use case in the service: validate the request, read the row
  6. Run aru model:build after any change to an entity, and never edit what

What it can do on your machine

Read from SKILL.md and the folder at commit b8a4273. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • go
    • bash

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Arandu Module Generator loads about 2.4k tokens when it runs. Until then it costs about 169 tokens; SKILL.md has 1,003 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~169
When it runs · the whole SKILL.md, loaded when a task matches
~2.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from arandu-io/arandu at commit b8a4273, republished under its MIT licence (© arandu-io). 1,003 words, ~2,429 tokens.

Download SKILL.mdSave it as .claude/skills/arandu-module/SKILL.md (or your agent's skills folder).
name
arandu-module
description
The model and data of an Arandu (Go) application -- an entity, its table, the generated query, migrations, factories, seeders, scopes, relations, the rules of the entity itself and the service that orders a use case over them. Use when the request is to "create a model", "add a table", "add a column", "scaffold CRUD", "add invoices", "a record under another record", "add a state transition", "write a seeder", or when a query, a migration or `model:build` is involved. Covers aru make:module (with --tenant and --parent), aru generate and its specification, make:model, make:migration, make:service, model:build and the custom blocks that survive regeneration.
license
MIT

The model and its data

When to use

A new kind of record, a column, a transition of a record's state, a query the generated builder says, a factory or a seeder, or the service method that reads and writes them. Who may run the method is arandu-policy; what calls the service over HTTP is arandu-http.

Before you start

  • Read the example's model, app/Models/Note.go, and its service, app/Services/NoteService.go. app/Models/Comment.go is the same shape generated under a parent.
  • Answer the ownership questions in arandu-ecosystem first: a balance, a role, a tag or rendered Markdown already has an owner and gets no table here.

Contracts and imports

piecewherecontract
entityapp/Models/<Entity>.goa struct embedding model.Model (github.com/arandu-io/hesape/database/model) with db: tags, and var <entity>Table = model.NewTable(model.TableSpec{...}) beside it
queryapp/Models/<Entity>Query.gogenerated by aru model:build: models.<Entities>(db), *<Entity>Query, <Entity>Collection. Every terminal -- Get, First, FindOrFail, SimplePaginate, Count, Exists -- takes an auth.Grant
writethe entitySave(ctx, g) and Delete(ctx, g) on a row that came from a query or from models.<Entities>(db).New()
rule of the entitythe custom block of <Entity>.goa method that changes only this row's fields; no database, network, clock or Grant
scopethe custom block of <Entity>.goa method on *<Entity>Query
relationan init in <Entity>.go<entity>Table.Relate(name, func(*model.Model) model.Relation)
migrationdatabase/migrations/<id>.goregisters itself in init; Up and Down over schema.Blueprint
factory, seederdatabase/factories, database/seedersfactories.<Entities>(db).Count(n).Create(ctx, g); a seeder runs twice safely
serviceapp/Services/<Entity>Service.goNew<Entity>Service(db *database.DB); methods `(ctx, actor auth.Subject, in requests.X

Procedure

  1. Generate the resource. aru make:module note --fields "title:string!,body:text,pinned:bool" --tenant writes the migration, the entity and its query, the factory, the policy, the request, the service, the controller, the four screens and the tests, and prints the wiring. Under a parent, add --parent=notes: the service then loads the parent through the parent's own service and filters by the row it loaded, which is how CommentService reads a note.
  2. Or write a specification when the module needs permissions or a description the flags cannot say: aru schema prints the schema, aru generate invoice.yaml --check reports every problem at once, and aru generate invoice.yaml writes the tree and keeps the specification in database/specs/.
  3. Change a table with a new migration, never by editing one that ran: aru make:migration add_published_at_to_notes --table=notes --fields "published_at:timestamp". A column added to a table that has rows is nullable or has a default, because the previous binary is still inserting during a rollout.
  4. Put the entity's rules in the entity. A transition is a method on the entity that takes what it needs -- the time included -- and refuses a state it does not accept with an error that carries HTTPStatus() int, as Note.Publish does with ErrNoteAlreadyPublished (409).
  5. Order the use case in the service: validate the request, read the row through the Grant, authorize the row (arandu-policy), apply the entity's rule, save with the Grant, and store the events of the write in the same transaction (arandu-async). NoteService.Publish is that order, in full.
  6. Run aru model:build after any change to an entity, and never edit what it writes.

Commands

  • aru make:module <name> --fields "..." --tenant [--parent=<resource>] [--force] [--dry-run]
  • aru generate <spec.yaml> --check, aru generate <spec.yaml>, aru schema
  • aru make:model <Name> --fields "..." [--tenant] [--migration] [--factory] [--seed] [--policy] [--requests] [--controller] [--all]
  • aru make:migration <name> --create=<table> or --table=<table>, with --fields
  • aru make:service <Name>, aru make:factory <Name>, aru make:seeder <Name>, aru make:enum <Name> --values draft,sent
  • aru model:build, and aru model:build --check in a pipeline
  • aru migrate, aru migrate:rollback, aru migrate:status, aru migrate:fresh (development only), aru db:seed

The column types are a closed set -- string text int decimal money bool date timestamp uuid email -- and so are a specification's actions: view create update delete list. money is an integer of cents.

Show full SKILL.md (390 more words)Show less

Example

A read through the generated query and a write through the entity's rule, the two halves of every service method:

go
package example

import (
	"context"
	"time"

	"github.com/arandu-io/hesape/auth"
	"github.com/arandu-io/hesape/database"

	models "<module>/app/Models"
	policies "<module>/app/Policies"
)

// PinnedDrafts reads the tenant's pinned drafts, newest first, one page at a
// time: the generated query, finished by a terminal that takes the Grant.
func PinnedDrafts(ctx context.Context, db *database.DB, g auth.Grant) (models.NoteCollection, error) {
	if err := g.Check(policies.NoteList); err != nil {
		return nil, err
	}
	return models.Notes(db).Where("pinned", true).WhereNull("published_at").
		Latest().Limit(25).Get(ctx, g)
}

// PublishAt applies the entity's transition and saves the row with the Grant
// the policy issued for it.
func PublishAt(ctx context.Context, g auth.Grant, note *models.Note, at time.Time) error {
	if err := note.Publish(at); err != nil {
		return err
	}
	_, err := note.Save(ctx, g)
	return err
}

Do not

  • Query without a Grant, or use the model core -- model.NewTable, a *model.Builder, what Base() returns -- outside app/Models. It answers untyped rows and is a second way to reach the table; aru doctor reports it as model-core-outside-models.
  • Read the clock, the database or the network in a rule of the entity: aru doctor reports it as model-rule-touches-io.
  • Assign a whole struct over a row from a query. A struct literal has no connection, and its Save returns model.ErrUnwired; set the fields.
  • Edit <Entity>Query.go or a factory outside its custom block: the next aru model:build writes over it, and aru doctor reports a stale one as model-query-stale.
  • Open a subpackage under app/Services, or grow a service past what one aggregate needs: service-subpackage and service-file-too-large.

Extending it

Between // arandu:begin custom and // arandu:end custom: table settings inside the TableSpec (Hidden, PerPage, SoftDeletes, Scopes, Events), rules, scopes and relations at the end of the entity's file, named states in a factory, use cases beyond CRUD at the end of a service. --force rewrites everything outside the blocks; the example's files were finished by hand outside them and are changed by hand.

Wiring

aru make:module prints three lines and the claim:

go
// routes/web.go, the field on Deps
Note *controllers.NoteController
// bootstrap/app.go, in the routes.Deps literal
Note: controllers.NewNoteController(services.NewNoteService(db)),

The route is in arandu-http. A migration needs nothing: the blank import of database/migrations in bootstrap/app.go links every one. A seeder goes in the registry of database/seeders/seeders.go.

Acceptance test

  • tests/Feature/<Entity>TenantScope_test.go, which --tenant generates, and the claim of the table in tests/Feature/TenantScope_test.go, written after reading every query of it.
  • A cross-tenant read and write through the HTTP path that answers 404, in the shape of TestANoteOfAnotherTenantIsNotFound.
  • The entity's rules tested alone, with no database and the time passed in, as TestANoteIsPublishedOnceAtTheTimeItIsGiven does.

Limits

The generator knows columns, not meaning: it writes no author, no ownership rule and no transition. A table with no tenant column -- a pivot keyed by two ids -- is invisible to the tenant test, and its isolation rests on the Grant of every query that reads it. The query builder covers what one aggregate needs; a report or a join belongs in a repository (app/Repositories) with its own policy, never in a second query path.

Gates

Run them all, in this order, as AGENTS.md lists them:

sh
export GOWORK=off
aru model:build --check
aru view:build
gofmt -l $(find . -name '*.go' -not -path '*/testdata/*' -not -name '*.kyse.go')
go vet ./...
bash tests/test-layout-guard.sh
go test -race ./...
go build ./...
aru doctor
<!-- arandu:begin custom -->
<!-- arandu:end custom -->

© arandu-io, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/arandu-module of arandu-io/arandu.

Open the folder on GitHubat commit b8a4273

Compare with similar skills

Arandu Module Generator next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Arandu Module Generator compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Arandu Module Generator this skillarandu-io/arandu281—~2.4kAutomated safety check: PassMIT
New Examplego-gui-org/go-gui128—~377Automated safety check: PassMIT
Autospec Worktree Setupariel-frischer/autospec144—~1.5kAutomated safety check: NotesMIT
Init Projectmicrobus-io/fabric172—~664Automated safety check: PassApache-2.0
Nx Generatenomcopter/react-mosaic4.8k7 repos~1.9kAutomated safety check: PassCustom licence
PonytailDavidObando/gsharp5657 repos~1.7kAutomated safety check: PassMIT

Similar skills

  • New Example

    go-gui-org/go-gui

    Scaffold a new go-gui example app with standard boilerplate. An agent skill from go-gui-org/go-gui.

    128 GitHub stars~377 tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Autospec Worktree Setup

    ariel-frischer/autospec

    Generate project-specific worktree setup script based on project analysis.

    144 GitHub stars~1.5k tokensUpdated 12 days ago
    DevelopmentAuto-check: notes
  • Init Project

    microbus-io/fabric

    TRIGGER when user asks to initialize, set up, or bootstrap a Microbus project.

    172 GitHub stars~664 tokensUpdated 12 days ago
    DevelopmentAuto-check passed
  • Nx Generate

    nomcopter/react-mosaic

    Generate code using nx generators. An agent skill from nomcopter/react-mosaic.

    4.8k GitHub starsUsed in 7 repos~1.9k tokens
    DevelopmentAuto-check passed
  • Ponytail

    DavidObando/gsharp

    Forces the laziest solution that actually works, simplest, shortest, most minimal.

    565 GitHub starsUsed in 7 repos~1.7k tokens
    DevelopmentAuto-check passed
  • Official

    Walks through adding a new Redis or Redis module command to the go-redis client, from fetching the spec and docs to the type, interface wiring, parsing and tests.

    22k GitHub stars~1.4k tokensUpdated yesterday
    DevelopmentAuto-check passed

More from arandu-io/arandu

All 12 skills in this repo
  • Arandu API

    arandu-io/arandu

    Answering a program rather than a person in an Arandu (Go) application -- a JSON Resource, a JSON answer from the same routes the pages use, problem+json errors, bearer-token authentication and…

    281 GitHub stars~2.5k tokensUpdated today
    Auto-check passed
  • Arandu Async

    arandu-io/arandu

    Work that does not happen inside the request in an Arandu (Go) application -- background jobs and the worker, scheduled tasks, domain events through the outbox, listeners, notifications, mail and…

    281 GitHub stars~2.7k tokensUpdated today
    Auto-check passed
  • Decides whether a feature belongs in the application or in one of five shared Arandu modules before adding permissions, wallets, tags, Markdown rendering or API docs.

    281 GitHub stars~1.8k tokensUpdated today
    Auto-check passed
  • Arandu Feature

    arandu-io/arandu

    Start here for any change to an Arandu (Go) application that adds or changes behaviour -- "add invoices", "let users publish a post", "send a weekly report", "call the payment provider", "expose…

    281 GitHub stars~2.5k tokensUpdated today
    Auto-check passed
  • Arandu HTTP

    arandu-io/arandu

    Controllers, requests and routes of an Arandu (Go) application -- the seven resource actions, a resource nested under another, a singleton, a single-action (invokable) controller, a named action…

    281 GitHub stars~2.5k tokensUpdated today
    Auto-check passed
  • Arandu Integrations

    arandu-io/arandu

    Reaching other systems from an Arandu (Go) application, and letting them reach it -- the client of an external API with its interface and fake, webhooks sent and received, and tools, resources and…

    281 GitHub stars~3.1k tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about Arandu Module Generator

What does Arandu Module Generator do?

Adds a new entity, resource or CRUD module to an Arandu Go application by writing a YAML specification instead of hand-writing the Go code. In Arandu, a model never writes the entity, policy, service or migration by hand; it writes one YAML specification, and a deterministic generator produces the Go for the entity and its table, a typed query helper, the policy, service, request, controller, migration, screens and tests, printing the route lines and wiring for a person to paste in rather than writing them itself. The stated reasoning is that a new framework can't be in any model's training data, so asking a model for Go directly tends to borrow patterns from frameworks Arandu doesn't use.

When should I use Arandu Module Generator?

Arandu Module Generator fits situations like: adding a new database-backed resource to an Arandu application; scaffolding CRUD for a new domain object with access rules; checking a module specification before generating its code.

How do I install Arandu Module Generator in Claude Code?

Run `npx skills add arandu-io/arandu --skill arandu-module -a claude-code`. Or copy the skill folder (.agents/skills/arandu-module in arandu-io/arandu) into .claude/skills/arandu-module in your project. Claude Code loads it when a task matches its description.

How do I install Arandu Module Generator in Codex?

Run `npx skills add arandu-io/arandu --skill arandu-module -a codex`. Or copy the skill folder (.agents/skills/arandu-module in arandu-io/arandu) into .agents/skills/arandu-module in your project. Codex loads it when a task matches its description.

Can I use Arandu Module Generator in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add arandu-io/arandu --skill arandu-module -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/arandu-module, .gemini/skills/arandu-module, .github/skills/arandu-module and .opencode/skills/arandu-module in your project.

What does Arandu Module Generator need to run?

Going by SKILL.md and its folder, Arandu Module Generator needs the command-line tools its instructions call (go and bash). Our summary lists: The `aru` CLI.

Does Arandu Module Generator access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Arandu Module Generator safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Arandu Module Generator use?

Arandu Module Generator is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Arandu Module Generator use?

About 2.4k tokens (SKILL.md is roughly 9.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Arandu Module Generator?

Skills that share tags, products or a category with Arandu Module Generator: New Example (go-gui-org/go-gui, 128 stars), Autospec Worktree Setup (ariel-frischer/autospec, 144 stars), Init Project (microbus-io/fabric, 172 stars) and Nx Generate (nomcopter/react-mosaic, 4.8k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Arandu Module Generator?

arandu-io (a GitHub organization) maintains it in arandu-io/arandu, which has 281 GitHub stars. The repository holds 12 skills in this directory. The repository was last updated on October 10, 2026.

Source: arandu-io/arandu on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.