本文へスキップ
Skillpedia
一般的なプログラミング101k · #979

code-import

できること

このツールは、既存のコードプロジェクトの構造を読み取り、整理された「スナップショット」として保存します。これにより、AIは毎回すべてのファイルを順にたどらなくても、コードを分析できるようになります。

使う場面

  • ✓AIにプロジェクトの構造を理解させたいとき。
  • ✓AIがコードを何度も分析し直すのを避けたいとき。
  • ✓AIにコードの変更や提案を頼む前。

スキルのリンク

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

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/nexu-io/open-design/blob/main/plugins/_official/atoms/code-import/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“'/path/to/my/project' にあるプロジェクトを、[React, npm, CSS, Material UI] の技術スタックとしてインポートして。”

毎週5つの新しいスキル。1分で読めます。

仕組み

AIはプロジェクトのパスにアクセスし、ファイルを分析して、整理された要約を保存します。この要約は以降の分析で使われるため、時間を節約できます。

技術的な内容(元の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」のようなフォルダも分析しますか?

いいえ。AIは「node_modules」「.git」「dist」のような依存関係やビルド結果のフォルダを無視し、関連するコードだけに集中します。

AIはプロジェクトでどの技術が使われているかをどうやって知るのですか?

AIは「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
更新日
2026/10/15

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル