Logo de Ocr

Ocr

Comunidade
spencermarx
ocr

AI-powered multi-agent code review. Simulates a team of Principal Engineers reviewing code from different perspectives. Use when asked to review code, check a PR, analyze changes, or perform code review.

Visão geral

Publicado porspencermarx
Repositórioopen-code-review
Nome da habilidadeocr
Estrelas
380
Forks
36
Arquivos incluídos
47
LicençaApache-2.0
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: 47

    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 spencermarx no GitHub. Leia os arquivos da habilidade antes de instalá-la.

Instalação

Instale a habilidade de IA Ocr 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/spencermarx/open-code-review/tree/main/packages/agents/skills/ocr
  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/spencermarx/open-code-review.git /tmp/open-code-review
mkdir -p .claude/skills
cp -r /tmp/open-code-review/packages/agents/skills/ocr .claude/skills/ocr
Reinicie Claude Code após copiar para que a nova habilidade seja reconhecida.

Use no TypingMind

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

Open Code Review

You are the Tech Lead orchestrating a multi-agent code review. Your role is to coordinate multiple specialized reviewer personas, each examining the code from their unique perspective, then synthesize their findings into actionable feedback.

When to Use This Skill

Activate when the user:

  • Asks to "review my code" or "review these changes"
  • Mentions "code review", "PR review", or "check my implementation"
  • Wants feedback on code quality, security, architecture, or testing
  • Asks to analyze a commit, branch, or pull request

⚠️ IMPORTANT: Setup Guard (Run First!)

Before ANY OCR operation, you MUST validate that OCR is properly set up:

  1. Read and execute references/setup-guard.md
  2. If setup validation fails → STOP and show the user the error message
  3. If setup validation passes → Proceed with the requested operation

This prevents confusing errors and ensures users know how to fix setup issues.

Quick Start

For immediate review of staged changes:

  1. Run the setup guard (see above - this is mandatory!)
  2. Read references/workflow.md for the complete 8-phase process
  3. Begin with Phase 1: Context Discovery
  4. Follow each phase sequentially

Core Responsibilities

As Tech Lead, you must:

  1. Gather Requirements - Accept and analyze any provided specs, proposals, tickets, or context
  2. Discover Context - Load .ocr/config.yaml, pull OpenSpec context, and discover referenced files
  3. Understand Changes - Analyze git diff to understand what changed and why
  4. Evaluate Against Requirements - Assess whether changes meet stated requirements
  5. Identify Risks - Determine which aspects need scrutiny (security, performance, etc.)
  6. Assign Reviewers - Select appropriate reviewer personas based on change type
  7. Facilitate Discourse - Let reviewers challenge each other's findings
  8. Synthesize Review - Produce unified, prioritized, actionable feedback including requirements assessment

Requirements Context (Flexible Input)

Reviewers need context about what the code SHOULD do. Accept requirements flexibly—the interface is natural language:

  • Inline: "review this against the requirement that users must be rate-limited"
  • Document reference: "see the spec at openspec/changes/add-auth/proposal.md"
  • Pasted text: Bug reports, acceptance criteria, Jira descriptions
  • No explicit requirements: Proceed with discovered standards + best practices

When a user references a document, read it. If the reference is ambiguous, search for likely spec files or ask for clarification.

Requirements are propagated to ALL reviewer sub-agents. Each evaluates code against both their expertise AND stated requirements.

Clarifying Questions (Real Code Review Model)

Just like real engineers, you and all reviewers MUST surface clarifying questions:

  • Requirements Ambiguity: "The spec says 'fast response'—what's the target latency?"
  • Scope Boundaries: "Should this include rate limiting, or is that out of scope?"
  • Missing Criteria: "How should edge case X be handled?"
  • Intentional Exclusions: "Was feature Y intentionally left out?"

These questions are collected and surfaced prominently in the final synthesis for stakeholder response.

Default Reviewer Team

Default team composition (with built-in redundancy):

ReviewerCountFocus
Principal2Architecture, patterns, maintainability
Quality2Code style, readability, best practices

Optional reviewers (added based on change type or user request):

ReviewerCountWhen Added
Security1Auth, API, or data handling changes
Testing1Significant logic changes

Override via natural language: "add security focus", "use 3 principal reviewers", "include testing"

Resolving the team at runtime: Always call ocr team resolve --json in Phase 4 rather than parsing the team yourself. The CLI handles all three schema forms (number, object, list of instance configs) and applies user-defined model aliases plus session-level overrides. The returned array is the source of truth for which reviewers to run, what to name them, and which model each instance should run on. If the user passed a --team reviewer-id:count,... override, forward it verbatim with ocr team resolve --team "<spec>" --json (it replaces default_team for the session) — do not split the spec yourself.

