nexu-io/open-design / plugins/_official/atoms/code-import
code-import
VerifiedRead 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.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 2.4 KB |
| open-design.json | config | 852 B |
SKILL.md
View on GitHub---
name: code-import
description: 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.
od:
scenario: code-migration
mode: import
---
# 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
```text
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`.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |