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.
npx agentmods add commands/ganbin/4d-development-skill/create-entity-selectiongit clone --depth 1 https://github.com/Ganbin/4d-development-skillWrote 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.
[](https://agentmods.dev/commands/ganbin/4d-development-skill/create-entity-selection)<a href="https://agentmods.dev/commands/ganbin/4d-development-skill/create-entity-selection"><img src="https://agentmods.dev/badge/commands/ganbin/4d-development-skill/create-entity-selection.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.00513 |
| Opus 5 | $0.00000 | $0.00257 |
| Sonnet 5 | $0.00000 | $0.00103 |
| Haiku 4.5 | $0.00000 | $0.00051 |
Grade A, and why
create-entity-selection 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 yesterday.
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.
How it starts
The opening of the file, as written. The whole thing — 53 lines — stays where its author put it; the contents beside it link to each section on GitHub.
| Parameter | Type | Description | |
|---|---|---|---|
| dsTable | Table | → | Table in the 4D database whose current selection will be used to build the entity selection |
| settings | Object | → | Build option: context |
| Function result | 4D.EntitySelection | ← | Entity selection matching the dataclass related to the given table |
Description
The Create entity selection command builds and returns a new, alterable entity selection related to the dataclass matching the given dsTable, according to the current selection of this table.
If the current selection is sorted, an ordered entity selection is created (the order of the current selection is kept). If the current selection is unsorted, an unordered entity selection is created.
If the dsTable is not exposed in ds, an error is returned. This command cannot be used with a Remote datastore.
In the optional settings parameter, you can pass an object containing the following property:
| Property | Type | Description |
|---|---|---|
| context | Text | Label for the optimization context applied to the entity selection. |
Example
var $employees : cs.EmployeeSelection
ALL RECORDS([Employee])
$employees:=Create entity selection([Employee])
// The $employees entity selection now contains a set of reference
// on all entities related to the Employee dataclass
See also
USE ENTITY SELECTIONdataClass.newSelection()
Properties
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.
- yesterday First seen · 53 lines · 0 tokens per session scan A 7bf1a9766b6c
create-entity-selection is a command published in the GitHub repository Ganbin/4d-development-skill (9 stars, last pushed 6mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 513 tokens. 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-09-03.
Other commands, from other repositories
doctor
Run a system health check to diagnose common issues.
completions
Generate shell completion scripts for bash, zsh, and fish.
watch
Watch installed skills for file changes and auto-sync to agent directories.
db-migrate
Generate a database migration file for schema changes.
upgrade
Upgrade rolecraft itself to the latest version.
querying
Query documents from a search index using type-safe filters with support for pagination, sorting, field selection, scoring, and highlighting. Count matching documents efficiently without returning results.