# Temps Best Practices

Best-practices reference for preparing and instrumenting applications on Temps.

- Repository: https://github.com/gotempsh/temps (887 stars)
- Category: DevOps
- License: Apache-2.0
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add gotempsh/temps --skill temps-best-practices -g -a claude-code -y`
Codex: `npx skills add gotempsh/temps --skill temps-best-practices -g -a codex -y`
Cursor: `npx skills add gotempsh/temps --skill temps-best-practices -g -a cursor -y`
Gemini CLI: `npx skills add gotempsh/temps --skill temps-best-practices -g -a gemini-cli -y`

## Description

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.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# 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](references/runtime-contract.md).
2. When any telemetry or replay is enabled, read [references/telemetry-hygiene.md](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.

## Request rules belong at the edge

The rest: https://github.com/gotempsh/temps/blob/HEAD/skills/temps-best-practices/SKILL.md
