Logo de Sync Docs

Sync Docs

Comunidade
richkuo
sync-docs

Use when the user asks to sync, update, or refresh CLAUDE.md, AGENTS.md, SKILL.md, and README.md to reflect recent commits or PRs. Triggers on phrases like "sync docs", "update CLAUDE.md", "update AGENTS.md", "update SKILL.md", "update README", "reflect recent changes", or "document the recent PRs".

Visão geral

Publicado porrichkuo
Repositóriork-skills
Nome da habilidadesync-docs
Estrelas
50
Forks
8
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

    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.

  • Completa em si mesma

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

  • Código aberto

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

Instalação

Instale a habilidade de IA Sync Docs 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/richkuo/rk-skills/tree/main/skills/sync-docs
  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/richkuo/rk-skills.git /tmp/rk-skills
mkdir -p .claude/skills
cp -r /tmp/rk-skills/skills/sync-docs .claude/skills/sync-docs
Reinicie Claude Code após copiar para que a nova habilidade seja reconhecida.

Use no TypingMind

Ative Sync Docs 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 Sync Docs 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, Sync Docs 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á.

sync-docs

Keep CLAUDE.md, AGENTS.md, SKILL.md, and README.md accurate after new commits land: find the last docs-sync point, classify every commit since then, and write targeted edits. Syncing is bidirectional: add what is new, and remove or correct anything the current codebase contradicts.

Edit the docs that exist; never create a new top-level doc (AGENTS.md, CHANGELOG.md, SKILL.md) during a sync. If one seems warranted, tell the user.

Audiences: CLAUDE.md is the dense agent reference (architecture, symbol and file names, file:line cues) and describes current behavior, never history. AGENTS.md mirrors it for other agent tools (step 5). SKILL.md is operator-facing and imperative (config keys, setup, CLI flows); no symbol or field names in its tables. README.md is the newcomer entry point and changes only when the public surface changes. CHANGELOG.md, when present, holds per-issue rationale and migration history.

Preconditions: gh auth status succeeds. Resolve DEFAULT=$(gh repo view --json defaultBranchRef -q .defaultBranchRef.name), run git fetch origin, record the range end T0=$(git rev-parse "origin/$DEFAULT"), and create a worktree off that tip with the harness branch prefix (cc/ on Claude Code): git worktree add .claude/worktrees/cc+sync-docs-<YYYY-MM-DD> -b cc/sync-docs-<YYYY-MM-DD> "$T0". Every range below ends at $T0, never at a later origin/$DEFAULT. When that branch already exists locally or on origin, never delete or reuse it: add the next free suffix to the branch and the worktree name (-2, then -3). Read, edit, and run every git command in that worktree (-C <worktree>), never in the main checkout.

Steps

  1. Baseline. git log --oneline "origin/$DEFAULT" | grep -m1 -E '^[0-9a-f]+ ([Ss]ync docs\b|docs(\([^)]*\))?: sync\b|docs\(sync\):)'. A sync is a docs: or docs(<scope>): subject that begins with "sync", a docs(sync): scope, or a subject that begins with "sync docs"; a commit that mentions "sync docs" later in its subject is no sync, and a docs commit that only names CLAUDE.md or SKILL.md is no sync. The matched commit M is the baseline unless it records a range end: read git log -1 --format=%B <M> for a Docs-sync-range-end: <sha> line; when the body has none and the subject ends with (#N) (a squash merge), read gh pr view <N> --json body -q .body for that line. When a recorded <sha> exists and git merge-base --is-ancestor <sha> "origin/$DEFAULT" holds, the baseline is <sha>; otherwise it is M. If none, ask the user for the last-known-good tag or SHA, or use the initial commit for a first sync.
  2. Range. git log <baseline>.."$T0" --oneline. Skip pure CI, workflow, and chore commits unless they change agent- or operator-facing behavior.
  3. Classify each commit (an unrelated-areas commit is classified per area):
CategoryDocs targetAction
New config field / flagCLAUDE.md config; SKILL.md settings table; README.md only for a public top-level settingAdd field description
Changed default behaviorCLAUDE.md patterns; SKILL.md; README.md only if a documented example now contradicts the codeUpdate; note old vs new
New pluggable unit (plugin, command, integration, provider, theme)Every doc that enumerates the setAdd one entry per doc
Bug fix (behavior change)CLAUDE.md patterns, if pattern-levelUpdate the bullet
New CLI command / flagSKILL.md commands; README.md Getting Started only if part of setupAdd usage
Setup / install flow changeREADME.md Getting Started; SKILL.md if operator-facingUpdate the block
Removed fieldWhichever doc lists itDelete the row or bullet
Behavior reversal (fix reverted)Whichever doc carries itNote the revert explicitly
Internal refactor / testSkipnone
Release milestoneProject notes file, if one exists (step 9)Append version entry
Rationale or migration history (CHANGELOG.md exists)CHANGELOG.mdKeyed entry there; CLAUDE.md keeps only the current invariant
Doc claim contradicted by codeWhichever doc carries the claimCorrect or delete it
  1. Audit docs near in-scope commits. Verify surrounding claims: paths exist, symbol names match, defaults and versions are current, CLI flags accept the documented args. Delete or correct what the code contradicts; grep first, and never remove a claim you haven't verified is wrong. Stay scoped; if the docs look broadly drifted, flag it instead of rewriting. Check "current/active/default" claims against the deciding switch (build target, feature-flag default, active-environment key), never against the doc's own prior text. When a commit touches a directory of pluggable items, ls it and diff against every catalog, index, and README list. When one item is promoted and another retired, confirm the active state (self-referencing URLs, indexing directives, flags, defaults) flipped on both; if that invariant is real but undocumented, add a short rule.
  2. Edit CLAUDE.md, then mirror into AGENTS.md. Edit only changed sections; terse bullets, one behavioral change each; update any schema or config version constant a migration bumped; rewrite PR descriptions as imperative phrases. Then ls -l AGENTS.md: symlink to CLAUDE.md, skip it and never open it for writing; real file, apply every CLAUDE.md body edit verbatim, keep its own intro line, and audit it per step 4; absent, skip.
  3. Edit SKILL.md (only if the repo has one). Add new keys to the settings table and the upgrade or post-update reference; update commands, reload scope, and safety-control sections when those surfaces change.
  4. Edit README.md (only if the public surface changed). Default to no edit. Touch it only for a new supported feature or integration, a new public unit in an enumerated list, a new top-level CLI subcommand, a setup or install change, or a public config example the code now contradicts. Tutorial tone: no file:line cues, internals, or PR numbers; one line per list item in the existing format. Always check its enumerated lists for new public units.
  5. Size check. wc -c CLAUDE.md. Above 35000 bytes, condense in place to under 30000; never split it. Keep symbol and file names, field lists, enum values, defaults, version numbers, gotchas, concurrency and ordering rules, live behavior, the Environment, Setup, Build & Deploy, and Testing blocks, lookup tables of IDs, paths, or prefixes, and repo-defined format conventions. Drop "why" prose where the rule alone is actionable, shipped-migration narrative, resolved-incident stories, duplicates, and examples that restate a rule; move history to CHANGELOG.md when it exists. Re-run wc -c and report old and new counts. Still over 40000, list the largest sections and ask the user which to cut.
  6. Project notes file, if the repo keeps one with a Releases section and the range includes a version tag or release PR: append - **vX.Y.Z** — YYYY-MM-DD: <summary> (PRs #N, #M).
  7. Land the edits through a PR. git status in the worktree. Stage only the doc files this sync changed, by name. Nothing staged: report "no doc changes", remove the worktree and delete its unpushed local branch (git branch -D <branch>), and stop. Otherwise commit with a subject that matches the step 1 baseline pattern (docs: sync <what> after <range>, or docs(sync): ...), a body line Docs-sync-range-end: $T0 (the full SHA), and the repo's commit footer, push the branch, open a PR against $DEFAULT whose title begins with that same subject (plus any title suffix the repo's PR convention requires, such as [C<score>, <model>, <effort>]) and whose body follows the repo's PR body rules and carries the same Docs-sync-range-end: $T0 line, and report its number and URL. A standalone run leaves the PR open for review; a caller such as sync-docs-release owns the merge decision.

Perguntas frequentes

O que a habilidade de IA Sync Docs faz?

Use when the user asks to sync, update, or refresh CLAUDE.md, AGENTS.md, SKILL.md, and README.md to reflect recent commits or PRs. Triggers on phrases like "sync docs", "update CLAUDE.md", "update AGENTS.md", "update SKILL.md", "update README", "reflect recent changes", or "document the recent PRs".

Por que usar Sync Docs no TypingMind?

Porque basta instalar uma vez para usar com qualquer modelo. Sync Docs é 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 Sync Docs no TypingMind?

Abra Plugins → Habilidades → Instalar do GitHub no TypingMind e cole https://github.com/richkuo/rk-skills/tree/main/skills/sync-docs. 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 Sync Docs?

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 Sync Docs?

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

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