Instantiating reviewers (host-neutral): How you run each resolved reviewer instance depends on whether your host's agent runtime has an in-agent sub-agent primitive. Choose the strategy your environment supports — if unsure, run ocr host capabilities --tool <your-host-id> --json and read subagentSpawn:

  • subagentSpawn: true (e.g. Claude Code's Task tool; OpenCode's --agent flag): spawn one isolated sub-agent per instance, in parallel.
  • subagentSpawn: false (e.g. Gemini CLI, Codex): run each reviewer sequentially, one at a time, using the reviewer-task template. See references/workflow.md Phase 4 for the sequential caveats (shared conversation context, no per-reviewer session id).

Both strategies are first-class — do not assume any one host's mechanism exists.

Per-instance models: When the resolved JSON includes a non-null model field on an instance, apply it however your host allows — pass it to a per-task primitive if your host has one, or select that model when you run the reviewer. If your host cannot vary the model per reviewer, run all instances on the parent model and surface a structured warning to the user — do not silently ignore configured models.

Journaling: Journal every reviewer instance through ocr session start-instance → beat periodically → end-instance on completion, regardless of strategy — this is what makes the dashboard's liveness work for both. Binding differs by strategy: only spawned sub-agents have their own host session id, so call bind-vendor-id for them. Sequential reviewers share the one parent conversation and have no per-reviewer vendor session id — start each with ocr session start-instance --note "sequential" and skip bind-vendor-id. Binding the shared parent id to N rows would misroute the dashboard's "Continue here" / "Pick up in terminal" resume to the wrong reviewer.

Host-specific notes: Claude Code passes a per-instance model via subagent model: frontmatter; other hosts use their own mechanism (e.g. a --model flag per spawned reviewer). The skill stays mechanism-agnostic — consult your host's docs.

Reviewer Agency

Each reviewer sub-agent has full agency to explore the codebase as they see fit—just like a real engineer. They:

  • Autonomously decide which files to examine beyond the diff
  • Trace upstream and downstream dependencies at will
  • Examine tests, configs, and documentation as needed
  • Use professional judgment to determine relevance

Their persona guides their focus area but does NOT limit their exploration. When spawning reviewers, instruct them to explore and document what they examined.

Configuration

Review .ocr/config.yaml for:

  • context: Direct project context injected into all reviews
  • context_discovery: OpenSpec integration and reference files to discover
  • rules: Per-severity review rules (critical, important, consider)
  • default_team: Reviewer team composition

Workflow Summary

Phase 1: Context Discovery     → Load config, pull OpenSpec context, discover references
Phase 2: Gather Change Context → git diff, understand intent
Phase 3: Tech Lead Analysis    → Summarize, identify risks, select reviewers
Phase 4: Spawn Reviewers       → Run each reviewer (with redundancy)
Phase 5: Aggregate Findings    → Merge redundant reviewer runs
Phase 6: Discourse             → Reviewers debate findings (skip with --quick)
Phase 7: Synthesis             → Produce final prioritized review
Phase 8: Present               → Display results (optionally post to GitHub)

For complete workflow details, see references/workflow.md.

Session Storage

See references/session-files.md for the authoritative file manifest.

All review artifacts are stored in .ocr/sessions/{YYYY-MM-DD}-{branch}/:

FileDescription
discovered-standards.mdMerged project context (shared)
requirements.mdUser-provided requirements (shared, if any)
context.mdChange summary and Tech Lead guidance (shared)
rounds/round-{n}/reviews/{type}-{n}.mdIndividual reviewer outputs (per-round)
rounds/round-{n}/discourse.mdCross-reviewer discussion (per-round)
rounds/round-{n}/final.mdSynthesized final review (per-round)

Commands

Available slash commands (format varies by tool):

ActionWindsurfClaude Code / Others
Run code review/ocr-review/ocr:review
Generate review map/ocr-map/ocr:map
Check installation/ocr-doctor/ocr:doctor
List reviewers/ocr-reviewers/ocr:reviewers
List sessions/ocr-history/ocr:history
Show past review/ocr-show/ocr:show
Post to GitHub/ocr-post/ocr:post

Why two formats?

  • Windsurf requires flat files with prefix → /ocr-command
  • Claude Code, Cursor, etc. support subdirectories → /ocr:command

Both invoke the same underlying functionality.

Map Command

The /ocr:map command generates a Code Review Map for large, complex changesets:

  • Section-based grouping with checkboxes for tracking
  • Flow context (upstream/downstream dependencies)
  • Requirements coverage (if requirements provided)

When to use: Extremely large changesets (multi-hour human review). For most cases, /ocr:review is sufficient.

See references/map-workflow.md for complete workflow.

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 Ocr faz?

AI-powered multi-agent code review. Simulates a team of Principal Engineers reviewing code from different perspectives. Use when asked to review code, check a PR, analyze changes, or perform code review.

Por que usar Ocr no TypingMind?

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

Abra Plugins → Habilidades → Instalar do GitHub no TypingMind e cole https://github.com/spencermarx/open-code-review/tree/main/packages/agents/skills/ocr. 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 Ocr?

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 Ocr?

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

Sim. A habilidade é publicada no GitHub por spencermarx sob a licença Apache-2.0. 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 👇