Logo de Prompt Engineering

Prompt Engineering

Comunidade
liqiongyu
prompt-engineering

Manual-first workflow skill for redesigning, debugging, hardening, or productionizing LLM prompts and system prompts. Use when the user needs end-to-end prompt work such as stabilizing behavior, migrating across models, or preparing a prompt for production. Do not use for quick technique lookup or for general LLM-powered coding tasks.

Visão geral

Publicado porliqiongyu
Repositóriomy-agents
Nome da habilidadeprompt-engineering
Estrelas
29
Forks
3
Arquivos incluídos
8
LicençaMIT
Links
  • Instruções em Markdown

    Um arquivo SKILL.md que o modelo carrega sob demanda, consumindo tokens apenas quando uma solicitação é realmente relevante para a habilidade.

  • Funciona com qualquer LLM

    As habilidades de IA são escritas em Markdown simples, não em código específico de um provedor. Por isso, funcionam com GPT, Claude, Gemini, Grok ou um modelo local.

  • Arquivos incluídos: 8

    Scripts, templates e referências que o modelo pode ler enquanto trabalha. Os arquivos são somente para leitura e nunca são executados.

  • Código aberto

    Publicada por liqiongyu no GitHub. Leia os arquivos da habilidade antes de instalá-la.

Instalação

Instale a habilidade de IA Prompt Engineering no TypingMind para usá-la com qualquer LLM ou adicione-a a outro agente que leia SKILL.md.

1

Instalar no TypingMind

O TypingMind instala uma habilidade diretamente da pasta dela no GitHub — lê o arquivo SKILL.md, reúne os arquivos de recursos em um pacote e armazena o resultado localmente.

  1. Abra o app e vá para Plugins → Habilidades.
  2. Escolha "Instalar do GitHub".
  3. Cole a URL abaixo, que aponta para a pasta da habilidade, e confirme.
    https://github.com/liqiongyu/my-agents/tree/main/skills/prompt-engineering
  4. Ative a habilidade em cada chat em que quiser disponibilizá-la.
Plugins → Habilidades → Adicionar habilidade → Via URL do GitHub. Depois, cole a URL da pasta e pressione Continuar.
2

Instalar em outro agente

Qualquer agente que leia o formato Agent Skills pode usar esta habilidade — copie a pasta para o diretório de habilidades desse agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/liqiongyu/my-agents.git /tmp/my-agents
mkdir -p .claude/skills
cp -r /tmp/my-agents/skills/prompt-engineering .claude/skills/prompt-engineering
Reinicie Claude Code após copiar para que a nova habilidade seja reconhecida.

Use no TypingMind

Ative Prompt Engineering em qualquer chat do TypingMind e o modelo cuida do resto. O nome e a descrição da habilidade ficam no prompt do sistema e, assim que uma solicitação relevante aparece, o modelo carrega as instruções completas automaticamente — sem precisar de acionamento manual e sem consumir tokens até que ela seja realmente usada.

O modelo carrega Prompt Engineering automaticamente assim que uma solicitação é relevante para essa habilidade.

Funciona com qualquer modelo de IA

Habilidades de IA são instruções em Markdown simples, não código específico de um provedor. Por isso, Prompt Engineering não fica vinculada ao modelo para o qual foi criada. Instale-a uma vez no TypingMind e use-a com GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama ou um modelo local executado por conta própria — tudo com suas próprias chaves de API.

  • Carregada apenas quando necessário

    O prompt do sistema contém apenas o nome e a descrição. As instruções são buscadas na primeira solicitação relevante, então uma habilidade sem uso não gera custo.

  • Troque de modelo durante a conversa

    Como a habilidade é composta de instruções, não de código, trocar de modelo não afeta seu funcionamento — o próximo modelo lê o mesmo arquivo SKILL.md.

Instruções da habilidade

Este é o conteúdo de SKILL.md que o modelo carrega. Leia antes de instalar — uma habilidade é um conjunto de instruções que seu modelo seguirá.

Prompt Engineering

Use this skill when prompt work needs an actual workflow: define success, draft or repair the prompt, test it on real inputs, and harden it for the target model and operating environment.

This skill is intentionally workflow-first. It is for prompt jobs with real tradeoffs, failure modes, or rollout concerns. It is not meant to be a general prompt encyclopedia.

Invocation posture: manual-first. This skill is broad and relatively heavy, so false positives are more harmful than occasional misses.

When Not To Use

  • Quick technique lookup such as "what is chain-of-thought?" or "show me a few-shot template"
  • Explaining an existing prompt line by line without redesigning or validating it
  • General coding, product, or research work that only happens to involve an LLM somewhere in the stack
  • Tiny one-off prompt tweaks where no real evaluation, migration, or hardening decision is needed

