preset-health

Diagnose saved LLM presets and classify connectivity failures without exposing credentials.

692|60|Updated Mar 15, 2026
One-click install
npx skills add https://github.com/Lingtai-AI/lingtai --skill preset-health
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: preset-health
Source: https://github.com/Lingtai-AI/lingtai/tree/main/tui/internal/preset/skills/swiss-knife/reference/preset-health
Command: npx skills add https://github.com/Lingtai-AI/lingtai --skill preset-health

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Saved LLM presets silently break when API keys expire, providers retire models, or endpoints move, and finding the broken one usually means risking credential exposure or mutating configuration. This Skill provides a read-only procedure to enumerate saved presets, probe their health, classify each failure, and report actionable fixes without printing secrets or editing any preset file.

Core Features & Use Cases

  • Read-only preset enumeration: Lists saved presets via lingtai-tui presets --saved --json or a directory read of ~/.lingtai-tui/presets/saved/*.json, reading only non-secret config fields.
  • Credential presence checks: Verifies whether the environment variable named by api_key_env is set without ever reading or echoing its value.
  • Failure classification taxonomy: Maps doctor probe outcomes to fixed classes such as no_credentials, auth_failed, endpoint_unreachable, model_not_found, config_error, and rate_limited.
  • Safe reporting with redaction: Produces a status table with mandatory redaction of bearer tokens, API keys, and signed URL query strings, plus human-confirmed remediation recommendations.
  • Use Case: After a provider rotates keys, run this procedure to find every saved preset affected, identify that gemini-test fails with GEMINI_API_KEY not set, and get the exact one-line fix to confirm.

Quick Start

Check whether all my saved presets are still working and tell me which ones are broken and why, without changing any configuration.

Frequently Asked Questions about preset-health

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I check if my saved LLM presets still work?

List saved presets with `lingtai-tui presets --saved --json`, then check each preset's credential presence and connectivity status. The procedure classifies each preset as ok, no_credentials, auth_failed, endpoint_unreachable, or another fixed status class.

How to test API key validity without printing the key?

Check only whether the environment variable named by the preset's api_key_env field is set and non-empty, never reading its value. Reports reference credentials by variable name like GEMINI_API_KEY, and all error output is redacted for tokens and signed URLs.

Why does my preset report no_credentials when the key exists?

The runtime resolves credentials by reading the environment variable named in api_key_env, so the variable must be set in the agent's resolved environment, not just your shell. Set the variable in the agent environment or env_file, then run system(action="refresh") to re-resolve config.

Can I probe a saved preset without switching the active preset?

Live probing via /doctor only tests the active agent's configuration, and switching presets is a config change outside this read-only workflow. For inactive presets, rely on static inspection of provider, model, base_url, and credential presence, then recommend a throwaway dev agent for live testing.

What is the difference between auth_failed and model_not_found errors?

Read the error detail: an authentication message (401/403) points to rejected credentials, while a model message indicates the model field names a retired or unknown model. When the provider conflates both, report both classes as candidates.