cs-import-codebase
Import an existing codebase into CodeSpring
Turn a real repo into an accurate CodeSpring model: core features → sub-features → notes → PRDs, grounded in the code, then independently audit it. Drives the CLI + API so the map lands in the user's account automatically. This skill reads code and writes to CodeSpring; it does not modify the codebase.
Shared knowledge lives in the codespring skill's references — read them:
references/analyze-codebase.md, references/mindmap-structure.md, references/prd-management.md, references/pitfalls.md, references/codespring-docs.md.
0. Connect first
codespring auth status (login if needed) + codespring status (link if needed). Use the projectId from the LOCAL .codespring/config.json, never the global one, and print it. (See pitfalls.md.)
1. Definitions
- Core feature = highest-level unit, almost always a sidebar/nav item = a page. Read the sidebar/nav component first.
- Sub-feature = a capability nested under a core feature. Card descriptions stay one sentence; depth goes in the note + PRDs.
2. Analyze the code (be accurate)
Follow analyze-codebase.md: frontend map (routes, components, what the user sees, navigation) and backend map (API routes + which features share them, data model, security, shared systems — credits/payments/refunds, jobs/cron/pipelines, storage/S3 buckets, auth/RLS, env vars — and infra). Set the real tech stack. Read files; don't guess.