importing-a-codebase
Qué hace
Esta skill hace que la IA estudie un proyecto que tiene código pero no tiene especificaciones escritas, y luego redacte los documentos clave que describen su diseño y sus decisiones. Es para equipos que quieren documentar una app existente.
Cuándo usarla
- ✓Cuando tienes un proyecto existente con código y sin documentos de arquitectura o de producto.
- ✓Cuando quieres que la IA redacte especificaciones a partir de los archivos README, las reglas de agente y el propio código.
- ✓Cuando quieres revisar y corregir un borrador de especificaciones antes de darlas por buenas.
Link de la skill
https://github.com/JetBrains/thinkrail/blob/main/packages/pi-thinkrail-workflow/skills/importing-a-codebase/SKILL.mdCópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.
Cómo usar
La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.
Mensaje listo para pegar
Para Claude Code, Codex o Cursor: ejecútalo en la carpeta del proyecto y la skill queda instalada.
Descarga el SKILL.md y ponlo en la carpeta de skills de tu agente.
Ejemplo de qué pedirle a la IA
“Mi proyecto tiene código pero no tiene documentación, así que léelo y redacta las primeras especificaciones para que las revise.”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
La IA lee las notas del proyecto, los archivos de configuración y el código principal, redacta documentos marcados como borradores y te pregunta solo por las intenciones que no puede encontrar en los archivos.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de 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
Preguntas frecuentes
¿Serán definitivos los borradores?
No. Siguen siendo borradores hasta que los revises, y todo lo que se haya supuesto aparece marcado como no confirmado.
¿Qué archivos lee primero?
Los archivos de instrucciones del agente, el README, la documentación, los archivos de paquetes y los puntos de entrada principales.
¿Cambia mi código?
La skill se centra en escribir especificaciones, así que su resultado principal son documentos y no cambios de código.
Detalles
Descripción original del 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
Popularidad
- Estrellas en GitHub
- 7,1 mil
- Posición en el ranking
- #13491
- Licencia
- Apache-2.0
- Actualizada
- 2/11/2026
Comentarios
- …
Más skills de este repositorio
asking-user-questions
7,1 milEnseña a tu agente a hacerte preguntas claras por rondas, con buenas opciones de respuesta, hasta que los puntos abiertos queden resueltos.
brainstorming
7,1 milAyuda a tu agente a hablar contigo sobre una función, un cambio de comportamiento o una corrección de error antes de construirlo, y a registrar el diseño acordado.
choosing-a-workflow
7,1 milAyuda a tu agente a elegir el flujo de trabajo de ThinkRail adecuado para un proyecto nuevo, una pull request o cualquier cambio en lo que hace el producto.
setting-up-a-project
7,1 milAyuda a tu agente a preparar un proyecto para trabajar guiado por especificaciones, eligiendo el camino adecuado para una idea nueva, un código existente o un proyecto ya documentado.
Skills parecidas
diffs
394 milPermite que tu agente genere un diff real y compartible de los cambios, como enlace de visualización o archivo de imagen, en lugar de un resumen escrito a mano.
coding-agent
394 milAyuda a tu agente a pasar un trabajo de programación grande a Codex, Claude Code u OpenCode como trabajador en segundo plano, y después revisar su progreso.
gh-issues
394 milAyuda a tu agente a encontrar incidencias de GitHub, elegir cuáles trabajar y abrir pull requests con correcciones, incluido el seguimiento de los comentarios de revisión.