importing-a-codebase
Was er macht
Dieser Skill lässt die KI ein Projekt mit Code, aber ohne schriftliche Spezifikationen untersuchen und dann die wichtigsten Dokumente entwerfen, die Design und Entscheidungen beschreiben. Er richtet sich an Teams, die eine bestehende App dokumentieren wollen.
Wann du ihn nutzt
- ✓Wenn du ein bestehendes Projekt mit Code, aber ohne Architektur- oder Produktdokumente hast.
- ✓Wenn die KI Spezifikationen aus README-Dateien, Agenten-Regeln und dem Code selbst entwerfen soll.
- ✓Wenn du einen Entwurf der Projektspezifikationen prüfen und korrigieren willst, bevor du ihm vertraust.
Link zum Skill
https://github.com/JetBrains/thinkrail/blob/main/packages/pi-thinkrail-workflow/skills/importing-a-codebase/SKILL.mdKopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.
So nutzt du ihn
Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.
Fertige Nachricht zum Einfügen
Für Claude Code, Codex oder Cursor: Führe den Befehl in deinem Projektordner aus, dann wird der Skill installiert.
Lade die SKILL.md herunter und lege sie in den Skills-Ordner deines Agenten.
Beispielanfrage an deine KI
“Mein Projekt hat Code, aber keine Dokumentation. Lies es bitte und entwirf die ersten Spezifikationen, die ich prüfen kann.”
5 neue Skills pro Woche. 1 Minute Lesezeit.
So funktioniert es
Die KI liest die Notizen, Einrichtungsdateien und den wichtigsten Code des Projekts, entwirft Dokumente, die als Entwürfe markiert sind, und fragt nur nach Absichten, die sich aus den Dateien nicht ergeben.
Technischer Inhalt (originale SKILL.md)
Originaltext des Autors, auf Englisch, direkt von 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
Häufige Fragen
Werden die Entwürfe endgültig sein?
Nein. Sie bleiben Entwürfe, bis du sie geprüft hast, und alles Geratene ist als unbestätigt markiert.
Welche Dateien liest sie zuerst?
Anweisungsdateien für Agenten, die README, Dokumentation, Paketdateien und die wichtigsten Einstiegspunkte.
Ändert er meinen Code?
Der Skill konzentriert sich aufs Schreiben von Spezifikationen. Sein Hauptergebnis sind also Dokumente und keine Codeänderungen.
Details
Originalbeschreibung des Autors
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
Beliebtheit
- GitHub-Sterne
- 7.1k
- Platz im Ranking
- #13491
- Lizenz
- Apache-2.0
- Aktualisiert
- 2.11.2026
Kommentare
- …
Weitere Skills aus diesem Repository
asking-user-questions
7.1kBringt deinem Agenten bei, dir Fragen in Runden mit guten Antwortoptionen zu stellen, bis die offenen Punkte geklärt sind.
brainstorming
7.1kHilft deinem Agenten, mit dir eine Funktion, eine Verhaltensänderung oder eine Fehlerbehebung zu besprechen, bevor gebaut wird, und das vereinbarte Design festzuhalten.
choosing-a-workflow
7.1kHilft deinem Agenten, den richtigen ThinkRail-Ablauf für ein neues Projekt, einen Pull Request oder jede Änderung am Produktverhalten zu wählen.
setting-up-a-project
7.1kHilft deinem Agenten, ein Projekt für spezifikationsgetriebene Arbeit einzurichten und den passenden Weg für eine neue Idee, bestehenden Code oder ein bereits dokumentiertes Projekt zu wählen.
Ähnliche Skills
diffs
394kLässt deinen Agenten einen echten, teilbaren Diff seiner Änderungen als Viewer-Link oder Bilddatei erstellen, statt einer handgeschriebenen Zusammenfassung.
coding-agent
394kHilft deinem Agenten, eine größere Programmieraufgabe als Hintergrund-Worker an Codex, Claude Code oder OpenCode zu übergeben und danach den Fortschritt zu prüfen.
gh-issues
394kHilft deinem Agenten, GitHub-Issues zu finden, die zu bearbeitenden auszuwählen und Pull Requests mit Korrekturen zu öffnen, einschließlich der Nacharbeit an Review-Kommentaren.