Skillpedia
برمجة عامة101k · #979

code-import

ما الذي تفعله

تقرأ هذه المهارة بنية مشروع برمجي موجود وتحفظها في «لقطة» منظمة. يتيح ذلك للذكاء الاصطناعي تحليل الكود دون أن يضطر إلى التجول في كل الملفات في كل مرة.

متى تستخدمها

  • ✓عندما تريد أن يفهم الذكاء الاصطناعي بنية مشروعك.
  • ✓لمنع الذكاء الاصطناعي من تحليل الكود مرارًا وتكرارًا.
  • ✓قبل أن تطلب منه إجراء تعديلات أو اقتراحات على الكود.

رابط المهارة

https://github.com/nexu-io/open-design/blob/main/plugins/_official/atoms/code-import/SKILL.md

انسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.

طريقة الاستخدام

أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.

رسالة جاهزة للصق

استخدم هذه المهارة لمساعدتي: https://github.com/nexu-io/open-design/blob/main/plugins/_official/atoms/code-import/SKILL.md اقرأ ملف SKILL.md في هذا الرابط ونفّذ تعليماته لمهمتي.
تريد أن يجد الذكاء الاصطناعي مهارات مثل هذه بنفسه؟ثبّت خادم Skillpedia MCP المجاني: سطر واحد، ويبحث في 15,000+ مهارة قبل كل مهمة.ثبّته في دقيقة واحدة →

مثال على ما تطلبه من الذكاء الاصطناعي

“استورد مشروعي من '/path/to/my/project' لمجموعة التقنيات [React, npm, CSS, Material UI].”

5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.

كيف تعمل

يصل الذكاء الاصطناعي إلى مسار مشروعك ويحلل الملفات، ثم يحفظ ملخصًا منظمًا. يُستخدم هذا الملخص في التحليلات اللاحقة، فيوفر الوقت.

المحتوى التقني (ملف SKILL.md الأصلي)

النص الأصلي من المؤلف، مباشرة من GitHub.

Code import

Spec §10 / §21.3.2: a code-migration / tune-collab run starts from a real repo (cloned via od project import or a path the user provided). This atom turns the raw checkout into a normalised on-disk record that subsequent atoms (design-extract, rewrite-plan, patch-edit) operate against. The point is to stop re-walking the tree on every turn — the agent reads code/index.json once and trusts the snapshot until the next explicit re-import.

Inputs

Source Required Notes
repoPath yes Absolute path to the repo's root, supplied via od project import or an upstream od.context.assets[] reference
targetStack yes { framework, packageManager, styleSystem, componentLibrary } via the matching form GenUI surface

Output

project-cwd/
└── code/
    ├── index.json         # { files: { path, size, language, imports[] }[], packageJson?, lockfileKind, framework, styleSystem }
    ├── components.json    # detected components with file path + props snapshot
    ├── routes.json        # detected routing model (next/app, react-router, vite-router, …)
    └── meta.json          # { repoPath, gitSha, walkedAt, atomDigest, walkBudgetMs }

code/index.json is the input every other Phase 7 atom reads. The walk respects the runner's budgetMs option (default 60s) so large monorepos don't burn an entire run on import.

Convergence

The atom completes when code/index.json exists and contains at least one entry. Empty repos abort with a clear error event so the user re-imports.

Anti-patterns the prompt fragment forbids

  • Walking node_modules / .git / .next / dist / build (record in code/index.json.skipped[] with reason).
  • Inferring a framework from a single file; require at least package.json's declared dep + a build-config presence (next.config.*, vite.config.*, etc.).
  • Treating commented-out imports as live edges.

Status

Implemented by the daemon runner in apps/daemon/src/plugins/atoms/code-import.ts. The walker enforces its exclusions and time budget, detects framework evidence, and writes code/index.json.

الأسئلة الشائعة

ماذا يحدث إذا كان المشروع كبيرًا جدًا؟

للمهارة حد زمني لتحليل المشروع، يضمن ألا يستغرق وقتًا طويلًا حتى للمشاريع الكبيرة.

هل سيحلل الذكاء الاصطناعي مجلدات مثل «node_modules»؟

لا، يتجاهل الذكاء الاصطناعي مجلدات الاعتماديات أو البناء، مثل «node_modules» و«.git» و«dist»، ويركز على الكود المهم فقط.

كيف يعرف الذكاء الاصطناعي التقنية التي يستخدمها مشروعي؟

يفحص ملف «package.json» وملفات إعدادات البناء لتحديد إطار العمل ومدير الحزم والتقنيات الأخرى المستخدمة.

التفاصيل

الوصف الأصلي من المؤلف

Read an existing repository's structure into the project cwd as a normalised snapshot the agent can analyse without re-walking the tree on every turn.

repo: nexu-io/open-design

الشعبية

نجوم GitHub
101k
الترتيب
#979
الترخيص
Apache-2.0
آخر تحديث
15‏/10‏/2026

هل هذه المهارة مفيدة؟

0

سجّل الدخول للتصويت.

التعليقات

  • …

المزيد من المهارات من هذا المستودع

مهارات مشابهة