Temps Best Practices logo

Temps Best Practices

Organization
gotempsh
temps-best-practices

Best-practices reference for preparing and instrumenting applications on Temps. Covers the app runtime contract (`.temps.yaml` health, HOST/PORT, readiness, SIGTERM, replicas, migrations) and production observability (errors, traces, metrics, logs, analytics, privacy, sampling, cardinality, credential boundaries). Use whenever building or reviewing an app for Temps, configuring health checks, adding telemetry, diagnosing missing/noisy signals, or checking OTLP/Sentry/analytics ingestion. Triggers include "temps best practices", "prepare this app for Temps", ".temps.yaml health", "temps health check", "ignore health checks in otel", "temps observability", "wire up telemetry", and "instrument this app for temps". Prefer focused setup skills for a single SDK. Use temps-cli for executing deploy and resource-management commands.

Overview

Publishergotempsh
Repositorytemps
Skill nametemps-best-practices
Stars
836
Forks
68
Bundled files
8
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 8 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by gotempsh on GitHub. Read the source before you install it.

Installation

Install the Temps Best Practices AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/gotempsh/temps/tree/main/skills/temps-best-practices
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/gotempsh/temps.git /tmp/temps
mkdir -p .claude/skills
cp -r /tmp/temps/skills/temps-best-practices .claude/skills/temps-best-practices
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Temps Best Practices in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Temps Best Practices on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Temps Best Practices is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Temps Best Practices

Best practices for application code that runs on Temps. This skill owns the runtime contract and production observability; use temps-cli for platform operations.

Required workflow

  1. For any deployable application, read references/runtime-contract.md.
  2. When any telemetry or replay is enabled, read references/telemetry-hygiene.md.
  3. Read only the reference for each observability pillar in scope.
  4. Determine the deployment source. For repository builds, inspect and merge .temps.yaml; for image/static deployments, inspect the deployment health-path override because no repository config is available.
  5. Run the runtime and telemetry verification checklists before considering the work complete.

Runtime contract summary

Every web application should expose a dedicated health endpoint. Repository builds configure it in .temps.yaml under the project's effective Temps Root Directory / Docker build context:

yaml
health:
  path: /healthz

Use health.path; do not rely on the currently parsed-but-unapplied status, interval, timeout, or retries fields. If OpenTelemetry server tracing is enabled, exclude the exact health path from incoming spans and routine access-log/request-metric noise. Keep the route, .temps.yaml, and filters synchronized.

Image and static deployments cannot read .temps.yaml; set the same route through their deployment health_check_path / CLI --health-check-path override instead.

Also require the app to read PORT, bind to HOST/0.0.0.0, align a custom image's EXPOSE, handle SIGTERM, flush telemetry, and exit inside Temps' 10-second shutdown window. See the runtime reference for readiness semantics, scale-to-zero caveats, replicas, migrations, stdout/stderr, and cron authentication.

Observability

Temps replaces Sentry + Datadog/Honeycomb + PostHog with one ingestion surface. This section is the map across all five pillars — use it to decide which pillar a signal belongs in, and to find the concrete endpoint/auth/gotcha details for each. It complements, not replaces, the narrower setup skills:

  • add-error-tracking — step-by-step Sentry SDK init per language/framework
  • add-react-analytics — step-by-step @temps-sdk/react-analytics hook usage

Quickstart: wire up any app end to end

Goal: an app in any language gets runtime health, error tracking, and traces working safely.

Temps auto-injects exporter destinations and credentials; it does not install or initialize an SDK. Apps deployed through Temps receive these variables at Docker build time and container runtime, but application instrumentation still has to be installed, initialized, filtered, and verified:

Env varWhat it's forClient-safe?
SENTRY_DSNServer-side/generic error-tracking DSNServer by default
NEXT_PUBLIC_SENTRY_DSN / NUXT_PUBLIC_SENTRY_DSN / VITE_SENTRY_DSN / PUBLIC_SENTRY_DSN / REACT_APP_SENTRY_DSNFramework-specific public Sentry write keyYes
SENTRY_RELEASECommit SHA; leave release unset in Sentry.init() so the SDK reads itServer/build metadata
OTEL_EXPORTER_OTLP_ENDPOINT, OTEL_EXPORTER_OTLP_PROTOCOLOTLP destination and http/protobuf protocolEndpoint is non-secret
OTEL_EXPORTER_OTLP_HEADERSDeployment-token authorization for OTLPNo — server only
OTEL_SERVICE_NAME, OTEL_SERVICE_VERSIONStable service and release metadataNon-secret

Build-time availability does not make a server credential browser-safe. Never expose OTEL_EXPORTER_OTLP_HEADERS, TEMPS_API_TOKEN, dt_, or tk_ through a public-prefixed variable or client bundle. Browser/mobile OTLP must use an authenticated backend or collector; see references/telemetry-hygiene.md.

