> This page location: Docs > Reference > Agent Skills > use-semantius Skill
> Full index for agents: https://www.semantius.com/llms.txt

# use-semantius Skill

> The use-semantius agent skill: a drop-in instruction set that teaches an agent to drive the Semantius CLI correctly, and to build, review and change modules.

- **URL**: https://www.semantius.com/docs/agent-skills/use-semantius

---

`use-semantius` is an **agent skill** that ships alongside the [Semantius CLI](https://www.semantius.com/docs/cli.md). Where the CLI gives an agent the ability to call Semantius, this skill teaches the agent **how to use it well**: which tool to pick and which mistakes to avoid.

It covers the whole of the work on a Semantius instance: building a module from a description, reviewing or changing an existing one, setting up roles and permissions, working with records, and answering analytical questions. Install it whenever you want a coding agent to operate Semantius autonomously from a shell.

## Installation

`use-semantius` is installed together with the Semantius CLI and the other skills. Follow [Agent Skills Installation](https://www.semantius.com/docs/agent-skills/installation.md).

## When the Skill Triggers

The skill description tells the host agent to engage it whenever a task involves the Semantius platform: building something new that needs its own records, however it is phrased (a module, an app, a tracker, “a way to see and manage X”); reviewing or auditing an existing module; creating, reading, updating or deleting entities, fields, modules, permissions, roles, users or business records; modeling kinds of one thing, such as emails and calls as kinds of activities; setting up roles and permissions; importing data; running analytical queries; linking to a record, list or module in the app; sending a transactional email; or writing shell or Bun scripts that chain `semantius` calls together.

In practice, any prompt that mentions Semantius data or schema work is enough to bring it in.

## Building and Reviewing Modules

Asked to build something that needs its own records, the agent models it on the leading products in the domain, and:

1. compares each new entity with the entities already on the instance, and asks before creating one that may hold the same thing;
2. shows you the list of entities and waits for your confirmation before the first write;
3. creates the module with its read, manage and admin permissions and its viewer, manager and admin roles, then the entities, fields and relationships, following the [Conventions](https://www.semantius.com/docs/conventions.md);
4. adds the restricted steps and roles the work needs, such as an approval, as described in [Workflow States, Gates and Access](https://www.semantius.com/docs/workflow-and-access.md);
5. asks whether you want sample data, and adds it only when you say yes;
6. ends with a link to the module and a summary of each role, what it can do and see, and each restricted step.

Asked to review an existing module, it reads the whole module, checks it against the same conventions, suggests what the leading products have that the module lacks, and reports. Nothing is written until you pick what to apply.

## The Two Modes

The CLI works in two modes.

### `crud` mode: schema and records

The typed `create_*`, `read_*`, `update_*`, `delete_*` tools manage the semantic data model itself. Alongside them, `postgrestRequest` operates on the actual rows in your business tables:

```bash
# Read records from your 'products' entity
semantius call crud postgrestRequest '{"method":"GET","path":"/products?status=eq.active&order=name.asc"}'

# Insert an order record
semantius call crud postgrestRequest '{"method":"POST","path":"/orders","body":{"customer_id":"123","total":99.99}}'

# Update matching products
semantius call crud postgrestRequest '{"method":"PATCH","path":"/products?category=eq.electronics","body":{"on_sale":true}}'
```

### `cube` mode: analytics

`cube` mode speaks the CubeJS query DSL: measures, dimensions, time dimensions, filters, joins. The skill enforces one rule above all others: **always call `discover` first**. The `discover` response includes the cube schema, the complete query language reference, and the date filtering guide, so the agent never has to guess syntax.

## Golden Rules the Skill Enforces

The skill bakes in a small set of rules that prevent the most common mistakes:

1. **Read before writing.** Before any `create_*` call, run the matching `read_*` first. If a result already exists, reuse the ID instead of creating a duplicate.
2. **Schema first, in order.** Always create in the sequence Module, then Permissions, then Entity, then Fields. Never skip steps.
3. **Never recreate auto-generated fields.** `id`, `label`, `created_at`, `updated_at` and the entity’s `label_column` field are created automatically by `create_entity`.
4. **`reference_table` mandates relational format.** Any field that points at another table must use `format: "reference"` (independent lifecycle) or `format: "parent"` (ownership / cascade delete).
5. **Warn before destructive changes.** Renaming `table_name` or `field_name`, deleting entities or fields: ask the user first.
6. **Link to the result.** After a schema change or a record operation, hand back a link to the app in the form `{ui_baseurl}/{module_slug}/{table_name}`, with `/{id}` added for one record, so the user can check it. `ui_baseurl` is the instance’s own address, read from the signed-in user’s profile, and `module_slug` is the module’s lowercase slug, never its name.

## What You Get in Practice

With `use-semantius` installed, you can hand a coding agent prompts like:

> “Build a module to track our software licenses and when they renew.”

> “Orders should move through draft, confirmed, shipped and canceled, starting as draft, and only shift leads may cancel one.”

> “Review the Service Desk module and tell me what it is missing.”

> “List the top ten customers by total order value last quarter.”

> “Import this CSV into the products table.”

The agent follows the read-before-write and schema-first rules, calls the right typed tool or `postgrestRequest` or `cube` query, and reports back with the UI link to verify.

## Next Steps

- **[CLI Overview](https://www.semantius.com/docs/cli.md)**: why the CLI exists and where it fits.
- **[The semantius command](https://www.semantius.com/docs/cli/command.md)**: the underlying surface this skill drives.
- **[Agent Skills Overview](https://www.semantius.com/docs/agent-skills.md)**: the other skills, `semantius-importer` for CSV files and `semantius-transfer` for moving modules between hosts.

---

## Related

- [Previous: Installation](https://www.semantius.com/docs/agent-skills/installation.md)
- [Next: CLI](https://www.semantius.com/docs/cli.md)
- [Full index for agents](https://www.semantius.com/llms.txt)
