preset-skill-op-saved-presets

Documents the Load, Save, Delete, and Bootstrap contract for saved presets versus built-in templates.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It clarifies how the LingTai TUI preset system distinguishes user-saved presets from built-in templates, preventing confusion about load order, override behavior, naming, and deletion semantics when working with ~/.lingtai-tui/presets/.

Core Features & Use Cases

  • Directory-based source tracking: Explains that Source (template vs saved) is derived purely from which directory a preset file lives in, with no serialized marker.
  • Load and fallback semantics: Documents that saved presets override same-named templates, and that malformed saved files block fallback rather than silently falling through.
  • Save/Delete/Bootstrap contract: Covers same-name overwrites in saved/, <template>-N auto-naming for edited templates, delete-returns-nil-on-missing behavior, and RefreshTemplates rewriting templates on every launch.
  • Use Case: When editing a built-in template in the preset editor, understand that saving creates a new <template>-N file in saved/ that overrides the template on subsequent loads without touching the immutable template.

Quick Start

Explain how saved presets override templates and what happens when I save or delete a preset in the LingTai TUI.

Frequently Asked Questions about preset-skill-op-saved-presets

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

FAQPage Schema
How do saved presets override built-in templates in LingTai TUI?

Load looks in the saved/ directory first, then templates/, so a saved preset with the same name as a template wins. List returns saved presets alphabetically first, followed by the templates.

What happens when I edit and save a built-in template preset?

AutoSavedName picks the lowest unused <template>-N name, so saving an edited template always creates a fresh user-owned copy in saved/ and never overwrites the template itself.

Does a malformed saved preset fall back to the template version?

No. Load only falls through to templates/ when the saved file is genuinely absent. Invalid JSON, permission errors, or a directory path surface the underlying error and block fallback.

Does Save or Load automatically validate preset structure?

No. Validate() checks description.summary, tier, llm.provider/model, and context_limit, but neither Save nor Load invokes it automatically. Callers like the preset editor must call it explicitly before writing.

Can I delete a built-in template preset?

No. Delete only removes files from saved/; templates are immutable and RefreshTemplates re-extracts them on every launch. Deleting a missing saved name returns nil rather than an error.

Are preset saves atomic in the LingTai TUI?

No. Save uses a direct os.WriteFile with no temp-file-plus-rename, so there is no atomicity guarantee. The same applies to the per-file writes performed by RefreshTemplates.