This auto-injection is scoped to apps deployed through Temps. It does not apply to: an app running elsewhere and only sending telemetry to a self-hosted Temps instance, or to Temps' own console/dashboard (which is built by its own CI, not through this deploy pipeline — self-referential, since Temps doesn't deploy itself as a project on itself). For those cases, get the real credential from the dashboard and wire it through whatever env var / build-arg / secrets mechanism that project's own build system already uses:

  • Error tracking DSN: Error Tracking → DSN & Setup (https://<public_key>@<temps-host>/<project_id>)
  • A server-side deployment token (dt_...) or API key (tk_...) for OTLP: Project Settings → API Keys

Never hardcode a token or endpoint into source, a Dockerfile, or CI config. Do not ask the user for a token so it can be committed. A Sentry DSN public key is designed for client writes, but should still come from the platform's supported configuration path.

Either way, the app-side steps are the same:

  1. Runtime: apply references/runtime-contract.md.
  2. Hygiene: establish credential boundaries, redaction, cardinality, batching, sampling, and shutdown using references/telemetry-hygiene.md.
  3. Error tracking: follow add-error-tracking, leaving release metadata environment-driven.
  4. Traces: install and initialize the official OpenTelemetry SDK/agent using references/opentelemetry-traces.md. Auto-injected env vars only configure export.
  5. Verify runtime and telemetry behavior before considering the app production-ready.

The five pillars

PillarWhat it's forReference
Error trackingUncaught exceptions, handled errors, stack traces, source mapsreferences/error-tracking.md
Traces (OTLP)Distributed request spans, AI/gen_ai call chains, latency breakdownsreferences/opentelemetry-traces.md
Metrics (OTLP)Counters/gauges/histograms — request rates, queue depth, custom business metricsreferences/metrics.md
Logs (OTLP)Structured log records correlated to tracesreferences/logs.md
AnalyticsPage views, custom product events, session replay, Web Vitalsreferences/analytics.md

Read the specific reference file(s) for the pillar(s) in play — don't load all five unless doing a full-stack instrumentation pass.

Cross-pillar production rules live in references/telemetry-hygiene.md, not duplicated in every pillar.

Deciding which pillar a signal belongs in

  • "This threw/crashed" → error tracking, not a log line. Logs are for structured record-keeping, not exception capture.
  • "How long did this request/DB call/LLM call take, and what did it call downstream?" → traces. If it's a single number you want to alert on or chart over time (not per-request), that's a metric instead.
  • "I want to count/aggregate something over time" (requests/sec, cache hit rate, custom business counter) → metrics, not traces. Don't create a span just to record a number.
  • "A user did X in the product" → analytics event, not a log or a trace attribute.
  • "I need to debug what happened at a point in time, correlated to a trace" → OTEL logs with trace_id/span_id attributes set, so they join with the trace in the dashboard.

Shared ingestion facts across pillars

Temps OTLP ingestion shares a rate-limit/quota model, but token support differs by signal:

  • tk_ API key: server-side; needs X-Temps-Project-Id.
  • dt_ deployment token: server-side and project/environment scoped. Prefer the header-based endpoint so Temps resolves attribution from the token. Do not expose it to a browser.
  • si_ integration token: supported for infrastructure metrics ingestion, not general traces/logs.
  • Sentry-compatible ingestion: uses the DSN public key rather than these machine tokens.
  • Auth header: Authorization: Bearer <token> or X-Temps-Api-Key: <token>. Some OTLP exporters URL-encode the header as Bearer%20<token> — Temps accepts that too.
  • Rate limit: 1000 req/60s per token by default (TEMPS_OTEL_RATE_LIMIT, TEMPS_OTEL_RATE_LIMIT_WINDOW_SECS — server-side config, not something the app sets).
  • Storage quota: off by default; a self-hosted instance can opt in via TEMPS_OTEL_QUOTA_GB. If ingestion suddenly starts 413'ing, that's the likely cause.
  • Endpoint shape: prefer header-based POST /api/otel/v1/{traces|metrics|logs} with attribution resolved from the token. Path-based endpoints exist, but should not be used to override a deployment token's intended deployment attribution.

Definition of done

  1. Runtime: app listens on the injected port/interface; the health route is configured through .temps.yaml for repository builds or the deployment override for image/static deploys; SIGTERM drains and exits within 10 seconds.
  2. Health noise: repeated health requests succeed without routine server spans, access logs, or request metrics; a normal route remains observable.
  3. Error tracking: a deliberate test error appears in Error Tracking → Error Groups with the expected release and no sensitive data.
  4. Traces: a normal request appears in Observe → Traces, uses a route-template name, propagates context downstream, and has a sane duration_ms.
  5. Metrics: names and bounded labels pass validation; no user/session/request identifiers create cardinality explosions.
  6. Logs: a structured log inside an active span joins the correct trace and contains no secrets.
  7. Analytics: browser events are treated as untrusted; an authoritative test conversion comes from authenticated server code.
  8. Replay: recording is consent-gated, masked, path-restricted, and inspected with synthetic sensitive values.
  9. Client bundle: built assets contain no dt_, tk_, TEMPS_API_TOKEN, or OTLP authorization header.

If a signal never appears, check whether the SDK was actually initialized, then endpoint/protocol, token type/header, rate limit, and quota.

Everything else

Beyond the runtime health contract and observability guidance above, deployment, service/database provisioning, environment variables, domains, monitoring config, backups, and CI/CD automation are all reached through the Temps CLI (bunx @temps-sdk/cli). Use the temps-cli skill for those operations.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Temps Best Practices AI skill do?

Best-practices reference for preparing and instrumenting applications on Temps. Covers the app runtime contract (`.temps.yaml` health, HOST/PORT, readiness, SIGTERM, replicas, migrations) and production observability (errors, traces, metrics, logs, analytics, privacy, sampling, cardinality, credential boundaries). Use whenever building or reviewing an app for Temps, configuring health checks, adding telemetry, diagnosing missing/noisy signals, or checking OTLP/Sentry/analytics ingestion. Triggers include "temps best practices", "prepare this app for Temps", ".temps.yaml health", "temps heal...

Why use Temps Best Practices on TypingMind?

Because you install it once and use it with any model. Temps Best Practices is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Temps Best Practices in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/gotempsh/temps/tree/main/skills/temps-best-practices. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Temps Best Practices?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Temps Best Practices?

As many as you like. As long as a model supports skills, you can use Temps Best Practices with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Temps Best Practices AI skill free?

Yes. It is published on GitHub by gotempsh under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