Skip to content
Skillpedia
General coding101k · #519

code-import

Reads the structure of an existing repository for analysis. It helps the agent understand the code without needing to traverse it repeatedly.

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.

Example of what to ask your AI

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

Want more? Open the sections below.

How to use

The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.

Skill link

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

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.
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.

Installation

Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.

In the terminal (Claude Code, Codex, Cursor), in your project folder:

npx skills add nexu-io/open-design --skill code-import

Or download just the file:

curl -L https://raw.githubusercontent.com/nexu-io/open-design/main/plugins/_official/atoms/code-import/SKILL.md -o SKILL.md
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
#519
License
Apache-2.0
Updated
10/16/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills