importing-a-codebase
O que ela faz
Esta skill faz a IA estudar um projeto que tem código, mas não tem especificações escritas, e depois rascunhar os documentos principais que descrevem seu design e suas decisões. Serve para equipes que querem documentar um app existente.
Quando usar
- ✓Quando você tem um projeto existente com código, mas sem documentos de arquitetura ou de produto.
- ✓Quando você quer que a IA rascunhe especificações a partir de arquivos README, regras de agentes e do próprio código.
- ✓Quando você quer revisar e corrigir um rascunho de especificações antes de confiar nele.
Link da skill
https://github.com/JetBrains/thinkrail/blob/main/packages/pi-thinkrail-workflow/skills/importing-a-codebase/SKILL.mdCopie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.
Como usar
O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.
Mensagem pronta para colar
Para Claude Code, Codex ou Cursor: rode na pasta do projeto e a skill fica instalada.
Baixe o SKILL.md e coloque na pasta de skills do seu agente.
Exemplo do que pedir para a IA
“Meu projeto tem código, mas nenhuma documentação. Leia e rascunhe as primeiras especificações para eu revisar.”
5 skills novas por semana. 1 minuto de leitura.
Como funciona
A IA lê as anotações do projeto, os arquivos de configuração e o código principal, rascunha documentos marcados como rascunho e pergunta a você apenas sobre intenções que não consegue encontrar nos arquivos.
Conteúdo técnico (SKILL.md original)
Texto original do autor, em inglês, direto do GitHub.
Importing a codebase
The workspace holds real code but no specs. Reverse-engineer the spec graph the project should have had. When the repo already carries real spec-like documents, build the graph around them, not parallel to them. Do as much as possible yourself, from the files; ask the user only where the code genuinely can't tell you and the answer changes a spec.
Hold the writing-specs bar. Read that concept skill before drafting — everything in this flow is inferred rather than confirmed, so its honesty rules (draft until the user reviews, unconfirmed marked inline) bind hardest here.
1. Read first, ask last
Survey before you ask a single question. Read, in roughly this order:
- Agent files (mine these first — they state intent + conventions directly):
AGENTS.md,CLAUDE.md,.cursor/rules/*,.cursorrules,.github/copilot-instructions.md,GEMINI.md,.windsurfrules. - Docs:
README,docs/,CONTRIBUTING, ADRs. - Manifests & layout:
package.json/pyproject.toml/go.mod/Cargo.toml, workspace globs,tree-style structure, entry points, build/test scripts. - Code: entry points and the top of each candidate module — enough to see responsibilities and the dependency edges between them.
While you read, collect adoption candidates: durable, declarative documents that state the world as it is — architecture/design docs, ADRs / decision records, domain glossaries, protocol/contract docs. Never candidates (input only): READMEs, CONTRIBUTING, changelogs, roadmaps, TODOs, implementation plans (finished or planned), generated API docs.
Confirm with the spec tools (spec_grep / spec_graph) that there's no graph yet. If specs already
exist, stop and hand back to the setting-up-a-project dispatcher — this flow is for un-specced repos.
2. Build a working model
From what you read, form a working model of what the project is and how it's shaped — held in the conversation, not written to a file (this flow declares no working files):
what: one-sentence purpose (the job the codebase does)
domain: the space it's in
stack: languages / frameworks / runtime
modules: the real boundaries + the dependency edges between them (who imports whom)
invariants: rules the code already enforces (layering, "X never imports Y", public surfaces)
decisions: non-obvious choices visible in the code (and where the "why" is missing)
Agent files and READMEs usually hand you what, invariants, and decisions for free — prefer them over
re-deriving from code.
3. Interview only the gaps
Ask only what the files can't answer and that would change a spec — typically: the primary job / who it's for, explicit non-goals, and the why behind a non-obvious decision. Interview them in rounds per the asking-user-questions concept skill; infer a concrete answer and let the user correct it rather than asking open-ended.
Two kinds of question belong in the round whenever the files leave them open — the code shows what, rarely why:
- The why behind each non-obvious decision in your working model that the files don't explain — "I see X is done this way — why?" — with your inferred reasons as options. The answer goes into the spec that owns the decision.
- Known limitations — one multiSelect of the gaps you saw (unhandled cases, TODOs, missing tests, slow paths) for the user to confirm; confirmed ones are recorded in the owning spec.
If adoption candidates exist, add one question to the same round: a multiSelect listing them (grouped
when many — an adr/ set is one option) — which should become spec-graph nodes? A contradiction
between a candidate and the code found by now goes into the round too (confirm the correction).
Skipped or declined → adopt none; candidates stay input, noted at hand-off.
If the files answered everything material — the whys and limitations included — skip the interview and say so; don't manufacture questions (adoption candidates alone still make a round — the offer is never dropped as "no gaps"). A skipped/declined question is not a blocker: record the assumption inline in the spec, marked unconfirmed.
4. Draft the graph, top-down
Save with the spec tools as you go (spec_create per node, edit for prose). Order:
goal-and-requirements.md(type: goal-and-requirements) — what the product is and why, in the goal-doc shapewriting-specssets; capabilities are what the c
Perguntas frequentes
Os rascunhos serão definitivos?
Não. Eles continuam como rascunho até você revisar, e tudo que foi apenas presumido fica marcado como não confirmado.
Quais arquivos ele lê primeiro?
Os arquivos de instruções para agentes, o README, a documentação, os arquivos de pacote e os principais pontos de entrada.
Ele muda meu código?
A skill foca em escrever especificações, então sua principal saída são documentos, e não alterações de código.
Detalhes
Descrição original do autor
Use when asked to create the initial spec graph for an existing codebase that has source code but no specs. Normally reached via setting-up-a-project.
repo: JetBrains/thinkrail
Popularidade
- Estrelas no GitHub
- 7,1 mil
- Posição no ranking
- #13491
- Licença
- Apache-2.0
- Atualizada em
- 02/11/2026
Comentários
- …
Mais skills deste repositório
asking-user-questions
7,1 milEnsina seu agente a fazer perguntas claras em rodadas, com boas opções de resposta, até que os pontos em aberto estejam resolvidos.
brainstorming
7,1 milAjuda seu agente a discutir com você um recurso, uma mudança de comportamento ou uma correção de bug antes de construir, e registrar o desenho acordado.
choosing-a-workflow
7,1 milAjuda seu agente a escolher o fluxo de trabalho certo do ThinkRail para um projeto novo, um pull request ou qualquer mudança no que o produto faz.
setting-up-a-project
7,1 milAjuda seu agente a configurar um projeto para trabalho orientado a especificações, escolhendo o caminho certo para uma ideia nova, código existente ou um projeto já documentado.
Skills parecidas
diffs
394 milPermite que seu agente gere um diff real e compartilhável das edições, como link de visualização ou arquivo de imagem, em vez de um resumo escrito à mão.
coding-agent
394 milAjuda seu agente a passar um trabalho grande de programação para o Codex, Claude Code ou OpenCode em segundo plano e acompanhar o andamento.
gh-issues
394 milAjuda seu agente a encontrar issues do GitHub, escolher quais resolver e abrir pull requests com correções, acompanhando os comentários de revisão.