Chuyển đến nội dung
Skillpedia
Prompt và LLM6.1k · #14426

prompt-writing

Skill này làm gì

Skill này hướng dẫn việc viết và tinh chỉnh các prompt lưu trong YAML, chẳng hạn system prompt và prompt cho agent. Skill dành cho người xây dựng trợ lý AI và muốn có prompt rõ ràng, có cấu trúc.

Khi nào nên dùng

  • ✓Khi bạn đang viết system prompt cho một trợ lý AI.
  • ✓Khi bạn muốn cải thiện một mẫu prompt YAML chưa hoạt động tốt.
  • ✓Khi bạn cần thêm biến và các phần rõ ràng vào một prompt.

Liên kết skill

https://github.com/ModelEngine-Group/nexent/blob/develop/.claude/skills/prompts-writing/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/ModelEngine-Group/nexent/blob/develop/.claude/skills/prompts-writing/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Viết lại system prompt YAML cho agent hỗ trợ khách hàng của chúng tôi, có các phần rõ ràng, chỗ giữ chỗ cho tên khách hàng và một danh sách kiểm tra.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Skill cung cấp cho agent một bố cục YAML chuẩn, quy tắc về tiêu đề, danh sách và chỗ giữ chỗ, cùng một danh sách kiểm tra chất lượng. Agent dùng những thứ này để tạo hoặc chỉnh prompt và kiểm tra trước khi trả lại.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

Prompt Writing

Create and optimize YAML-based prompts for AI assistants following industry best practices.

Quick Start

Standard YAML Prompt Structure

system_prompt: |-
  # Section with ### header
  ## Subsection with ## header
  Content with clear structure.
  
  **Bold key concepts**
  
  - Bullet points for requirements
  - Consistent indentation (2 spaces)
  
  1. Numbered lists for sequences
  2. Use when order matters

user_prompt: |
  Direct instructions with {{ variable placeholders }}

Key Principles

  1. Structure: Use |- for multi-line system prompts, | for user prompts
  2. Templating: Use {{ variable }} for dynamic content
  3. Separators: Use --- sparingly, only between major sections
  4. Language: Keep prompts in consistent language (English recommended for templates)

Quality Checklist

Before finalizing any prompt, verify:

  • No unclosed braces {{ without }}
  • No excessive separators (---, ***)
  • Consistent heading hierarchy (### → ##)
  • Clear variable placeholders with descriptive names
  • Proper YAML indentation preserved
  • No HTML tags in Markdown content
  • Lists have parallel structure

Common Patterns

System Prompt with Sections

system_prompt: |-
  ### Role Definition
  You are a professional [role name]. Your task is to [core responsibility].
  
  ### Requirements
  1. First requirement
  2. Second requirement
  3. Third requirement
  
  ### Guidelines
  - Do this
  - Don't do that
  - Always do this
  
  ### Output Format
  Respond in plain text without separators.

Jinja2 Template Variables

user_prompt: |
  Please analyze the following {{ document_type }}:
  
  Name: {{ filename }}
  Content: {{ content }}
  
  Summary ({{ max_words }} words):

References

Related Tools

When working with prompts, also consider:

  • YAML validation tools
  • Jinja2 syntax checkers
  • Markdown linters
Câu hỏi thường gặp

Skill dùng định dạng nào?

Skill dùng YAML với một khối system prompt và một khối user prompt.

Biến được viết như thế nào?

Nội dung động được viết trong hai cặp dấu ngoặc nhọn, ví dụ tên của một biến.

Skill có kiểm tra kết quả không?

Có. Skill có danh sách kiểm tra để xác minh prompt trước khi hoàn tất.

Chi tiết

Mô tả gốc của tác giả

Create, refine, and optimize high-quality YAML prompts for AI assistants. Use when working with prompt templates, system prompts, agent prompts, or any prompt engineering tasks. Provides structure guidelines, template patterns, and quality standards for YAML-based prompts.

repo: ModelEngine-Group/nexent

Độ phổ biến

Sao GitHub
6.1k
Vị trí xếp hạng
#14426
Giấy phép
MIT
Cập nhật
2/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Skill tương tự