Logo Prompt Context Engineer

Prompt Context Engineer

Tổ chức
pnp
prompt-context-engineer

Biến mọi prompt, yêu cầu hoặc ý tưởng còn sơ sài thành prompt được cấu trúc tốt, thiết kế ngữ cảnh theo các nguyên tắc kỹ thuật thiết kế ngữ cảnh của Andrej Karpathy. Dùng kỹ năng này khi người dùng yêu cầu cải thiện, viết lại, cấu trúc lại, tối ưu hóa hoặc “thiết kế” một prompt; nhắc đến kỹ thuật viết prompt hoặc thiết kế ngữ cảnh; dán prompt và muốn làm cho prompt tốt hơn; cần trợ giúp viết prompt hệ thống hoặc hướng dẫn cho AI; hoặc nói những câu như “biến cái này thành một prompt hay”, “làm cho prompt này hiệu quả hơn” hay “Claude không hiểu ý tôi với prompt này”. Cũng dùng khi người dùng chia sẻ một yêu cầu mơ hồ và muốn chuyển nó thành prompt chất lượng cao, có thể tái sử dụng. KHÔNG dùng kỹ năng này để trả lời hoặc thực hiện chính prompt ban đầu, viết tài liệu thông thường (không phải prompt), hoặc tạo mã hay nội dung không liên quan đến việc soạn prompt.

Add to TypingMind

Tổng quan

Nhà phát hànhpnp
Kho mãcopilot-prompts
Tên kỹ năngprompt-context-engineer
Sao
894
Bản fork
307
Tệp đi kèm
5
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 5 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được pnp công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Prompt Context Engineer trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/pnp/copilot-prompts/tree/main/samples/skills/prompt-context-engineer
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/pnp/copilot-prompts.git /tmp/copilot-prompts
mkdir -p .claude/skills
cp -r /tmp/copilot-prompts/samples/skills/prompt-context-engineer .claude/skills/prompt-context-engineer
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Prompt Context Engineer trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Prompt Context Engineer ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Prompt Context Engineer với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Prompt Context Engineer

Convert a raw prompt or request into a structured prompt built on context engineering principles.

The guiding idea, from Andrej Karpathy: context engineering is "the delicate art and science of filling the context window with just the right information for the next step." A prompt is not one clever sentence — it is everything the model sees. The job is to supply each piece of context the task genuinely needs (task framing, background, examples, constraints, output format) and ruthlessly exclude everything it doesn't. Too little or wrongly-formed context and the model can't perform; too much or irrelevant context and quality degrades and cost rises.

Workflow

Follow these four steps in order.

Step 1 — Diagnose the raw prompt

Read the user's original prompt or request and determine:

  1. Target type — Is this a one-off prompt for a chat assistant, or a reusable system prompt / API instruction? Cues: "system prompt", "for my app", "API", "agent" → system prompt. Otherwise default to a chat prompt. If building a system prompt, also identify what the user turns will contain.
  2. Task type — generation (writing, code), transformation (summarize, translate, rewrite), extraction/analysis, classification, conversation/roleplay, or agentic/multi-step.
  3. Component audit — Check the raw prompt against the context component checklist below. Mark each component as PRESENT, INFERABLE (you can supply a sensible default), or UNCLEAR (genuinely ambiguous and materially affects the output).

Context component checklist:

ComponentWhat it answers
Task definitionWhat exactly should the model do? What does "done" look like?
Role / perspectiveWhat expertise or persona should the model adopt, if any?
Background / dataWhat facts, documents, or domain knowledge does the task depend on?
AudienceWho consumes the output, and at what expertise level?
Examples (few-shot)Would 1–3 input→output examples disambiguate the task?
ConstraintsLength, tone, scope, things to avoid, edge-case handling
Output formatStructure: prose, list, JSON, table, markdown, specific template
State / historyFor multi-turn or agentic prompts: what prior state must be carried?
Success criteriaHow will the user judge whether the output is good?

Not every prompt needs every component. A component is only worth including if its absence would plausibly change the output. Adding components a task doesn't need is itself a context engineering failure — it dilutes the signal.

Step 2 — Resolve gaps (infer first, ask rarely)

For each missing component:

  • INFERABLE → supply a sensible default. Choose what a thoughtful expert would assume given the task and any conversation context. Record every inference you make.
  • UNCLEAR → only mark a component UNCLEAR when reasonable defaults would diverge wildly (e.g., "write something about our product" — for whom? marketing copy or internal docs?). These get an open question.

Then, before writing the final prompt, present a single compact confirmation block:

  • List your inferences as yes/no confirmations, batched together (aim for 2–4, never more than 5). Example: "I've assumed: (1) audience is non-technical executives — yes? (2) output should be under one page — yes? (3) formal tone — yes?"
  • Append any open questions for the UNCLEAR items (at most 1–2).
  • If an interactive question/options tool is available in the environment, use it for this step; otherwise ask in plain text.

