Agent skill

Gram Temporal

by speakeasy-api in speakeasy-api/gram

A skill your agent uses when adding or changing background work in gram — a Temporal workflow, activity, schedule, signal, or ContinueAsNew loop; anything reacting to chat messages, tool calls, MCP…

AGPL-3.0Auto-check passedDevOps & Cloud

Install Gram Temporal

skills CLI
$ npx skills add speakeasy-api/gram --skill gram-temporal -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install speakeasy-api/gram gram-temporal --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/speakeasy-api/gram.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/gram-temporal .claude/skills/gram-temporal && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
gram-temporal
GitHub stars
272
Token cost
~2.6k tokens
SKILL.md length
956 words
Files
1
Skills in repo
39
Repo updated
First seen
Licence
AGPL-3.0

At a glance

A skill your agent uses when adding or changing background work in gram — a Temporal workflow, activity, schedule, signal, or ContinueAsNew loop; anything reacting to chat messages, tool calls, MCP…

  • Changing background work in gram — a Temporal workflow
  • SKILL.md covers Quick reference, Cost line (required in every… and Patterns
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • ContinueAsNew loop

What it does

Gram Temporal is an agent skill from speakeasy-api/gram. Use when adding or changing background work in gram — a Temporal workflow, activity, schedule, signal, or ContinueAsNew loop; anything reacting to chat messages, tool calls, MCP requests, telemetry rows, or DB writes; anything that fans out per project/org/user, polls, sweeps, or runs on a timer; when estimating or reviewing Temporal Cloud cost. Triggers: "workflow", "activity", "schedule", "cron", "poll", "sweep", "coordinator", "SignalWithStart", "ThrottledSignaler", "MessageObserver", "per message", "per tool…

Its SKILL.md is about 2.6k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in DevOps & Cloud, covering Cloud cost optimization, Scheduled and recurring tasks and MCP servers. It works with Model Context Protocol and Temporal. The repository describes itself as: Securely scale AI usage across your organization. A single stack to Connect, Secure, Observe and Distribute agents, MCPs, and Skills within your company. The licence is AGPL-3.0.

When your agent uses it

  • Changing background work in gram — a Temporal workflow
  • ContinueAsNew loop
  • Anything reacting to chat messages
  • Anything that fans out per project/org/user

Example prompts

  • “workflow”
  • “activity”
  • “schedule”
  • “/gram-temporal”

What it can do on your machine

Read from SKILL.md and the folder at commit 4d32da1. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are go).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Gram Temporal loads about 2.6k tokens when it runs. Until then it costs about 143 tokens; SKILL.md has 956 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~143
When it runs · the whole SKILL.md, loaded when a task matches
~2.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from speakeasy-api/gram at commit 4d32da1, republished under its AGPL-3.0 licence (© speakeasy-api). 956 words, ~2,564 tokens.

