Tooluck logoTooluck
SKILL.md

importing-a-codebase

Agent skill fromJetBrains/thinkrail

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.

How to install importing-a-codebase

install importing-a-codebase
# install the thinkrail pack with the skills CLI
npx skills add JetBrains/thinkrail

# or add only this skill to Claude Code: copy the folder

packages/pi-thinkrail-workflow/skills/importing-a-codebase/

# into

~/.claude/skills/importing-a-codebase/ (all projects)

.claude/skills/importing-a-codebase/ (one project)

packages/pi-thinkrail-workflow/skills/importing-a-codebase/SKILL.md

Apache-2.0Full file
1# Importing a codebase
2
3The workspace holds real code but no specs. **Reverse-engineer the spec graph the project should have
4had.** When the repo already carries real spec-like documents, build the graph around them, not
5parallel to them. Do as much as possible yourself, from the files; ask the user only where the code genuinely can't
6tell you and the answer changes a spec.
7
8**Hold the writing-specs bar.** Read that concept skill before drafting — everything in this flow is
9inferred rather than confirmed, so its honesty rules (draft until the user reviews, unconfirmed marked
10inline) bind hardest here.
11
12## 1. Read first, ask last
13
14Survey before you ask a single question. Read, in roughly this order:
15
16- **Agent files (mine these first — they state intent + conventions directly):** `AGENTS.md`, `CLAUDE.md`,
17 `.cursor/rules/*`, `.cursorrules`, `.github/copilot-instructions.md`, `GEMINI.md`, `.windsurfrules`.
18- **Docs:** `README`, `docs/`, `CONTRIBUTING`, ADRs.
19- **Manifests & layout:** `package.json` / `pyproject.toml` / `go.mod` / `Cargo.toml`, workspace globs,
20 `tree`-style structure, entry points, build/test scripts.
21- **Code:** entry points and the top of each candidate module — enough to see responsibilities and the
22 dependency edges between them.
23
24While you read, collect **adoption candidates**: durable, declarative documents that state the world
25as it is — architecture/design docs, ADRs / decision records, domain glossaries, protocol/contract
26…

Excerpt shown under the repository's Apache-2.0 license.

More skills in thinkrail

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates