generate_module_skeleton
Extracts symbols from a source file and writes a new module file with correct imports, declarations, and visibility. Returns an unknown-symbols list if any requested symbol is missing.
Instructions
Generate a new module file with correct imports, declarations and visibility. Reads the source file, extracts the specified symbols, and writes them to the target module path. Returns error with unknownSymbols list if any symbols are not found.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Working dir for resolving relative file paths (default: primary project root) | |
| dryRun | No | Preview only (default: true) | |
| symbols | Yes | Symbol names to include | |
| language | No | Language (auto-detected) | |
| overwrite | No | Allow overwriting existing file (default: false) | |
| modulePath | Yes | Target file path (e.g. src/ai/data.rs) | |
| sourceFile | Yes | Original file to extract symbols from |