Skip to content
Skillpedia
General coding101k Β· #979

code-import

What it does

This tool reads the structure of an existing code project and saves it as an organized "snapshot." This allows the AI to analyze your code without having to "walk" through all the files every time it needs to.

When to use it

  • βœ“When you want the AI to understand your project's structure.
  • βœ“To prevent the AI from repeatedly analyzing your code.
  • βœ“Before asking the AI to make changes or suggestions to your code.

Skill link

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

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/nexu-io/open-design/blob/main/plugins/_official/atoms/code-import/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute β†’

Example of what to ask your AI

β€œImport my project from '/path/to/my/project' for the [React, npm, CSS, Material UI] tech stack.”

5 new skills a week. 1 minute to read.

How it works

The AI accesses your project's path, analyzes the files, and saves an organized summary. This summary is used for future analyses, saving time.

Technical content (original SKILL.md)

Original text by the author, straight from 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.

FAQ

What happens if the project is too large?

The tool has a time limit for analyzing the project, ensuring it doesn't take too long, even for large projects.

Will the AI analyze folders like 'node_modules'?

No, the AI ignores dependency or build folders like 'node_modules', '.git', or 'dist', focusing only on relevant code.

How does the AI know what technology my project uses?

The AI checks the 'package.json' file and build configuration files to identify the framework, package manager, and other technologies used.

Details

Original description by the author

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

Popularity

GitHub stars
101k
Ranking position
#979
License
Apache-2.0
Updated
10/15/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills