temps-plugin

A development guide for building external plugins for the Temps deployment platform. These plugins are self-contained Rust programs that communicate with Temps through a local socket and can provide routes, a user interface, and a database.

In plain words
What is it for?
Use it to create or debug a Temps plugin, implement its communication channel and HTTP routes, add an optional React interface, or store plugin data in SQLite.
Why use it?
It clarifies the plugin startup protocol and important implementation constraints, helping avoid runtime conflicts and deadlocks.

Skill for Claude CodeCodex

Install

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.

agentmods
npx agentmods add skills/gotempsh/temps/temps-plugin
Any agent
npx skills add gotempsh/temps --skill temps-plugin
Clone the repo
git clone --depth 1 https://github.com/gotempsh/temps

Made for: Claude Code, Codex.

Per session 120 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,729 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00120 $0.04729
Opus 5 $0.00060 $0.02364
Sonnet 5 $0.00024 $0.00946
Haiku 4.5 $0.00012 $0.00473

Measured 2d ago against content hash 2c4a768685ec, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

temps-plugin 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.

skills/temps-plugin/SKILL.md · 557 lines

How it starts

The opening of the file, as written. The whole thing — 557 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Temps Plugin Development

Build external plugins as standalone Rust binaries that Temps discovers, spawns, and proxies to.

Architecture Overview

Temps (main process)
  ├── Scans ~/.temps/plugins/ for binaries
  ├── Spawns each binary with --socket-path, --auth-secret, --data-dir
  ├── Reads JSON manifest from stdout (handshake phase 1)
  ├── Reads ready signal from stdout (handshake phase 2)
  ├── Opens WebSocket to plugin's /_temps/channel (bidirectional data access)
  ├── Proxies /api/x/{plugin_name}/* → Unix socket
  ├── Serves plugin UI at /api/x/{plugin_name}/ui/*
  └── Delivers platform events over the WebSocket channel

Plugins are self-contained binaries. They own their own HTTP routes (axum Router), optional React UI (embedded via include_dir), and SQLite database (via sea-orm in their data_dir).

Critical Rules

NEVER

  • Register a /health route — the SDK runtime already provides one. Axum panics on Router::merge with duplicate routes.
  • Use rt.block_on() directly inside router() — it deadlocks. Use tokio::task::block_in_place(|| Handle::current().block_on(...)) instead.
  • Use #[tokio::main] — the SDK creates its own runtime via run_plugin().
  • Access the Temps database directly — use ctx.temps() for platform data queries over the WebSocket channel.
  • Use sea-orm with the main Temps database — plugins get their own SQLite in data_dir.
  • Return anyhow::Result — use typed error enums with thiserror.
  • Use .unwrap() or .expect() in production paths.

ALWAYS

  • Use temps_plugin_sdk::main!(YourPlugin) as the entry point.
  • Implement ExternalPlugin trait with manifest() and router() at minimum.
  • Use block_in_place for any async initialization inside router().
  • Embed the UI with include_dir!("$CARGO_MANIFEST_DIR/web/dist") and serve via own routes.
  • Keep tests in the same file as the code they test (#[cfg(test)] mod tests).
  • Run cargo check -p your-plugin after every modification.
  • Run cargo test -p your-plugin to verify tests pass.

Read the full file on GitHub · 557 lines

Changes

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.

  1. 2d ago First seen · 557 lines · 120 tokens per session scan A 2c4a768685ec

Subscribe to this mod's changes

temps-plugin is a skill published in the GitHub repository gotempsh/temps (700 stars, last pushed 2d ago), licensed Apache-2.0. It adds 120 tokens to every session and 4,729 once invoked, about $0.0006 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-30.