When To Activate

  • Drafting a new prompt or system prompt from requirements
  • Debugging a prompt that is inconsistent, verbose, unsafe, or hard to steer
  • Migrating prompt behavior between Claude, GPT, Gemini, or open-source models
  • Hardening an agent prompt against injection, tool misuse, or output drift
  • Turning an ad hoc prompt into a reusable template, chain, or production asset
  • Setting up a realistic evaluation plan for prompt quality, format adherence, latency, or cost

Outputs

Depending on the request, produce one or more of:

  • a revised prompt or system prompt
  • a failure-mode diagnosis with targeted fixes
  • a cross-model migration checklist
  • a prompt evaluation plan with representative test cases
  • a production hardening checklist for output control, safety, and monitoring

Reference Files

Keep the main workflow lean. Read deeper references only when the task needs them.

ReferenceWhen to read
references/advanced-reasoning.mdYou need structured reasoning patterns such as CoT, ToT, ReAct, self-consistency, or self-refine
references/cross-model-guide.mdYou are migrating prompts across Claude, GPT, Gemini, or open-source models
references/production-patterns.mdYou need versioning, evaluation, caching, rollout, monitoring, or prompt-chain design
references/security-patterns.mdYou are handling untrusted input, tool use, prompt injection, or output validation

Core Workflow

Workflow 1: Scope The Prompt Job

Before rewriting anything, pin down:

  1. The task and the exact output shape
  2. What "good" looks like with 3-5 representative examples
  3. The constraints: model, context budget, latency, cost, determinism, safety
  4. The current failure modes: wrong format, wrong content, instability, unsafe behavior, or cross-model drift

Always collect at least:

  • one happy-path input
  • one edge case
  • one adversarial or malformed case

If you cannot explain what success means, do not jump into fancy prompting techniques yet.

Workflow 2: Draft Or Repair With Minimum Necessary Complexity

Start with the smallest change that could plausibly fix the problem, then escalate only if the evidence says you need more structure.

LevelDefault moveUse when
L1Clear direct instructionFirst pass for almost every task
L2Add explicit constraints and output formatThe model drifts on brevity, style, or schema
L3Add examplesThe model still misclassifies, misformats, or misses edge cases
L4Add reasoning scaffoldThe task needs multi-step analysis or error checking
L5Split into a chain or reusable templateIntermediate validation or multi-stage processing matters

Use this structure by default:

text
[Role or system context]
[Task instructions]
[Examples, if needed]
[Input data]
[Output format]

Keep model-specific features explicit and removable. Do not bury XML tags, prefilling tricks, or vendor-specific schema APIs inside a supposedly model-agnostic prompt.

Workflow 3: Evaluate On Real Work

Treat prompt changes like code changes:

  1. Record a baseline on representative inputs
  2. Change one variable at a time when possible
  3. Re-run the same cases on the revised prompt
  4. Compare:
    • task accuracy or usefulness
    • format compliance
    • consistency across repeated runs
    • latency and token cost
  5. Keep notes on what changed, why, and what improved

If the task involves model migration, re-test on the target model directly. Do not assume prompt portability just because two models are both strong.

Workflow 4: Productionize And Harden

When the prompt is headed toward repeated or user-facing use:

  • version the prompt and template variables
  • prefer API-level structure enforcement when the platform supports it
  • isolate untrusted input from instructions
  • restate critical boundaries when injection risk exists
  • validate outputs before downstream actions depend on them
  • define rollback or fallback behavior for high-impact uses
  • monitor drift, edge cases, and cost regressions over time

Technique Selection Guide

Use the lightest tool that matches the problem.

NeedDefault moveRead next
Reliable structured outputShow the exact format first; use schema enforcement when availablereferences/production-patterns.md, references/cross-model-guide.md
Stronger analytical reasoningPrefer model-native reasoning first; add a structured scaffold only if neededreferences/advanced-reasoning.md
Cross-model migrationRemove vendor-specific tricks, normalize delimiters, then re-test on the target modelreferences/cross-model-guide.md
Injection resistanceIsolate data, repeat critical constraints, and validate outputsreferences/security-patterns.md
Multi-step pipelineSplit into a chain only when intermediate validation adds valuereferences/production-patterns.md

Validate And Evaluate

This canonical package ships a lightweight eval suite under eval/ for realistic prompt-work scenarios.

When updating the canonical skill in this repo, validate the package and eval fixture before projecting:

bash
uv run python skills/skill-lifecycle-manager/scripts/quick_validate.py skills/prompt-engineering
uv run python skills/skill-lifecycle-manager/scripts/validate_eval_suite.py skills/prompt-engineering/eval/eval-cases.json

For behavioral review, run the cases in eval/eval-cases.json as realistic tasks and check whether the response:

  • defines success before rewriting
  • proposes the smallest effective prompt change
  • calibrates advice to the target model or runtime
  • includes a concrete validation plan
  • treats safety and output control explicitly when risk is present

