본문으로 건너뛰기
Skillpedia
일반 코딩7.1k · #13491

importing-a-codebase

하는 일

이 스킬은 코드는 있지만 명세 문서가 없는 프로젝트를 AI가 살펴보고, 설계와 결정을 설명하는 핵심 문서의 초안을 작성하게 합니다. 기존 앱을 문서화하려는 팀을 위한 것입니다.

사용하는 경우

  • ✓코드는 있지만 아키텍처나 제품 문서가 없는 기존 프로젝트가 있을 때.
  • ✓README, 에이전트 규칙 파일, 코드 자체를 바탕으로 명세 초안을 쓰게 하고 싶을 때.
  • ✓명세를 신뢰하기 전에 초안을 검토하고 고치고 싶을 때.

스킬 링크

https://github.com/JetBrains/thinkrail/blob/main/packages/pi-thinkrail-workflow/skills/importing-a-codebase/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/JetBrains/thinkrail/blob/main/packages/pi-thinkrail-workflow/skills/importing-a-codebase/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“제 프로젝트에는 코드는 있는데 문서가 없어요. 코드를 읽고, 제가 검토할 수 있도록 첫 명세 초안을 써 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

AI는 프로젝트의 메모, 설정 파일, 주요 코드를 읽고 초안이라고 표시한 문서를 작성합니다. 파일에서 의도를 찾을 수 없는 부분만 질문하고, 추측한 내용은 확인되지 않음으로 표시합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 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:

  1. goal-and-requirements.md (type: goal-and-requirements) — what the product is and why, in the goal-doc shape writing-specs sets; capabilities are what the c
자주 묻는 질문

초안이 최종본이 되나요?

아니요. 사람이 검토하기 전까지 초안으로 남으며, 추측한 내용은 확인되지 않은 것으로 표시됩니다.

가장 먼저 읽는 파일은 무엇인가요?

에이전트 지침 파일, README, 문서, 패키지 파일, 주요 진입점입니다.

내 코드를 바꾸나요?

이 스킬은 명세 작성에 중점을 두므로, 주된 결과물은 코드 변경이 아니라 문서입니다.

상세 정보

작성자의 원본 설명

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

인기도

GitHub 스타
7.1k
순위
#13491
라이선스
Apache-2.0
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