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 skills add RelationalAI/rai-agent-skills --skill rai-pyrelgit clone --depth 1 https://github.com/RelationalAI/rai-agent-skillsWrote 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/skills/relationalai/rai-agent-skills/rai-pyrel)<a href="https://agentmods.dev/skills/relationalai/rai-agent-skills/rai-pyrel"><img src="https://agentmods.dev/badge/skills/relationalai/rai-agent-skills/rai-pyrel/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/relationalai/rai-agent-skills/rai-pyrel"><img src="https://agentmods.dev/badge/skills/relationalai/rai-agent-skills/rai-pyrel.svg" alt="Reviewed on agentmods" width="80" 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.1 | $0.00171 | $0.09272 |
| Opus 5 | $0.00086 | $0.04636 |
| Sonnet 5 | $0.00034 | $0.01854 |
| Haiku 4.5 | $0.00017 | $0.00927 |
Grade A, and why
rai-pyrel 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 11d 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.
How it starts
The opening of the file, as written. The whole thing — 443 lines — stays where its author put it; the contents beside it link to each section on GitHub.
PyRel
Summary
What: The PyRel v1 language surface — types, concepts, properties, relationships, data loading, expressions, derived-property business rules, and query construction.
When to use:
- Writing or reviewing any PyRel model code; looking up imports, types, or declaration patterns
- Translating a business rule to PyRel ("flag high-value customers", tiers, segments, scores) — see Rules Authoring
- Querying: select, filter, join, aggregate, rank, export — see Querying
- Debugging syntax errors,
FDError,Unground Variables, or empty/unexpected results
When NOT to use: reasoner-specific tasks route to their reasoner skill — it owns the patterns and pitfalls:
- Ontology design decisions (concept vs property, identity, data mapping, enrichment) — see
rai-ontology - Optimization formulation (decision variables, constraints, objectives) — see
rai-prescriptive-problem - Graph analysis (centrality, community, reachability, paths) — see
rai-graph-analysis - GNN modeling and training — see
rai-predictive-modeling,rai-predictive-training - Reasoner routing and question discovery — see
rai-discovery; connection/config — seerai-setup
Overview: Modeling declares the surface (concepts, properties, relationships); Definitions bake business logic into the model; Rules Authoring is the workflow for deriving new properties from natural-language rules; Querying reads it all back. Most logic belongs in definitions — queries should be simple reads over what definitions computed.
Quick Reference
from relationalai.semantics import (
Model, Float, Integer, String, Date, DateTime, distinct,
)
from relationalai.semantics import Number # always Number.size(p,s), never bare
from relationalai.semantics.std import aggregates as aggs
from relationalai.semantics.std.aggregates import rank, desc, asc, top, bottom
from relationalai.semantics.std import strings, math, numbers
model = Model("my_model")
Product = model.Concept("Product", identify_by={"id": Integer})
Product.cost = model.Property(f"{Product} has {Float:cost}") # many-to-one
Product.supplier = model.Property(f"{Product} supplied by {Supplier:supplier}") # functional FK
model.define(Product.new(model.data(df).to_schema())) # load data
result = model.where(Product.cost > 10).select(Product.id, Product.cost).to_df()
print(Product.cost > 10) # readable repr — verify structure before querying
Product.cost.inspect() # executes, prints DataFrame
What ships with it
33 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- examples/aggregation_queries.py 5.3 KB runs code
- examples/alerting_rule.py 3.0 KB runs code
- examples/classification_rule.py 4.7 KB runs code
- examples/cross_entity_alerting.py 2.5 KB runs code
- examples/datetime_argmax_segmentation.py 3.5 KB runs code
- examples/derivation_rule.py 2.2 KB runs code
- examples/graph_derived_subtypes.py 6.3 KB runs code
- examples/inspect_fields_unpack.py 1.7 KB runs code
- examples/inspect_schema_summary.py 2.3 KB runs code
- examples/inspect_to_concept_helper.py 1.8 KB runs code
- examples/multiarity_property_refs.py 3.0 KB runs code
- examples/pprint_debugging.py 2.5 KB runs code
- examples/reconciliation_rule.py 2.9 KB runs code
- examples/standalone_property_union_objective.py 3.5 KB runs code
- examples/validation_rule.py 2.8 KB runs code
- references/aggregation-advanced.md 5.5 KB
- references/common-pitfalls.md 13 KB
- references/complex-multi-entity-rules.md 2.6 KB
- references/complex-rule-example.md 3.4 KB
- references/data-loading.md 13 KB
- references/distinct-patterns.md 1.7 KB
- references/expression-rules.md 24 KB
- references/filtering-advanced.md 2.0 KB
- references/imports.md 2.6 KB
- references/inspect-module.md 8.6 KB
- references/joins-and-export.md 12 KB
- references/model-introspection.md 5.4 KB
- references/pyrel-rule-patterns.md 13 KB
- references/pyrel-subtype-rules.md 8.9 KB
- references/rule-chaining-patterns.md 3.5 KB
- references/rule-design.md 4.6 KB
- references/rule-validation-and-testing.md 8.7 KB
- references/standard-library.md 5.8 KB
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.
- 11d ago First seen · 443 lines · 171 tokens per session scan A 19d06999f299
rai-pyrel is a skill published in the GitHub repository RelationalAI/rai-agent-skills (4 stars, last pushed yesterday), licensed Apache-2.0. It adds 171 tokens to every session and 9,272 once invoked, about $0.0009 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-31.
Other skills, from other repositories
no-bare-casts
Writing as in TypeScript or TSX production code, modifying a file that contains a bare as cast, silencing a type error with a cast, encountering as unknown as, or reviewing a cast site.
azure-resource-manager-postgresql-dotnet
Azure PostgreSQL Flexible Server SDK for .NET. Database management for PostgreSQL Flexible Server deployments. Use for creating servers, databases, firewall rules, configurations, backups, and high availability. Triggers: "PostgreSQL", "PostgreSqlFlexibleServer", "PostgreSQL Flexible Server", "Azure Database for…
azure-cosmos-java
Azure Cosmos DB SDK for Java. NoSQL database operations with global distribution, multi-model support, and reactive patterns. Triggers: "CosmosClient java", "CosmosAsyncClient", "cosmos database java", "cosmosdb java", "document database java".
azure-data-tables-java
Build table storage applications with Azure Tables SDK for Java. Use when working with Azure Table Storage or Cosmos DB Table API for NoSQL key-value data, schemaless storage, or structured data at scale.
efcore-patterns
Entity Framework Core best practices including NoTracking by default, query splitting for navigation collections, migration management, dedicated migration services, and common pitfalls to avoid.
kotlin-exposed-patterns
JetBrains Exposed ORM patterns including DSL queries, DAO pattern, transactions, HikariCP connection pooling, Flyway migrations, and repository pattern.