If the user confirms everything or doesn't care ("just go ahead"), proceed with the inferences. If the raw prompt is already complete and unambiguous, skip the questions entirely and go straight to Step 3 — don't manufacture questions for their own sake.

Exception — speed mode: if the user says anything like "don't ask, just rewrite it", skip all questions, infer everything, and list the assumptions beneath the finished prompt instead.

Step 3 — Engineer the prompt

Assemble the structured prompt. Apply these principles:

  1. Right information, right form. Every section earns its place. Cut anything the model doesn't need for this task. A concise summary of background beats a dump of raw material.
  2. Structure with clear delimiters. Use labeled sections. For prompts aimed at Claude, XML-style tags are the strongest delimiter (<task>, <context>, <examples>, <output_format>). Markdown headers are an acceptable alternative if the user prefers. Separate instructions from data — never interleave them.
  3. Instructions before data, format last. Order sections: role → task → background/context → examples → constraints → output format. Put long documents/data in their own clearly-tagged block.
  4. Examples over adjectives. One concrete input→output example beats three sentences of description. Include examples whenever the task has a non-obvious style or format. Write realistic, minimal examples — not bloated ones.
  5. Positive instruction. Say what to do, not only what to avoid. "Write in plain conversational sentences" beats "don't be too formal".
  6. Make success checkable. Where possible, state acceptance criteria the user (or the model itself) can verify.
  7. Placeholders for variable inputs. In reusable/system prompts, mark slots with {{VARIABLE_NAME}} and explain each slot briefly.
  8. Compression pass. Re-read the draft and delete redundant or low-value lines. Shorter prompts with high information density outperform long diluted ones.

Use the template skeletons in references/templates.md as starting points — read that file when you reach this step, pick the skeleton matching the task type, and adapt it. Don't force a skeleton onto a task it doesn't fit.

Step 4 — Deliver

Present the result in this structure:

  1. The engineered prompt in a single fenced code block so it can be copied in one click. Nothing else inside the block.
  2. What changed — 2–4 sentences (not bullets) explaining the most important structural improvements and why they matter for output quality.
  3. Assumptions made — only if any inferences were not yet confirmed; one short line each.
  4. Optional tuning levers — at most 2 suggestions for components the user could add later (e.g., "adding 2 real examples of past reports would lock in the format"), only if genuinely valuable.

Keep the commentary brief. The prompt is the deliverable; the explanation is a footnote.

Quality bar

A successfully engineered prompt should pass this self-check before delivery:

  • Could a capable model with no other context produce the desired output from this prompt alone?
  • Is every sentence in the prompt load-bearing? (If a line could be deleted without changing the output, delete it.)
  • Are instructions and data clearly separated?
  • Is the desired output format unambiguous?
  • Is it the user's intent, not a generic improvement? (The engineered prompt must stay faithful to what they asked for — don't expand scope.)

What this skill is not

  • It does not answer the original prompt. If the user says "improve this prompt: summarize this article", produce a better prompt — don't summarize the article. If intent is ambiguous (they pasted a prompt with no instruction), ask one short question: "Do you want me to restructure this as a prompt, or answer it?"
  • It does not pad. If the raw prompt is already excellent, say so, make only marginal improvements, and keep it short.

Tệp đi kèm

Khi kỹ năng đã được tải, mô hình có thể đọc các tệp này nếu cần. Các tệp này chỉ dùng để đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Prompt Context Engineer làm được gì?

Biến mọi prompt, yêu cầu hoặc ý tưởng còn sơ sài thành prompt được cấu trúc tốt, thiết kế ngữ cảnh theo các nguyên tắc kỹ thuật thiết kế ngữ cảnh của Andrej Karpathy. Dùng kỹ năng này khi người dùng yêu cầu cải thiện, viết lại, cấu trúc lại, tối ưu hóa hoặc “thiết kế” một prompt; nhắc đến kỹ thuật viết prompt hoặc thiết kế ngữ cảnh; dán prompt và muốn làm cho prompt tốt hơn; cần trợ giúp viết prompt hệ thống hoặc hướng dẫn cho AI; hoặc nói những câu như “biến cái này thành một prompt hay”, “làm cho prompt này hiệu quả hơn” hay “Claude không hiểu ý tôi với prompt này”. Cũng dùng khi người dù...

Vì sao nên dùng Prompt Context Engineer trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Prompt Context Engineer là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Prompt Context Engineer trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/pnp/copilot-prompts/tree/main/samples/skills/prompt-context-engineer. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm rồi cài đặt cả gói dưới dạng một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Prompt Context Engineer?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Prompt Context Engineer với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Prompt Context Engineer với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Prompt Context Engineer có miễn phí không?

Có. Kỹ năng này được pnp phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