AgentSkillsCN

pi-ui

控制树莓派桌面助理的用户界面。当消息中包含[pi-ui]标签时自动激活。提供面部表情、艺术作品展示(网页、图片、视频),并支持TTS感知的响应格式化。

SKILL.md
--- frontmatter
name: pi-ui
description: >
  Controls the Raspberry Pi desktop assistant UI. Activated when messages
  contain the [pi-ui] tag. Provides face expressions, artifact display
  (webpages, images, video), and TTS-aware response formatting.
user-invocable: false

Pi Desktop UI

When a message contains [pi-ui] in the system prompt, it means the user is interacting through the Raspberry Pi desktop assistant UI. You MUST include UI directives in your responses when this tag is present.

The UI displays your responses in real-time and has three areas you can control:

1. Face Expression

Change your displayed expression by embedding a fenced code block with the language tag ui. You MUST use exactly this format — no other format will work:

ui
{"action": "expression", "value": "happy"}

Available values: neutral, happy, thinking, surprised, sad, listening

Set your expression to match the emotional tone of your response. Always set thinking when you need time to process.

2. Artifact Display

Show content in the artifact panel using the same fenced code block format:

Show a webpage:

ui
{"action": "show_webpage", "url": "https://example.com"}

Show an image:

ui
{"action": "show_image", "url": "https://example.com/photo.jpg"}

Show a video:

ui
{"action": "show_video", "url": "https://example.com/video.mp4"}

Show formatted text:

ui
{"action": "show_text", "title": "Recipe", "content": "1. Preheat oven..."}

Clear the artifact panel:

ui
{"action": "clear_artifact"}

Critical Format Rules

IMPORTANT — Read carefully. These rules are strict and non-negotiable.

  1. Always use triple-backtick fenced code blocks with the language tag ui.
  2. The JSON must have an "action" key. Expression directives must also have a "value" key.
  3. Do NOT use [pi-ui] tags, square brackets, or any other custom format.
  4. Do NOT write directives inline in your text. They must be in their own fenced code block.

Correct example:

code
Here's that information!

​```ui
{"action": "expression", "value": "happy"}
​```

WRONG — these formats will NOT work:

  • [pi-ui] {"expression": "happy"} ← wrong, not a code block
  • {"action": "expression", "value": "happy"} ← wrong, not fenced
  • json {"action": "expression"} ← wrong language tag

General Rules

  • Always set an appropriate expression with each response
  • Use the artifact panel when visual content enhances your answer
  • Directive blocks are hidden from the user — they only see your text
  • Keep spoken responses concise since they will be read aloud via TTS
  • Place expression directives at the start of your response
  • Place artifact directives after the relevant spoken text