核心提示词管理快速开始

开始使用 Prompt 管理

本指南将带你创建并使用一个 Litefuse 的 prompt。如果你想先了解什么是 prompt 管理以及它为什么重要,可以先看 Prompt 管理概览。关于 prompt 在 Litefuse 中的结构以及背后的工作原理,参见核心概念

获取 API Key

  1. 创建 Litefuse 账号自托管 Litefuse
  2. 在项目设置中创建新的 API 凭证。

配置你的 AI agent

在编辑器的 agent 模式中使用 Litefuse Skill,可以自动创建、编辑和使用 prompt。

什么是 Skill?它是面向 AI 编码 agent 的可复用指令包,开箱即用地为你的 agent 提供 Litefuse 专属工作流和最佳实践。

Install the Litefuse Skill in your coding tool:

Litefuse has a Cursor Plugin that includes the skill automatically.

创建一个 prompt

开启一个新的 agent 会话,然后让它创建你的 prompt:

"Create a prompt in Litefuse called 'movie-critic' that takes a movie name 
and critic level as variables."

或者让它把现有的 prompt 迁移到 Litefuse:

"Migrate the hardcoded prompts in this codebase to Litefuse."

在代码中使用 prompt

如果还没开启新的 agent 会话,先开一个,然后让它接入 prompt 获取逻辑:

"Fetch the 'movie-critic' prompt, production version, from Litefuse 
and use it in my application."

没有看到预期结果?

    后续步骤

    现在你已经使用过第一个 prompt 了,建议接下来做这两件事,更充分地用好 Litefuse Prompt 管理:

    想找特定主题?查看 Features 下针对具体主题的指南。

    这个页面对你有帮助吗?