Logo de Lathe Work

Lathe Work

ComunidadePopular
devenjarvis
lathe-work

Execute o loop de trabalho do Lathe para que os botões Ask / Verify / Add-a-part da interface web iniciem o trabalho diretamente nesta sessão, em vez de fornecer um comando para copiar e colar. Use quando o usuário executar /lathe-work (inicie uma vez por sessão enquanto `lathe serve` estiver em execução). Funciona com qualquer agente de programação.

Add to TypingMind

Visão geral

Publicado pordevenjarvis
Repositóriolathe
Nome da habilidadelathe-work
Estrelas
1.7K
Forks
49
Arquivos incluídos
Somente instruções
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.

  • Sem arquivos extras

    Tudo de que o modelo precisa está nas instruções — sem arquivos extras para sincronizar.

  • Código aberto

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

Instalação

Instale a habilidade de IA Lathe Work 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/devenjarvis/lathe/tree/main/internal/skills/data/lathe-work
  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/devenjarvis/lathe.git /tmp/lathe
mkdir -p .claude/skills
cp -r /tmp/lathe/internal/skills/data/lathe-work .claude/skills/lathe-work
Reinicie Claude Code após copiar para que a nova habilidade seja reconhecida.

Use no TypingMind

Ative Lathe Work 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 Lathe Work 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, Lathe Work 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á.

Lathe — Worker Loop

Start a long-running loop that lets the lathe serve web UI drive Ask, Verify, and Add-a-part directly in this session. With this loop running, the browser buttons enqueue a job and you pick it up here — no copy-paste of a /lathe-* command. Triggered by /lathe-work.

This is just long-poll → do the model work → report → repeat, so it works in any supported coding agent. The strict boundary still holds: the binary never drives a model. All model work runs here, in your normal interactive session — never via -p / headless. Verify runs the tutorial's code under exactly the same trust model as /lathe-verify does today (a fresh mktemp -d, your normal permissions).

When this loop is not running, the buttons fall back to today's copy-paste handoff — so starting it is purely additive.

Prerequisite

lathe serve must be running (the loop talks to it via ~/.lathe/serve.json). If lathe work next reports "no lathe server is running", tell the user to start lathe serve in another terminal, then start the loop.

The loop

Repeat until the user stops you (Ctrl-C, "stop the worker", or closing the session):

  1. Claim the next job:

    bash
    lathe work next

    This long-polls (~50s) and prints either no task or a single JSON object like:

    json
    {"id":"7","type":"verify","slug":"digital-synth-zig","part":"part-02.md","question":"…","guidance":"…","state":"claimed"}
    • If it prints no task, loop back to step 1 immediately — that's just an idle long-poll, not an error.
    • Otherwise parse the JSON and note id, type, slug, and (depending on type) part/question/guidance.
  2. Dispatch on type, applying the existing protocol as the source of truth — don't duplicate or paraphrase it, apply it:

    • verify → apply the /lathe-verify protocol against slug exactly as written (it marks the tutorial verifying, follows it in a fresh scratch dir, and records the outcome via lathe verify-result). When it finishes, close the job:

      bash
      lathe work done <id>
    • extend → apply the /lathe-extend protocol against slug, passing guidance (when present) as the guidance for where the new part should go. It does the full reserve → write → lathe extend-commit handshake. When it finishes, close the job:

      bash
      lathe work done <id>
    • ask → apply the /lathe-ask protocol against slug / part / question. The one difference from the chat flow: the reader is in the browser, not here, so return the answer through the CLI instead of only replying in chat. Pipe your full markdown answer to:

      bash
      lathe work answer <id> --answer -

      (--answer - reads the answer from stdin, the same stdin pattern lathe voice add --file - uses.) The browser is polling for it and will render it in the reader's Ask drawer. work answer closes the job for you — don't also call work done for an ask.

  3. Briefly note in chat what you just handled (e.g. "Verified digital-synth-zig — clean" or "Answered a question on part-02"), then loop back to step 1.

Keeping the loop responsive and its context small

This loop is long-running and each job is independent — nothing carries over from one job to the next — so keep the dispatcher thin and don't let it block or accumulate full job transcripts.

  • Dispatch each job to a fresh sub-context, in the background if you can (best). When you can spawn a sub-task/subagent with its own context window (e.g. Claude Code subagents), run each claimed job there: the sub-task applies the matching /lathe-* protocol and closes the job itself (lathe work done / lathe work answer). Two payoffs: the dispatcher's context grows by a sentence per job instead of a whole verify/extend transcript, and — crucially — if your agent can run the sub-task in the background (e.g. run_in_background), do that and immediately go back to lathe work next instead of waiting on it. The sub-task self-reports, so the loop never needs its return value; meanwhile your continued polling keeps worker presence fresh during a long verify/extend (a foreground/blocking dispatch would stop polling and let presence lapse, so a mid-job button click would fall back to copy-paste). Keep the outer loop to just: claim → fire the job into a background sub-context → poll again.
  • If you can't background sub-tasks, process one job at a time — that's fine, the loop simply isn't concurrent. Foreground each job, report it, then poll again.
  • Lean on auto-compaction and restart periodically as a backstop. If sub-contexts aren't available at all, your agent's automatic context compaction will keep the loop alive, but it's lossy — so periodically stop and re-run /lathe-work to reset. This is safe and lossless: the queue lives in the server, so any unclaimed job stays queued and a mid-flight claimed job is re-queued after the reclaim timeout. Nothing is lost by restarting.

Boundaries

  • Reuse the protocols, don't reinvent them. Each job type is just "run the matching /lathe-* skill, then report." All the real rules (read-only verify, the extend handshake, grounded ask answers) live in those skills and win on any conflict.
  • Always close the job. verify/extend → lathe work done <id>; ask → lathe work answer <id> --answer - (which closes it). A job left open ties up the browser until the server's reclaim timeout.
  • Interactive session only. Never shell out to -p / headless to do the work — that's the metered path this whole design avoids.
  • Sequential or concurrent — match your harness. Without background sub-tasks, finish and report each job before claiming the next. With them, several jobs may be in flight at once; that's fine and keeps presence fresh. Concurrency is safe: the server rejects a second verify/extend on a tutorial that's already verifying/extending, so two jobs can't collide on the same slug, and ask jobs are read-only.

Stop

Stop the loop when the user asks (or close the session). Stopping is safe: the buttons revert to the copy-paste handoff, and any job already claimed but not closed is re-queued by the server after its reclaim timeout.

Perguntas frequentes

O que a habilidade de IA Lathe Work faz?

Execute o loop de trabalho do Lathe para que os botões Ask / Verify / Add-a-part da interface web iniciem o trabalho diretamente nesta sessão, em vez de fornecer um comando para copiar e colar. Use quando o usuário executar /lathe-work (inicie uma vez por sessão enquanto `lathe serve` estiver em execução). Funciona com qualquer agente de programação.

Por que usar Lathe Work no TypingMind?

Porque basta instalar uma vez para usar com qualquer modelo. A habilidade Lathe Work é 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 Lathe Work no TypingMind?

Abra Plugins → Habilidades → Instalar do GitHub no TypingMind e cole https://github.com/devenjarvis/lathe/tree/main/internal/skills/data/lathe-work. O TypingMind lê o arquivo SKILL.md e instala a habilidade para que possa ser ativada em cada chat.

Quais modelos de IA podem usar Lathe Work?

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 Lathe Work?

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

Sim. A habilidade é publicada no GitHub por devenjarvis 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 👇