Co-Pilot / 辅助式
更新于 a month ago

promptl-skill

Llatitude-dev
0.0k
latitude-dev/promptl-skill
78
Agent 评分

💡 摘要

PromptL 是用于在 Latitude 平台上创建和管理动态提示的语法指南。

🎯 适合人群

提示工程师人工智能开发者技术写作人员数据科学家产品经理

🤖 AI 吐槽:看起来很能打,但别让配置把人劝退。

安全分析低风险

风险:Low。建议检查:文件读写范围与路径穿越风险。以最小权限运行,并在生产环境启用前审计代码与依赖。


name: promptl description: PromptL syntax guide for writing prompts in the Latitude platform. This skill should be used when writing, reviewing, or editing PromptL prompts. Triggers on tasks involving creating prompts, configuring LLM parameters, using variables, conditionals, loops, chains, tools, agents, or any prompt engineering in Latitude. license: MIT metadata: author: latitude version: "1.0.0"

PromptL Syntax Guide

Comprehensive guide for writing PromptL prompts in the Latitude platform. PromptL is a versatile, human-readable language that simplifies defining and managing dynamic prompts for LLMs.

When to Apply

Reference these guidelines when:

  • Writing new PromptL prompts for Latitude
  • Configuring LLM models and parameters
  • Using variables, conditionals, or loops in prompts
  • Creating multi-step chains or agentic workflows
  • Defining tools for function calling
  • Referencing other prompts (snippets)
  • Working with structured JSON output schemas

Syntax Categories

| Category | Purpose | Key Syntax | |----------|---------|------------| | Configuration | Define model, provider, and parameters | --- YAML block | | Messages | Structure conversations | <system>, <user>, <assistant>, <tool> | | Variables | Dynamic content | {{ variable }} | | Conditionals | Dynamic flow control | {{ if }}, {{ else }}, {{ endif }} | | Loops | Iterate over lists | {{ for item in list }}, {{ endfor }} | | Chains | Multi-step prompts | <step> | | Tools | Function calling | tools: in config | | Agents | Autonomous workflows | type: agent | | Snippets | Reusable prompts | <prompt path="..." /> | | Content | Multi-modal content | <content-image>, <content-file> |

Quick Reference

Configuration Block

--- provider: OpenAI model: gpt-4o temperature: 0.7 top_p: 0.9 maxSteps: 20 ---

Message Tags

  • <system> - System instructions
  • <user> - User messages
  • <assistant> - Assistant responses
  • <tool> - Tool interaction results
  • <message role="..."> - Generic message tag

Variables

{{ variable_name }}
{{ variable || "default" }}
{{ set myVar = "value" }}

Conditionals

{{ if condition }}
  content
{{ else }}
  alternative
{{ endif }}

Loops

{{ for item, index in items }}
  {{ index }}: {{ item }}
{{ else }}
  No items
{{ endfor }}

Chains (Multi-step)

<step as="result">
  First step content
</step>

<step>
  Use {{ result }} from previous step
</step>

Tools Configuration

tools: - tool_name: description: What the tool does parameters: type: object properties: param_name: type: string description: Parameter description required: - param_name

Agents

--- type: agent provider: OpenAI model: gpt-4o tools: - latitude/search agents: - agents/sub-agent-path maxSteps: 40 ---

Structured Output

schema: type: object properties: field_name: type: string description: Field description required: - field_name

Prompt References (Snippets)

<prompt path="relative/path/to/prompt" />
<prompt path="shared/policies" variable={{ value }} />

Content Types

<content-text>Plain text</content-text>
<content-image>{{ image_url }}</content-image>
<content-file mime="application/pdf">{{ file_data }}</content-file>

How to Use

Read the AGENTS.md file for the complete detailed guide with all syntax explanations, examples, and best practices.

Each section contains:

  • Detailed explanation of the feature
  • Correct usage examples
  • Common mistakes to avoid
  • Best practices and tips
五维分析
清晰度8/10
创新性7/10
实用性9/10
完整性7/10
可维护性8/10
优缺点分析

优点

  • 全面的语法覆盖
  • 支持动态提示创建
  • 促进多步骤工作流程

缺点

  • 需要熟悉 YAML
  • README 中示例有限
  • 依赖外部文档

相关技能

context-fundamentals

A
toolCo-Pilot / 辅助式
86/ 100

“这是你的智能体开始胡言乱语之前你希望拥有的教科书,但读了它也修不好那个bug。”

tool-design

A
toolCo-Pilot / 辅助式
82/ 100

“这是一份关于如何为智能体构建工具的全面指南,而这些智能体很可能已经在忽略你精心设计的描述了。”

advanced-evaluation

A
toolCo-Pilot / 辅助式
82/ 100

“这是一份精彩绝伦的教科书章节,可惜忘了附上教科书本身——或者开课通知。”

免责声明:本内容来源于 GitHub 开源项目,仅供展示和评分分析使用。

版权归原作者所有 latitude-dev.