# Send Ruby On Rails Gateway to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "ruby-on-rails-gateway",
    "name": "Ruby On Rails Gateway",
    "source": "tencent",
    "type": "skill",
    "category": "AI 智能",
    "sourceUrl": "https://clawhub.ai/jessewaites/ruby-on-rails-gateway",
    "canonicalUrl": "https://clawhub.ai/jessewaites/ruby-on-rails-gateway",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/ruby-on-rails-gateway",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=ruby-on-rails-gateway",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "skill.md",
      "references/usage.md"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "ruby-on-rails-gateway",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-03T11:48:29.657Z",
      "expiresAt": "2026-05-10T11:48:29.657Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=ruby-on-rails-gateway",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=ruby-on-rails-gateway",
        "contentDisposition": "attachment; filename=\"ruby-on-rails-gateway-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "ruby-on-rails-gateway"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/ruby-on-rails-gateway"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/ruby-on-rails-gateway",
    "downloadUrl": "https://openagent3.xyz/downloads/ruby-on-rails-gateway",
    "agentUrl": "https://openagent3.xyz/skills/ruby-on-rails-gateway/agent",
    "manifestUrl": "https://openagent3.xyz/skills/ruby-on-rails-gateway/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/ruby-on-rails-gateway/agent.md"
  }
}
```
## Documentation

### Rails Agent Gateway

This skill works in tandem with the
agent_gateway Ruby gem,
a mountable Rails engine that must be installed and configured on the
Rails side (gem "agent_gateway" + initializer). This skill handles
the OpenClaw-side setup and usage for pulling data from that endpoint.

### Quick Workflow

Confirm required env vars are available.
Validate endpoint connectivity with a non-destructive briefing fetch.
Pull briefing data for a selected period/resources.
Summarize result counts, aggregations, and latest records.
If requested, prepare commands suitable for cron/automation.

### Required Environment

Require these variables before any live fetch:

AGENT_GATEWAY_TOKEN (bearer token — set in the Rails app initializer as c.auth_token)
AGENT_GATEWAY_SECRET (path secret — set as c.path_secret)

The OpenClaw helper script may also read:

RAILS_GATEWAY_URL (full /briefing URL, e.g. https://myapp.com/agent-gateway/<secret>/briefing)
RAILS_GATEWAY_TOKEN (maps to bearer token)

If env vars are missing, stop and show the exact export commands needed.

### Authentication

The gem uses two-layer auth:

Path secret — embedded in the URL (/agent-gateway/<secret>/briefing). Wrong value returns 404 (endpoint appears nonexistent).
Bearer token — sent via Authorization header. Wrong/missing value returns 401.

Both are compared using timing-safe secure_compare.

### Direct curl

curl -H "Authorization: Bearer $AGENT_GATEWAY_TOKEN" \\
  "https://myapp.com/agent-gateway/$AGENT_GATEWAY_SECRET/briefing?period=7d&resources=users,orders"

### Helper script

Prefer the local helper script when present:

/home/node/.openclaw/workspace/scripts/rails-gateway-briefing --period 7d

With explicit env vars:

RAILS_GATEWAY_URL='https://myapp.com/agent-gateway/<secret>/briefing' \\
RAILS_GATEWAY_TOKEN='***' \\
/home/node/.openclaw/workspace/scripts/rails-gateway-briefing --period 7d --resources users,orders

### Query Parameters

ParamDescriptionExampleperiodTime window: 1d, 7d, 30d, 90d, 1y, all?period=30dresourcesComma-separated resource keys?resources=users,orderslatestOverride latest count for all resources?latest=10

### Resource-Scoped Pulls

Resources are configured per-app via the gem's DSL. Common examples:

--resources users
--resources orders

Use --latest N to cap detailed rows while keeping counts.

The gem DSL also supports aggregations (count, sum, avg) on numeric
columns — these appear in the response alongside count and latest.

### Safety Rules

Never print or echo live tokens in user-visible output.
Redact secrets in pasted commands.
Do not perform external write actions unless explicitly asked.
Keep pulls read-only (briefing endpoint usage only).

### Troubleshooting

If calls fail:

Confirm helper script exists and is executable.
Confirm endpoint URL includes /agent-gateway/<secret>/briefing.
Confirm bearer token is current (AGENT_GATEWAY_TOKEN).
Check two-layer auth: 404 = bad path secret, 401 = bad bearer token.
Retry with minimal scope (--resources users --period 7d --latest 1).
Report exact error class (auth/network/format), then propose a fix.

For reusable command snippets and output interpretation, read
references/usage.md.
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: jessewaites
- Version: 1.0.0
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-05-03T11:48:29.657Z
- Expires at: 2026-05-10T11:48:29.657Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/ruby-on-rails-gateway)
- [Send to Agent page](https://openagent3.xyz/skills/ruby-on-rails-gateway/agent)
- [JSON manifest](https://openagent3.xyz/skills/ruby-on-rails-gateway/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/ruby-on-rails-gateway/agent.md)
- [Download page](https://openagent3.xyz/downloads/ruby-on-rails-gateway)