lc-from-code

Scan source files to generate or augment astra.yaml and universes/baseline.yaml.

18|2|Updated Feb 15, 2026
One-click install
npx skills add https://github.com/LightconeResearch/lightcone-cli --skill lc-from-code
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: lc-from-code
Source: https://github.com/LightconeResearch/lightcone-cli/tree/main/claude/lightcone/skills/lc-from-code
Command: npx skills add https://github.com/LightconeResearch/lightcone-cli --skill lc-from-code

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It turns an existing codebase into an ASTRA/ lightcone-cli runnable analysis without forcing you to rewrite your logic, so you can preserve behavior while generating a correct astra.yaml spec and provenance.

Core Features & Use Cases

  • Codebase scanning to spec: Scans scripts and notebooks to draft or augment astra.yaml and universes/baseline.yaml, capturing inputs, outputs, containers, and analytical defaults.
  • Decision parameterization with minimal change: Adds argparse or wrapper/translation layers so hardcoded analytical choices become ASTRA decisions while keeping your original code largely intact.
  • Run, validate, and debug: Executes the baseline universe, iterates on failures, and validates the spec with astra validate and provenance checks.

Quick Start

Tell the agent to migrate your repository by running: “Initialize lightcone-cli in my-analysis, then invoke /lc-from-code to scan my existing project and generate the astra.yaml needed to reproduce the current behavior.”

Frequently Asked Questions about lc-from-code

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I migrate an existing codebase into an ASTRA specification?

Migrating an existing codebase into an ASTRA specification involves scanning source scripts and notebooks to draft astra.yaml and baseline.yaml, parameterizing hardcoded analytical choices via argparse, and validating the provenance of the runnable spec.

Can I generate a YAML spec from code without rewriting my original logic?

Generating a YAML spec from code without rewriting logic is supported by adding translation wrappers or argparse layers, parameterizing hardcoded analytical choices into ASTRA decisions while keeping your original code largely intact.

What is the best way to parameterize hardcoded scripts for pipeline orchestration?

Parameterizing hardcoded scripts for pipeline orchestration is handled by adding argparse or wrapper translation layers that convert analytical choices into code recipes with minimal behavioral changes.

Does migrating code into astra.yaml require a full repository rewrite?

Migrating code into astra.yaml does not require a full repository rewrite; the process preserves behavior by scanning existing scripts and parameterizing analytical defaults into a provenance-tracked specification.

How do I validate a baseline universe after a code migration?

Validating a baseline universe after a code migration requires executing the generated spec, iterating on failures, and running astra validate alongside provenance checks to ensure integrity.

Can I use scan-only inventory generation for reference repositories?

Scan-only inventory generation for reference repositories is supported, allowing you to capture scripts and decisions to draft or augment astra.yaml and baseline.yaml without executing the baseline universe.