importing-a-codebase
Fungsinya
Skill ini membuat AI mempelajari proyek yang sudah punya kode tetapi belum punya spesifikasi tertulis, lalu menyusun dokumen utama yang menjelaskan desain dan keputusan proyek tersebut. Skill ini ditujukan untuk tim yang ingin mendokumentasikan aplikasi yang sudah ada.
Kapan dipakai
- βSaat Anda punya proyek yang sudah ada kodenya tetapi belum punya dokumen arsitektur atau produk.
- βKetika Anda ingin AI menyusun spesifikasi dari file README, aturan agent, dan kode itu sendiri.
- βKetika Anda ingin meninjau dan memperbaiki draf spesifikasi proyek sebelum dipercaya.
Link skill
https://github.com/JetBrains/thinkrail/blob/main/packages/pi-thinkrail-workflow/skills/importing-a-codebase/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
βProyek saya sudah punya kode tetapi belum ada dokumentasi, jadi tolong baca dan buatkan draf spesifikasi awalnya untuk saya tinjau.β
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
AI membaca catatan proyek, file pengaturan, dan kode utama, lalu menyusun dokumen yang ditandai sebagai draf. AI hanya bertanya tentang maksud yang tidak bisa ditemukan di dalam file.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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
Pertanyaan umum
Apakah draf-nya sudah final?
Belum. Draf tetap berstatus draf sampai Anda meninjaunya, dan setiap bagian yang ditebak akan ditandai sebagai belum dikonfirmasi.
File apa yang dibaca lebih dulu?
File instruksi agent, README, dokumentasi, file paket, dan titik masuk utama.
Apakah skill ini mengubah kode saya?
Skill ini berfokus pada penulisan spesifikasi, jadi hasil utamanya berupa dokumen, bukan perubahan kode.
Detail
Deskripsi asli dari pembuat
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
Popularitas
- Bintang GitHub
- 7.1k
- Peringkat
- #13491
- Lisensi
- Apache-2.0
- Diperbarui
- 2/11/2026
Komentar
- β¦
Skill lain dari repositori ini
asking-user-questions
7.1kMengajari agent Anda cara mengajukan pertanyaan yang jelas secara bertahap, dengan pilihan jawaban yang baik, sampai poin-poin yang masih terbuka selesai.
brainstorming
7.1kMembantu agent Anda membahas fitur, perubahan perilaku, atau perbaikan bug bersama Anda sebelum dibangun, lalu mencatat desain yang disepakati.
choosing-a-workflow
7.1kMembantu agent Anda memilih alur kerja ThinkRail yang tepat untuk proyek baru, pull request, atau perubahan pada fitur produk.
setting-up-a-project
7.1kMembantu agent Anda menyiapkan proyek berbasis spesifikasi, memilih jalur yang tepat untuk ide baru, kode yang ada, atau proyek yang sudah terdokumentasi.
Skill serupa
diffs
394kMemungkinkan agent Anda menghasilkan diff perubahan yang nyata dan dapat dibagikan sebagai tautan viewer atau file gambar, bukan ringkasan yang ditulis manual.
coding-agent
394kMembantu agent Anda menyerahkan pekerjaan pemrograman besar ke Codex, Claude Code, atau OpenCode di latar belakang, lalu memeriksa kemajuannya.
gh-issues
394kMembantu agent Anda menemukan issue GitHub, memilih yang dikerjakan, dan membuka pull request perbaikan, termasuk tindak lanjut komentar tinjauan.