Download SKILL.mdSave it as .claude/skills/gram-temporal/SKILL.md (or your agent's skills folder).
name
gram-temporal
description
Use when adding or changing background work in gram — a Temporal workflow, activity, schedule, signal, or ContinueAsNew loop; anything reacting to chat messages, tool calls, MCP requests, telemetry rows, or DB writes; anything that fans out per project/org/user, polls, sweeps, or runs on a timer; when estimating or reviewing Temporal Cloud cost. Triggers: "workflow", "activity", "schedule", "cron", "poll", "sweep", "coordinator", "SignalWithStart", "ThrottledSignaler", "MessageObserver", "per message", "per tool call", "hot path", "registerSchedules".
metadata.relevant_files
server/internal/background/**/*.go, server/internal/outbox/*.go, server/internal/chat/message_store.go, server/internal/gateway/*.go…

Temporal in gram: what it costs and when not to use it

Temporal Cloud bills per action: every workflow start (ContinueAsNew and child starts included), every activity attempt (retries count), every timer, every signal. Workflow tasks are free. A no-op activity costs the same as five minutes of work. List price is $25–50 per million actions, so cost is set by how many things you schedule, not how much work they do.

Core rule: Temporal is for durable, multi-step orchestration started once per user or system action. Anything that scales with messages, tool calls, MCP requests, rows, or entities goes through the transactional outbox or a Pub/Sub publisher and a gram streams handler. Anything on a timer costs ticks × activities × namespaces and must state that number in its PR. server/internal/scanners/publish.go (per-tool-call scanning over Pub/Sub) is the shape to copy.

Quick reference

Work shapeDo thisNot this
React to a DB write (chat message, telemetry, config change)outbox.Publish in the same tx → topic → streams.BatchHandlerFunc in server/cmd/gram/streams.gochat.MessageObserver → ThrottledSignaler → SignalWithStart per write
Per tool call / per MCP request (scan, score, enrich)A check with no network or LLM call runs inline in the handler with nothing async at all. Otherwise publish from the request path as scanners/publish.go does and handle in a batch handlerany Temporal start, signal, or activity in the request path
Heavy per-event analysis (LLM judge, risk scan)Pub/Sub batch handler; if a step must be durable, one workflow per batch per project (≥ 5 min or ≥ 100 events)one workflow run per event or per 30 s window
Fan-out over every project / org / userOne SQL activity returning only rows that changed (updated_at > processed_at, version column), then act on those; one activity per changed row only while that count stays in the tens, otherwise loop inside one activityExecuteActivity inside for _, p := range projects on a timer
Periodic sweepScheduleIntervalSpec{Every: time.Hour} as a safety net behind a write-path event; ≥ 5 min only when the sweep is the sole mechanism; ≤ 3 activities per tickschedules under 5 minutes; a faster schedule to meet a latency target
Drain / relay loopWait on a signal, or workflow.Sleep(≥ 60s) when idle; exit after N iterations and let the watchdog schedule restart itworkflow.Sleep(5*time.Second) forever
Multi-step durable job per user action (publish to GitHub, register a custom domain, lifecycle emails)Temporal workflow, ExecuteWorkflow once—

Cost line (required in every PR touching server/internal/background/)

Temporal actions/month ≈ starts + activities (+retries) + timers + signals + child starts,
per namespace (prod and dev; PR previews run in the dev namespace and each registers its own copy of every queue-scoped schedule).
Scales with: fixed | projects | orgs | messages | tool calls.

Temporal actions/month: 0 (outbox → batch handler, no Temporal) is a valid and common answer. Rules of thumb, per namespace:

  • A 10 s schedule is 260k starts/month before it does any work. 1 min: 43k. 1 h: 720.
  • One activity per project per 10 s tick at 100 projects: ~26M actions/month.
  • A loop with one activity and a 5 s timer: ~1M actions/month, forever, even idle.
  • A per-project coordinator signalled on every chat write through a 30 s ThrottledSignaler, measured in prod: 1.0 action per message (median 4 messages per run, 14% of runs fetch nothing). Do not estimate 0.05 per message "amortised over the batch": the throttle fires on the leading edge and is per pod, so batches stay small.

Anything over 1M actions/month needs a sentence saying why.

Patterns

Default: outbox event → Pub/Sub batch handler
go
// Inside the service transaction that writes the row. The outbox row commits
// with the write, so this is transactional: no dual-write problem.
// Proto is any message declaring a (gcp.pubsub.v1.topic) option; copy the
// analysis/analyzer pair in infra/proto/gram/risk/v1/custom_rules_analysis.proto
// and custom_rules_analyzer.proto for a new event.
if _, err := outbox.Publish(ctx, tx, orgID, outbox.Message{Proto: event}); err != nil {
    return fmt.Errorf("enqueue event: %w", err)
}

Register the consumer with mustReceiveBatchWithResult(...) in server/cmd/gram/streams.go with gcp.BatchReceiveSettings{MaxMessages: 1000, MaxBytes: 10 * constants.MiB, MaxLatency: time.Second}. REQUIRED SUB-SKILL: gram-pubsub. Do the work inline in the handler when it is under a second. Dashboard/analytics results go to ClickHouse through a *CHWriter (server/internal/metering/ch_writer.go); authoritative state stays in Postgres. If a step must be durable, start one workflow per batch, never per event.

chat.MessageObserver (server/internal/chat/message_store.go) fires after commit with only the project id. Do not attach new work to it; publish from inside the write transaction.

Show full SKILL.md (339 more words)Show less
If a per-project coordinator is unavoidable, debounce inside the workflow

A per-project coordinator is unavoidable only when the reacting work cannot be expressed as one SQL query plus one activity across every affected tenant (it needs per-project workflow state or per-project retries). A digest or notification that one query can assemble for all tenants is a global sweep: a flat ≥ 5 min schedule with one query-and-send activity, no per-project signalling.

ThrottledSignaler lives in every API and worker pod, so the signal rate is replicas × (leading + trailing per window). Two changes get from the measured 1.0 action per event to ≤ 0.1. First, dedupe at the write site: signal only on the transition from "nothing pending" to "something pending" (a WHERE processed_at IS NULL guard or partial unique index), not on every event. Second, put the delay in the workflow: on the first signal workflow.Sleep(5 * time.Minute), then fetch everything pending in one activity, wrapped with background.Debounce (debounced.go) so signals arriving mid-run coalesce into one follow-up run. The SignalWithStart call lives in a streams batch handler or a scheduled sweep, never in the request path.

Sweeps

One activity returns only the rows that changed (SQL), fan out over that. Cadence ≥ 1 hour when the sweep is a safety net behind a write-path event, ≥ 5 minutes when it is the sole mechanism. A minutes-scale latency target on per-entity events is met with the debounced signal pattern above, never with a shorter interval.

Schedules
  • Scope the ID by task queue: fmt.Sprintf("v1:%s:%s", name, temporalEnv.Queue()). PR previews share the dev namespace; an unscoped ID gets re-pointed by each preview's Update and deleted by the preview sweeper, orphaning the loop it tracked.
  • Create, then on ErrScheduleAlreadyRunning do nothing unless the spec changed. Never Update a shared schedule from a preview worker.
  • A fixed-ID (fleet-wide) schedule goes after the sharedTaskQueue gate in registerSchedules, so only the main worker registers it. Per-queue schedules go above the gate.
  • Every ContinueAsNew loop must exit on its own (max iterations or wall-clock) so a lost schedule cannot leave an immortal workflow behind.

© speakeasy-api, AGPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/gram-temporal of speakeasy-api/gram.

Open the folder on GitHubat commit 4d32da1

Compare with similar skills

Gram Temporal next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Gram Temporal compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Gram Temporal this skillspeakeasy-api/gram272—~2.6kAutomated safety check: PassAGPL-3.0
AWS Cost Operationszxkane/aws-skills3671 repos~2.4kAutomated safety check: PassMIT
Eks Cost Intelligenceaws-samples/appmod-blueprints113—~3.8kAutomated safety check: WarnMIT-0
AWS Cost OperationsMicrock/ordinary-claude-skills4011 repos~2.5kAutomated safety check: PassCustom licence
Ak Add Capabilitiesyaalalabs/agent-kernel191—~12kAutomated safety check: PassApache-2.0
Frontend Build Timing Auditopenops-cloud/openops1.1k—~2.3kAutomated safety check: PassCustom licence

Similar skills

  • AWS Cost Operations

    zxkane/aws-skills

    AWS cost optimization, monitoring, and operational excellence expert.

    367 GitHub starsUsed in 1 repo~2.4k tokens
    DevOps & CloudAuto-check passed
  • Eks Cost Intelligence

    aws-samples/appmod-blueprints

    Official

    Run a live EKS cluster cost efficiency assessment — analyze spending across 6 dimensions (compute efficiency, Spot/Graviton adoption, networking, storage, observability, idle resources), calculate a…

    113 GitHub stars~3.8k tokensUpdated today
    DevOps & CloudAuto-check: warnings
  • AWS Cost Operations

    Microck/ordinary-claude-skills

    This skill provides AWS cost optimization, monitoring, and operational best practices with integrated MCP servers for billing analysis, cost estimation, observability, and security assessment.

    401 GitHub starsUsed in 1 repo~2.5k tokens
    DevOps & CloudAuto-check passed
  • Ak Add Capabilities

    yaalalabs/agent-kernel

    Add capabilities to an existing Agent Kernel project. An agent skill from yaalalabs/agent-kernel.

    191 GitHub stars~12k tokensUpdated today
    DevOps & CloudAuto-check passed
  • Frontend Build Timing Audit

    openops-cloud/openops

    Detects and diagnoses chunk-evaluation timing bugs in the Vite/rolldown production build of react-ui (works-in-dev / broken-in-build i18n regressions, missing UI labels, module-scope t()…

    1.1k GitHub stars~2.3k tokensUpdated yesterday
    Frontend & DesignAuto-check passed
  • React

    openops-cloud/openops

    A skill your agent uses when creating or editing frontend React code in react-ui or ui-components packages.

    1.1k GitHub stars~1.7k tokensUpdated yesterday
    Frontend & DesignAuto-check passed

More from speakeasy-api/gram

All 39 skills in this repo
  • Gram Playwright CLI

    speakeasy-api/gram

    A skill your agent uses when automating the Gram dashboard in a browser, capturing screenshots, inspecting pages.

    272 GitHub stars~3.4k tokensUpdated today
    Auto-check passed
  • Transactional Email

    speakeasy-api/gram

    A skill your agent uses when adding, changing, restyling, reviewing, validating, or previewing a Gram/Speakeasy transactional email, in Go or in LMX/MJML — a template<name.go, a TemplateKey…

    272 GitHub stars~4.7k tokensUpdated today
    Auto-check passed
  • Admin Shadcn

    speakeasy-api/gram

    A skill your agent uses when adding, changing, or styling UI in client/admin (the Gram admin dashboard) that touches shadcn/ui — a button, dialog, table, sidebar, badge, select, tabs, tooltip, card…

    272 GitHub stars~1k tokensUpdated today
    Auto-check passed
  • A skill your agent uses when adding, editing, reviewing, testing, or locating a reviewed skill distributed with the Platform MCP plugin; triggers include "Platform MCP skill", "platformmcpskills"…

    272 GitHub stars~2.2k tokensUpdated today
    Auto-check passed
  • Clickhouse

    speakeasy-api/gram

    A skill your agent uses when changing or reviewing Gram ClickHouse schemas, migrations, queries, inserts, access principals, bootstrap SQL, Cloud compatibility, partial migration failures, or…

    272 GitHub stars~3.2k tokensUpdated today
    Auto-check passed
  • Feature Flag

    speakeasy-api/gram

    A skill your agent uses when gating a feature behind a flag, dogfooding or gradually rolling out a change, choosing between productfeatures and PostHog feature flags, adding or checking a product…

    272 GitHub stars~2.6k tokensUpdated today
    Auto-check passed

Questions about Gram Temporal

What does Gram Temporal do?

A skill your agent uses when adding or changing background work in gram — a Temporal workflow, activity, schedule, signal, or ContinueAsNew loop; anything reacting to chat messages, tool calls, MCP…. Gram Temporal is an agent skill from speakeasy-api/gram. Use when adding or changing background work in gram — a Temporal workflow, activity, schedule, signal, or ContinueAsNew loop; anything reacting to chat messages, tool calls, MCP requests, telemetry rows, or DB writes; anything that fans out per project/org/user, polls, sweeps, or runs on a timer; when estimating or reviewing Temporal Cloud cost.

When should I use Gram Temporal?

Gram Temporal fits situations like: changing background work in gram — a Temporal workflow; continueAsNew loop; anything reacting to chat messages; anything that fans out per project/org/user.

How do I install Gram Temporal in Claude Code?

Run `npx skills add speakeasy-api/gram --skill gram-temporal -a claude-code`. Or copy the skill folder (.agents/skills/gram-temporal in speakeasy-api/gram) into .claude/skills/gram-temporal in your project. Claude Code loads it when a task matches its description.

How do I install Gram Temporal in Codex?

Run `npx skills add speakeasy-api/gram --skill gram-temporal -a codex`. Or copy the skill folder (.agents/skills/gram-temporal in speakeasy-api/gram) into .agents/skills/gram-temporal in your project. Codex loads it when a task matches its description.

Can I use Gram Temporal in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add speakeasy-api/gram --skill gram-temporal -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/gram-temporal, .gemini/skills/gram-temporal, .github/skills/gram-temporal and .opencode/skills/gram-temporal in your project.

What does Gram Temporal need to run?

SKILL.md names no scripts, command-line tools or credentials: Gram Temporal is instructions for the agent only.

Does Gram Temporal access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Gram Temporal safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Gram Temporal use?

Gram Temporal is published under the AGPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Gram Temporal use?

About 2.6k tokens (SKILL.md is roughly 10k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Gram Temporal?

Skills that share tags, products or a category with Gram Temporal: AWS Cost Operations (zxkane/aws-skills, 367 stars), Eks Cost Intelligence (aws-samples/appmod-blueprints, 113 stars), AWS Cost Operations (Microck/ordinary-claude-skills, 401 stars) and Ak Add Capabilities (yaalalabs/agent-kernel, 191 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Gram Temporal?

speakeasy-api (a GitHub organization) maintains it in speakeasy-api/gram, which has 272 GitHub stars. The repository holds 39 skills in this directory. The repository was last updated on October 7, 2026.

Source: speakeasy-api/gram on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.