diff --git a/assistant/src/config/bundled-skills/document-editor/SKILL.md b/assistant/src/config/bundled-skills/document-editor/SKILL.md index ac6e81fae48..5938733800e 100644 --- a/assistant/src/config/bundled-skills/document-editor/SKILL.md +++ b/assistant/src/config/bundled-skills/document-editor/SKILL.md @@ -110,6 +110,12 @@ Users can leave inline comments on documents. Open comments are surfaced in a `< 3. Call `comment_resolve` on comments you have addressed. 4. If a comment is ambiguous, call `comment_reply` to ask for clarification instead of guessing. +## Anti-Patterns + +- **Don't use `app_create` for blog posts, articles, or written content.** Use `document_create` — apps are for interactive content with state/data. +- **Don't output the full content in chat.** The content goes in the document editor, not in the chat response. Acknowledge what you're doing and stream to the editor. +- **Don't wait to generate everything before sending.** Stream content in chunks via `document_update` with `mode: "append"` so users see progress in real time. + ## Usage Notes - The `mode` parameter on `document_update` defaults to `append`. diff --git a/skills/catalog.json b/skills/catalog.json index 887ba509c9c..a25fa0284c8 100644 --- a/skills/catalog.json +++ b/skills/catalog.json @@ -117,22 +117,6 @@ "compatibility": "Designed for Vellum personal assistants", "updatedAt": "2026-05-12T14:56:19-04:00" }, - { - "id": "document-writer", - "name": "document-writer", - "description": "Create and edit long-form documents like blog posts, articles, essays, and reports using the built-in rich text editor", - "metadata": { - "emoji": "📝", - "vellum": { - "display-name": "Document Writer", - "includes": [ - "document" - ] - } - }, - "compatibility": "Designed for Vellum personal assistants", - "updatedAt": "2026-04-08T14:52:29-04:00" - }, { "id": "doordash", "name": "doordash", @@ -426,7 +410,7 @@ "feature-flag": "meet" } }, - "updatedAt": "2026-05-26T18:33:11Z" + "updatedAt": "2026-05-26T14:56:40-04:00" }, { "id": "meme-generator", diff --git a/skills/document-writer/SKILL.md b/skills/document-writer/SKILL.md deleted file mode 100644 index e658c2a34b1..00000000000 --- a/skills/document-writer/SKILL.md +++ /dev/null @@ -1,199 +0,0 @@ ---- -name: document-writer -description: Create and edit long-form documents like blog posts, articles, essays, and reports using the built-in rich text editor -compatibility: "Designed for Vellum personal assistants" -metadata: - emoji: "📝" - vellum: - display-name: "Document Writer" - includes: - - "document" ---- - -You are helping your user write long-form content (blog posts, articles, essays, reports, documentation) using the built-in document editor. This skill should be used whenever the user asks to write, draft, or create any document-like content. - -## When to Use This Skill - -**ALWAYS use this skill when the user asks for:** -- Blog posts -- Articles -- Essays -- Reports -- Guides or tutorials -- Documentation -- Any written content that benefits from the document editor - -**DO NOT use this skill for:** -- Code snippets or technical implementations -- Interactive apps or dashboards (use `app_create` instead) -- Quick summaries - -## Workflow - -### Step 1: Create the Document - -Use `document_create` to open the built-in rich text editor: - -```json -{ - "title": "The title of the document (inferred from user's request)", - "initial_content": "Optional starting content in Markdown format" -} -``` - -**Important:** The editor opens in the Documents tab of the Directory panel, with chat docked to the side. The user can see both the editor and chat simultaneously. - -### Step 2: Generate Content - -Write the content in **Markdown format**. Use proper structure: - -- `#` for main title -- `##` for section headings -- `###` for subsections -- `**bold**` and `*italic*` for emphasis -- ` ```language ` for code blocks -- `[text](url)` for links -- `- ` or `1. ` for lists -- `> ` for blockquotes -- Tables, images, and other Markdown features as appropriate - -**Quality standards:** -- Write in clear, engaging prose appropriate for the content type -- Use active voice and vary sentence structure -- Break content into logical sections with descriptive headings -- Include transitions between sections -- For technical content: use code blocks with syntax highlighting -- For data-heavy content: use Markdown tables - -### Step 3: Stream Content to Editor - -Use `document_update` to send content to the editor as you generate it: - -```json -{ - "surface_id": "doc-xyz", - "content": "# Main Title\n\nYour content here...", - "mode": "append" -} -``` - -**Streaming strategy:** -- Generate content in logical chunks (paragraphs or sections) -- Use `mode: "append"` to stream chunks as you write -- The content appears in real-time in the editor -- Don't wait to generate everything before sending - stream it! - -### Step 4: Handle User Edits and Requests - -The user can request changes via the docked chat while viewing the document: - -**Common requests:** -- "Make the intro shorter" -- "Add a section about X" -- "Change the tone to be more formal" -- "Fix the grammar in paragraph 3" - -**How to respond:** -- Acknowledge the request -- Generate the updated content -- Use `document_update` with: - - `mode: "replace"` for complete rewrites - - `mode: "append"` for additions at the end - - For edits in the middle: use `mode: "replace"` with the full updated document - -### Step 5: Finalize - -Once the user is satisfied: -- Confirm the document is complete -- Remind them that it's automatically saved in the Generated panel -- Let them know they can continue editing manually or ask for more changes - -## Examples - -### Example 1: Blog Post Request - -**User:** "Write a blog post about the future of AI" - -**Your response:** -``` -I'll create a document for your blog post about the future of AI. -``` - -Then: -1. Call `document_create` with `title: "The Future of AI"` -2. Generate content in chunks, calling `document_update` repeatedly: - - First chunk: `# The Future of AI\n\nArtificial intelligence is...` - - Second chunk: `## Current State\n\nToday, AI systems...` - - Third chunk: `## Emerging Trends\n\n1. **Multimodal AI**...` - - Continue until complete - -### Example 2: Edit Request - -**User (after initial creation):** "Add a section about ethical considerations" - -**Your response:** -``` -I'll add a section on AI ethics. -``` - -Then: -1. Call `document_update` with `mode: "append"` and content: - ```markdown - ## Ethical Considerations - - As AI systems become more powerful, we must address... - ``` - -### Example 3: Full Rewrite - -**User:** "Rewrite this in a more casual tone" - -**Your response:** -``` -I'll rewrite the article in a more casual, conversational tone. -``` - -Then: -1. Call `document_update` with `mode: "replace"` and the complete rewritten content - -## Important Notes - -- **Documents are automatically saved** and accessible via the Generated panel -- The user can **manually edit documents** at any time - your role is to assist with generation and refinement -- The editor supports **drag-and-drop images**, which are converted to base64 inline -- **Word count is tracked** automatically and displayed to the user -- **Toast UI Editor** is used, which provides both Markdown and WYSIWYG editing modes -- Always **acknowledge the document creation** before calling `document_create` - -## Error Handling - -- If `document_create` fails, the user may not have the client connected. Ask them to check their connection. -- If the user asks to edit a specific part but you don't have the full document context, ask them to clarify which section or provide more context. -- If you're unsure about the content direction, ask clarifying questions before generating. - -## Anti-Patterns (DO NOT DO THIS) - -❌ **Don't use `app_create` for blog posts or articles** -- Blog posts should use `document_create`, not `app_create` -- Apps are for interactive content with state/data - -❌ **Don't write everything at once without streaming** -- Use `document_update` with `mode: "append"` to stream chunks -- Users want to see content appear in real-time - -❌ **Don't ask for explicit approval before creating the document** -- If the user asks for a blog post, create it immediately -- They can always request changes after - -❌ **Don't output the full content in chat** -- The content goes in the document editor, not in the chat response -- Just acknowledge what you're doing and stream to the editor - -## Success Criteria - -✅ Document editor opens in the Documents tab -✅ Content appears in real-time as you generate it -✅ User can see both the editor and chat side-by-side -✅ Content is well-structured with proper Markdown formatting -✅ User can request edits via chat and you respond appropriately -✅ Final document is saved and accessible in Generated panel