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/ambient-code/platform/trex.kind.add-fieldgit clone --depth 1 https://github.com/ambient-code/platformWhat 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.00844 |
| Opus 5 | $0.00000 | $0.00422 |
| Sonnet 5 | $0.00000 | $0.00169 |
| Haiku 4.5 | $0.00000 | $0.00084 |
Grade A, and why
trex.kind.add-field 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 2d 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.
Copies of this mod
1 near-identical copy found in the catalogue:
- trex.kind.add-field — 100% identical, 0 lines differ
How it starts
The opening of the file, as written. The whole thing — 106 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Add a Field to an Existing Kind
Add a new field to an existing Kind, updating all layers consistently.
Instructions
Ask the user for:
- Kind name (PascalCase): e.g., "Dinosaur"
- Field name (snake_case): e.g., "habitat_type"
- Field type:
string,int,int64,bool,float64,time.Time - Required or nullable: required fields use base types (
string), nullable use pointers (*string)
Derive the Go field name in PascalCase (e.g., habitat_type -> HabitatType).
Use the TodoWrite tool to track progress.
Step 1: Update API Model (pkg/api/{kind}.go)
Add the field to the {Kind} struct:
HabitatType string `json:"habitat_type"`
Add the field to {Kind}PatchRequest as a pointer:
HabitatType *string `json:"habitat_type,omitempty"`
Step 2: Create a New Migration File
IMPORTANT: Create a brand new migration file at pkg/db/migrations/{YYYYMMDDHHMM}_add_{field}_to_{kindLowerPlural}.go. Do NOT modify the Kind's existing migration.
package migrations
import (
"gorm.io/gorm"
"github.com/go-gormigrate/gormigrate/v2"
)
func add{FieldPascalCase}To{KindPlural}() *gormigrate.Migration {
type {Kind} struct {
Model
{FieldPascalCase} {GoType}
}
return &gormigrate.Migration{
ID: "{YYYYMMDDHHMM}",
Migrate: func(tx *gorm.DB) error {
return tx.AutoMigrate(&{Kind}{})
},
Rollback: func(tx *gorm.DB) error {
return tx.Migrator().DropColumn(&{Kind}{}, "{field_snake_case}")
},
}
}
Register it in pkg/db/migrations/migration_structs.go by appending to MigrationList.
Step 3: Update Presenter (pkg/api/presenters/{kind}.go)
Add the field to both Convert{Kind}() and Present{Kind}() functions, handling the type conversion between internal and OpenAPI models.
Step 4: Update Handler (pkg/handlers/{kind}.go)
In the Patch method, add the nil-check for the new field:
if patch.{FieldPascalCase} != nil {
found.{FieldPascalCase} = patch.{FieldPascalCase}
}
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.
- 2d ago First seen · 106 lines · 0 tokens per session scan A 999836adf643
trex.kind.add-field is a command published in the GitHub repository ambient-code/platform (129 stars, last pushed 3d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 844 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-08-30.
Other commands, from other repositories
MIGRATE_DESIGN
Design doc for the migration tool PR. Author: Sol ([email protected]). Co-authored-by: wakesync.
toh-help
Display all Toh Framework commands and quick usage guide.
go-review
Go code review for idiomatic patterns.
profile
Profile Go code, identify bottlenecks, optimize, and verify improvements.
learn-story-flow
Learn story-flow concepts with interactive guidance for junior developers.
doctor
Validate, install, and update Hydraia's external dependencies (codegraph, markitdown, E2E browser binaries).