importing-a-codebase
ما الذي تفعله
تجعل هذه المهارة الذكاء الاصطناعي يدرس مشروعًا فيه كود بلا مواصفات مكتوبة، ثم يصوغ الوثائق الأساسية التي تشرح تصميمه وقراراته. وهي مخصصة للفرق التي تريد توثيق تطبيق قائم.
متى تستخدمها
- ✓عندما يكون لديك مشروع قائم فيه كود ولا توجد وثائق معمارية أو عن المنتج.
- ✓عندما تريد أن يصوغ الذكاء الاصطناعي المواصفات من ملفات README وقواعد الوكلاء والكود نفسه.
- ✓عندما تريد مراجعة مسودة مواصفات المشروع وتصحيحها قبل الوثوق بها.
رابط المهارة
https://github.com/JetBrains/thinkrail/blob/main/packages/pi-thinkrail-workflow/skills/importing-a-codebase/SKILL.mdانسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.
طريقة الاستخدام
أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.
رسالة جاهزة للصق
لـ Claude Code أو Codex أو Cursor: شغّله داخل مجلد مشروعك وستُثبَّت المهارة.
نزّل ملف SKILL.md وضعه في مجلد مهارات وكيلك.
مثال على ما تطلبه من الذكاء الاصطناعي
“مشروعي فيه كود ولا توجد له أي وثائق، فاقرأه وصغ لي أول المواصفات لأراجعها.”
5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.
كيف تعمل
يقرأ الذكاء الاصطناعي ملاحظات المشروع وملفات الإعداد والكود الرئيسي، ويصوغ وثائق معلّمة كمسودات، ويسألك فقط عن النية التي لا يجدها في الملفات.
المحتوى التقني (ملف 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:
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
الأسئلة الشائعة
هل ستكون المسودات نهائية؟
لا. تبقى مسودات حتى تراجعها، ويُعلَّم كل ما خُمّن بأنه غير مؤكد.
ما الملفات التي يقرأها أولًا؟
ملفات تعليمات الوكيل و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
- آخر تحديث
- 2/11/2026
التعليقات
- …
المزيد من المهارات من هذا المستودع
asking-user-questions
7.1kيعلّم وكيلك كيف يطرح عليك أسئلة واضحة على جولات، مع خيارات إجابة جيدة، حتى تُحسم النقاط المفتوحة.
brainstorming
7.1kيساعد وكيلك على مناقشة ميزة أو تغيير في السلوك أو إصلاح خطأ معك قبل البناء، وتسجيل التصميم المتفق عليه.
choosing-a-workflow
7.1kيساعد وكيلك على اختيار سير عمل ThinkRail المناسب لمشروع جديد أو لطلب سحب (pull request) أو لأي تغيير في ما يقدمه المنتج.
setting-up-a-project
7.1kيساعد وكيلك على إعداد مشروع للعمل المبني على المواصفات، مع اختيار المسار المناسب لفكرة جديدة أو كود موجود أو مشروع موثّق سابقًا.
مهارات مشابهة
diffs
394kيتيح لوكيلك إنتاج فرق تعديلات حقيقي يمكن مشاركته، كرابط عرض أو ملف صورة، بدلاً من ملخص مكتوب يدوياً.
coding-agent
394kيساعد وكيلك على تسليم مهمة برمجة كبيرة إلى Codex أو Claude Code أو OpenCode كعامل في الخلفية، ثم متابعة تقدمها.
gh-issues
394kيساعد وكيلك على إيجاد مشكلات GitHub واختيار ما ستعمل عليه، وفتح طلبات سحب بالإصلاحات، ومتابعة تعليقات المراجعة.