Skip to content

Add a --preview mode that runs Skill synthesis without writing files #26

@chigichan24

Description

@chigichan24

Why

  • npx crune --dry-run is intentionally local-only: it lists candidate topics with their reusability score and never calls claude -p (verified in scripts/cli.ts:176-188 — execution exits before the synthesis branch).
  • That makes --dry-run cheap and offline, which is great for a first-pass look.
  • But users who are deciding whether to actually emit Skills often want to see what the LLM-synthesized output would look like before committing to writing files. Today the only way is to run synthesis for real and let it write to --output-dir.
  • We need a richer preview path that mirrors the real run (synthesis included) but emits to stdout instead of touching the filesystem.

What

  • A new flag (proposed: --preview) that:
    • runs the same pipeline as a normal invocation: build graph → pick top candidates → synthesize via claude -p
    • skips the final mkdir / writeFileSync step (scripts/cli.ts:230-236)
    • prints each synthesized Skill to stdout with a clear separator so users can pipe / less / diff
  • Honors --model, --count, --sessions-dir exactly like a real run.
  • Combining --preview with --skip-synthesis falls back to today's heuristic-only output (i.e. equivalent to --dry-run).
  • Keep --dry-run as-is (local, no LLM) for backward compatibility.

How

  • Refactor the synthesis loop in scripts/cli.ts:193-237 so the synthesis step and the file-writing step are decoupled. They currently live in the same for loop.
  • Thread a writeToDisk: boolean (or equivalent) through the per-candidate handler. --preview sets it to false.
  • Confirm the documented behavior in README and --help output.

Notes

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions