Logo de Hai Rewrite Doc

Hai Rewrite Doc

Comunidade
hylarucoder
hai-rewrite-doc

Rebuilds a drifted, repeatedly patched document from verified current conclusions. It inventories old blocks, preserves verified wording, removes disproved material, writes authoritative replacement coverage only from verified sources, and reports keep/delete/replace/undecided dispositions. Use when the user wants a rotten document verified and rewritten rather than patched again(按最新结论重写、逐条核实、推倒重写). Use hai-prd for PRDs, hai-goal for plans, and a document-audit skill when no rewrite is requested.

Visão geral

Publicado porhylarucoder
Repositóriohai-stack
Nome da habilidadehai-rewrite-doc
Estrelas
284
Forks
15
Arquivos incluídos
2
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

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

  • 2 arquivos incluídos

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

  • Código aberto

    Publicada por hylarucoder no GitHub. Leia o conteúdo-fonte antes de instalar.

Instalação

Instale a habilidade de IA Hai Rewrite Doc 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 da pasta da habilidade exibida abaixo e confirme.
    https://github.com/hylarucoder/hai-stack/tree/main/skills/hai-rewrite-doc
  4. Ative a habilidade em cada chat em que quiser disponibilizá-la.
Plugins → Habilidades → Nova habilidade → Via URL 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/hylarucoder/hai-stack.git /tmp/hai-stack
mkdir -p .claude/skills
cp -r /tmp/hai-stack/skills/hai-rewrite-doc .claude/skills/hai-rewrite-doc
Reinicie Claude Code após copiar para que a nova habilidade seja reconhecida.

Use no TypingMind

Ative Hai Rewrite Doc 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 Hai Rewrite Doc 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, Hai Rewrite Doc 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á.

Hai Rewrite Doc

For Chinese readers, see SKILL.zh_CN.md. The English SKILL.md is the execution source of truth.

Overview

Take one document that has rotted through rounds of discussion and patching, verify it block by block, and rewrite it around what survives. The old document is raw material and evidence — never the base to patch.

The default stance toward old content is preservation: every block gets verified and what passes keeps its wording. A failed block is never patched from guesswork; delete it, or replace its coverage only when the anchor or another authoritative source supplies the correction.

Verification runs at two levels: macro (frontmatter, title, purpose) and micro (individual claims, tables, commands, and examples). Both use the same evidence rules.

Deliver the rewritten document, a disposition verdict for every old block, and the open questions that cannot be verified without the user.

Core Principle

A document rots because the real consensus lives in the conversation while the document only receives patches — and each patch was written against a different snapshot of that consensus. More patching cannot fix this. The fix is to make the consensus explicit first, then re-derive the document from it.

So the order is fixed: anchor first, then rewrite. Never start writing before the anchor is written down, and never merge old text into the new document without a verdict.

And verdicts are earned by verification, not by smell. A claim that can be checked — against the anchor, the codebase, a config file, a schema, a runnable command — must actually be checked before it is kept or deleted. A claim that cannot be checked is never silently kept or dropped; it goes to Open Questions.

Verification failure forbids guessed repair. A disproved block cannot be paraphrased into a plausible-looking correction. Delete it when the topic is no longer needed; use Replace when a verified anchor, contract, code path, or other named authority supplies the correct coverage; use Undecided when no authority settles it.

Workflow

  1. Build the anchor. Collect the conclusions that are true now: decisions made, decisions later reversed (the reversal wins), constraints still standing, and the document's target reader and job. Sources: the user's message, the discussion history, linked docs. Write the anchor as a numbered list of conclusions — it ships in the output so the reader can check the rewrite against it.

  2. Interrogate the holes. If the anchor cannot answer "who is this document for" or "what did we finally decide about X", ask the user pointed questions before writing anything. A rewrite from a guessed anchor just produces the next rotten version.

  3. Inventory the old document. Split it into blocks (sections, claims, tables, examples, commands, numbers). The inventory exists so that every block gets verified — none skipped.

  4. Verify at two levels: macro first, then micro.

    • Macro — the document's frame. Verify the frontmatter/YAML metadata, title, stated purpose, and top-level framing before anything else. A frame that no longer fits the current scenario, or has simply fallen behind it, fails like any other block: remove it (replacement framing comes from the anchor). And a failed frame casts suspicion downward — content that existed only to serve the dead frame must be re-verified against the anchor, not against the frame.
    • Micro — every point, one by one. Check each block against the anchor, then against anything else checkable: the code, config, schema, the commands and paths it cites, linked documents. List-heavy documents are where rot hides: a list is never verified wholesale — it passes only when every item in it has passed individually, and failed items are removed individually.

    Record what was checked at both levels — the disposition table cites it.

  5. Give every block exactly one verdict:

    • Keep — verified still true; reuse it with the original wording and voice.
    • Delete — failed verification and no longer needed. Cite the failed check.
    • Replace — the old block failed, but a named authoritative source supplies necessary, verified replacement coverage. Cite both the failure and replacement source.
    • Undecided — unverifiable without the user; park it in Open Questions. Never silently keep or drop it.
  6. Decide the structure deliberately. Keep the old structure when it still serves the anchor — preservation extends to structure, not only wording. Re-derive it from the anchor only when the structure itself is patch residue.

  7. Write the new document in full. It must stand alone — a reader with no access to the discussion history should understand it. Match the original language and register unless the anchor changes the audience.

  8. Check the rewrite against the anchor, item by item. Every anchor conclusion is represented; everything in the new document traces to the anchor or to a Keep verdict. Anything that fails this check gets fixed or moved to Open Questions.