Projection And Install Notes

Treat skills/prompt-engineering/ as the canonical package. Generate runtime surfaces from it rather than hand-editing copies:

bash
uv run python skills/skill-lifecycle-manager/scripts/project_skill.py skills/prompt-engineering --platform all
uv run python skills/skill-lifecycle-manager/scripts/validate_projection.py skills/prompt-engineering --platform all

projection.json excludes author-only evaluation artifacts from runtime projections so Codex and Claude Code only receive the execution-relevant package.

Best Practices

  1. Start with the smallest prompt change that could fix the failure.
  2. Measure on representative inputs before and after edits.
  3. Keep model-specific tricks explicit and easy to remove.
  4. Prefer API-level structure enforcement over prompt-only formatting when the platform supports it.
  5. Treat prompts as versioned artifacts, not disposable chat snippets.

Common Pitfalls

PitfallWhy it hurtsFix
Jumping to exotic techniques too earlyComplexity hides the real failure modeDefine success and start at the lowest effective level
Shipping without negative casesEdge failures appear only in productionTest happy-path, edge, and adversarial inputs
Assuming prompt portabilityVendor behaviors diverge in subtle waysRe-test on the target model and remove model-specific tricks
Mixing trusted instructions with untrusted dataInjection risk rises sharplyDelimit, isolate, and restate boundaries
Changing many variables at onceYou cannot tell what improvedRun one targeted fix at a time where practical

Arquivos incluídos

O modelo lê esses arquivos sob demanda enquanto a habilidade está carregada. Eles são disponibilizados para leitura e nunca são executados.

Perguntas frequentes

O que a habilidade de IA Prompt Engineering faz?

Manual-first workflow skill for redesigning, debugging, hardening, or productionizing LLM prompts and system prompts. Use when the user needs end-to-end prompt work such as stabilizing behavior, migrating across models, or preparing a prompt for production. Do not use for quick technique lookup or for general LLM-powered coding tasks.

Por que usar Prompt Engineering no TypingMind?

Porque basta instalar uma vez para usar com qualquer modelo. A habilidade Prompt Engineering é escrita em Markdown simples, e não em código específico de um provedor, então a mesma habilidade funciona com GPT-5, Claude, Gemini, Grok ou um modelo local — e é possível trocar de modelo no meio do chat sem que ela deixe de funcionar. No TypingMind, você usa suas próprias chaves de API e paga diretamente aos provedores, em vez de pagar uma assinatura por licença de usuário. Suas habilidades e chats permanecem no seu próprio armazenamento.

Como instalar Prompt Engineering no TypingMind?

Abra Plugins → Habilidades → Instalar do GitHub no TypingMind e cole https://github.com/liqiongyu/my-agents/tree/main/skills/prompt-engineering. O TypingMind lê o arquivo SKILL.md, reúne os arquivos da habilidade e a instala para que possa ser ativada em cada chat.

Quais modelos de IA podem usar Prompt Engineering?

Qualquer modelo conectado no TypingMind. As habilidades de IA são instruções em Markdown simples, e não código específico de um provedor. Assim, GPT, Claude, Gemini, Grok e modelos locais podem carregar esta habilidade quando uma solicitação corresponder a ela.

Quantos modelos de IA posso usar com Prompt Engineering?

Quantos quiser. Desde que o modelo ofereça suporte a habilidades, é possível usar Prompt Engineering com ele — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e outros — tudo no TypingMind com suas próprias chaves de API.

A habilidade de IA Prompt Engineering é gratuita?

Sim. A habilidade é publicada no GitHub por liqiongyu sob a licença MIT. O pagamento é feito apenas ao seu provedor de IA pelos tokens usados.

O que são habilidades de IA?

Uma habilidade de IA é um conjunto reutilizável de instruções que ensina um modelo de IA a realizar uma tarefa específica. Ela segue o formato aberto Agent Skills: um arquivo SKILL.md com nome e descrição, além de scripts, templates ou arquivos de referência de que o modelo possa precisar. O modelo lê as instruções apenas quando sua solicitação corresponde à habilidade, então uma habilidade instalada não gera custos até ser usada.

Qual é a diferença entre habilidades de IA e plugins ou servidores MCP?

Um plugin ou servidor MCP oferece ao modelo novas ferramentas que ele pode acionar — código que é executado em algum lugar e retorna um resultado. Já uma habilidade de IA dá ao modelo o conhecimento e as orientações de que ele precisa: como abordar uma tarefa, quais etapas seguir e como deve ser um bom resultado. As habilidades são escritas em Markdown simples, por isso não precisam de servidor, chave de API nem ambiente de execução, e funcionam com qualquer modelo.

Ver lista completa

Crie seu próprio espaço de trabalho com IA agora

Inscreva-se na nossa newsletter para receber avisos sobre novos recursos e futuros sorteios 👇