code2skill exposes four CLI commands:
scan: run a full repository scan and generate Skills plus supporting artifactsestimate: calculate impact and cost, then writereport.jsononlyci: run the automation-oriented full or incremental pipelineadapt: copy or merge generated Skills into target tool instruction files
code2skill --help
python -m code2skill --helpEvery command accepts an explicit repo_path.
- Relative
repo_pathvalues are resolved from the current shell location. - Relative
--output-dir,--report-json,--diff-file, and--pricing-filevalues are resolved fromrepo_path. - For
adapt, relative--source-dirvalues are also resolved fromrepo_path.
This means callers can run the CLI from outside the target repository without changing path semantics.
Full generation:
code2skill scan /path/to/repo --llm qwen --model qwen-plus-latestStructure-only scan:
code2skill scan /path/to/repo --structure-onlyCost preview:
code2skill estimate /path/to/repo --pricing-file pricing.jsonIncremental CI run:
code2skill ci /path/to/repo --mode auto --base-ref origin/main --head-ref HEADAdapt generated Skills into Codex format:
code2skill adapt /path/to/repo --target codex- Success returns exit code
0. - User-facing runtime errors return exit code
1and print a concisecode2skill: error: ...message to stderr. Ctrl+Creturns exit code130.
Successful scan, estimate, and ci commands print a compact summary including:
- the command name
- the effective mode
- repository path
- selected file counts
- output directory
- generated artifact paths
adapt prints the repository root, target, source directory, and written files.