Output and file safety

Read references/output-template.md before finalizing. Edit the original in place only when the user explicitly targeted that file for modification and a recoverable history such as version control exists. Otherwise write a clearly named sibling or user-specified output and leave the source untouched. Report the actual path and whether the original changed.

Use a different skill when

  • The user wants a findings report, not a rewritten document — use hai-audit-docs.
  • A code-backed rewrite stays here when reconstruction is requested; use hai-audit-docs only for an audit or bounded repair. Reuse its evidence rather than repeating verification.
  • The document is a PRD — use hai-prd; its Craft mode owns PRD repair and rewrite.
  • The document is a plan or goal document — use hai-goal; its rewrite mode re-anchors plans around a target.
  • Only structure and formatting are wrong and the content is fine — use readme-beautifier.
  • The real question is which concepts deserve to exist at all — run hai-razor first, then rewrite.

What this skill is NOT

  • Not a beautifier — it changes content and judgment, not just formatting.
  • Not a patch merger — it never produces "the old doc plus the latest edits".
  • Not a summarizer — the output is a full working document, not a digest.
  • Not a fresh composition — verified-true content is preserved, not paraphrased.
  • Not a guess-based repair shop — replacement text must trace to a verified authority.
  • Not silent — nothing from the old document disappears without a line in the disposition table.

Common Mistakes

  • Writing before the anchor is explicit — the rewrite inherits guesses instead of conclusions.
  • Judging blocks by smell instead of checking them — checkable claims get checked.
  • Passing a list wholesale — a list passes only when every item in it passed individually.
  • Skipping the frame because it "looks structural" — stale frontmatter/YAML metadata fails and gets removed like any other block.
  • Repairing a failing block from intuition. Delete it or replace it from a cited authority.
  • Deleting without citing the check that failed; a Delete verdict is earned, not asserted.
  • Treating "it was discussed once" as consensus; only the latest standing decision counts.
  • Silently dropping blocks instead of recording a Delete verdict.
  • Rewriting Keep blocks anyway and destroying the author's voice.

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 Hai Rewrite Doc faz?

Rebuilds a drifted, repeatedly patched document from verified current conclusions. It inventories old blocks, preserves verified wording, removes disproved material, writes authoritative replacement coverage only from verified sources, and reports keep/delete/replace/undecided dispositions. Use when the user wants a rotten document verified and rewritten rather than patched again(按最新结论重写、逐条核实、推倒重写). Use hai-prd for PRDs, hai-goal for plans, and a document-audit skill when no rewrite is requested.

Por que usar Hai Rewrite Doc no TypingMind?

Porque basta instalar uma vez para usar com qualquer modelo. Hai Rewrite Doc é escrito 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. O TypingMind usa suas próprias chaves de API, então o pagamento é feito diretamente aos provedores, em vez de uma assinatura por licença de usuário, e suas habilidades e chats permanecem no seu próprio armazenamento.

Como instalar Hai Rewrite Doc no TypingMind?

Abra Plugins → Habilidades → Instalar do GitHub no TypingMind e cole https://github.com/hylarucoder/hai-stack/tree/main/skills/hai-rewrite-doc. 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 Hai Rewrite Doc?

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 Hai Rewrite Doc?

Quantos quiser. Desde que o modelo ofereça suporte a habilidades, é possível usar Hai Rewrite Doc 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 Hai Rewrite Doc é gratuita?

A habilidade é publicada no GitHub por hylarucoder. Consulte os termos de licenciamento no repositório. 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, modelos de documento 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 para chamar — código que é executado em algum lugar e retorna um resultado. Já uma habilidade de IA fornece conhecimento e um processo ao modelo: 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 todos

Crie seu próprio espaço de IA agora

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