Skene
CLI docs

skene-growth CLI documentation

Analyze codebases for product-led growth opportunities, generate growth plans, and build implementation prompts.

Build Command

The build command extracts the Technical Execution section from your growth plan, uses an LLM to generate a focused implementation prompt, and lets you send that prompt to Cursor, Claude, or view it in the terminal.

Prerequisites

Before running build, you need:

  • A growth-plan.md file generated by the plan command. See Plan for details.
  • An API key configured for a cloud LLM provider (OpenAI, Gemini, Anthropic), or a local LLM server running (Ollama). The LLM is used to generate the implementation prompt and a growth loop definition. See configuration for setup instructions.

Basic usage

Build a prompt using auto-detected plan and configured LLM settings:

uvx skene-growth build

The command looks for growth-plan.md in ./skene-context/ first, then falls back to the current directory.

Override LLM settings:

uvx skene-growth build --api-key "your-key" --provider gemini

Specify a custom plan file:

uvx skene-growth build --plan ./my-plan.md

Point to a context directory:

uvx skene-growth build --context ./my-context

Flag reference

FlagShortDescription
--plan PATHPath to growth plan markdown file
--context PATH-cDirectory containing growth-plan.md. Auto-detected from ./skene-context/ if not specified.
--api-key TEXTAPI key for LLM provider (or SKENE_API_KEY env var)
--provider TEXT-pLLM provider: openai, gemini, anthropic/claude, lmstudio, ollama, generic
--model TEXT-mModel name (uses provider default if not provided)
--debugLog all LLM input/output to .skene-growth/debug/

How it works

The build command follows a five-step pipeline:

Step 1: Locate the growth plan

The command auto-detects the plan file in this order:

  1. If --context is specified, looks for growth-plan.md inside that directory
  2. Checks ./skene-context/growth-plan.md
  3. Checks ./growth-plan.md

You can override this with --plan to specify an exact path.

Step 2: Extract the Technical Execution section

The command parses the growth plan Markdown and extracts the Technical Execution section. This section is generated by the plan command's Council of Growth Engineers and contains:

  • The Next Build -- What specific activation loop or feature to build
  • Confidence Score -- A 0%-100% rating of the hypothesis
  • Exact Logic -- The specific flow changes or implementation logic
  • Exact Data Triggers -- Events that signal successful activation
  • Sequence -- The Now / Next / Later roadmap

If the Technical Execution section cannot be found, the command exits with an error and prompts you to generate a proper plan first.

Step 3: Generate an intelligent prompt with LLM

The extracted Technical Execution context is sent to your configured LLM with a meta-prompt. The LLM generates a focused, actionable implementation prompt that:

  • States the engineering work based on the Technical Execution context
  • Includes all relevant technical details (logic, triggers, sequence)
  • References the growth plan file for additional context
  • Asks for step-by-step implementation with code examples

If the LLM call fails, the command falls back to a static template that wraps the Technical Execution content in a basic prompt structure.

Step 4: Choose a destination

After generating the prompt, the command presents an interactive menu:

Where do you want to send this prompt?
> Cursor (open via deep link)
  Claude (open in terminal)
  Show full prompt
  Cancel

Use arrow keys to navigate and Enter to select. If the questionary package is not installed, the command falls back to a numbered menu.

Step 5: Generate a growth loop definition

Regardless of which destination you choose, the command also generates a growth loop definition -- a structured JSON file that captures the implementation requirements. This runs in parallel with the destination action.

Destinations

Cursor

Selecting Cursor opens the Cursor editor via a deep link (cursor://). The prompt is saved to a file first (.skene-build-prompt.md in the plan's directory), then Cursor is launched with the full prompt content and a reference to the saved file.

This works on macOS, Linux, and Windows. Cursor must be installed on the system.

Claude

Selecting Claude launches the Claude CLI (claude) in your current terminal session, passing it a reference to the saved prompt file. This requires the Claude CLI to be installed.

Show

Selecting Show prints the full prompt to the terminal inside a formatted panel. The prompt is also saved to a file so you can copy and use it with any tool.

In all cases, the prompt is saved to .skene-build-prompt.md in the plan's parent directory (or the configured output directory).

Growth loop definitions

Every successful build run produces a growth loop JSON file saved to ./skene-context/growth-loops/. The filename follows the pattern <loop_id>_<YYYYMMDD_HHMMSS>.json.

The loop ID is derived from the "Next Build" field in the Technical Execution section, converted to snake_case with phase prefixes removed (e.g., "Phase 1: Share Flag" becomes share_flag).

Schema

The growth loop JSON conforms to the GROWTH_LOOP_VERIFICATION_SPEC schema:

{
  "loop_id": "share_flag",
  "name": "Share Flag",
  "description": "Detailed description of the growth loop",
  "requirements": {
    "files": [
      {
        "path": "src/components/ShareButton.tsx",
        "purpose": "Share button component for the main dashboard",
        "required": true,
        "checks": [
          {
            "type": "function_exists",
            "pattern": "handleShare",
            "description": "Share handler function must exist"
          }
        ]
      }
    ],
    "functions": [
      {
        "file": "src/components/ShareButton.tsx",
        "name": "handleShare",
        "required": true,
        "signature": "handleShare(url: string) -> void",
        "logic": "Takes a URL string, generates a shareable link with tracking parameters, copies it to clipboard, and triggers a share_initiated telemetry event."
      }
    ],
    "integrations": [
      {
        "type": "ui_component",
        "description": "Share button in dashboard header",
        "verification": "Component renders in dashboard layout"
      }
    ],
    "telemetry": [
      {
        "event_name": "share_initiated",
        "description": "User clicked the share button",
        "trigger_location": "src/components/ShareButton.tsx",
        "trigger_condition": "After user clicks share and link is copied",
        "properties": ["share_type", "source_page", "user_id"]
      }
    ]
  },
  "dependencies": [],
  "verification_commands": ["npm test -- --grep ShareButton"],
  "test_coverage": {
    "unit_tests": ["ShareButton renders correctly", "handleShare generates valid URL"],
    "integration_tests": ["Share flow completes end-to-end"],
    "manual_tests": ["Click share button and verify link is copied"]
  },
  "metrics": {
    "telemetry_events": ["share_initiated", "share_completed"],
    "success_criteria": ["Share rate > 5% of active users"]
  },
  "_metadata": {
    "source_plan_path": "/absolute/path/to/growth-plan.md",
    "saved_at": "2025-01-15T10:30:00",
    "target": "cursor",
    "prompt": "The full generated prompt text..."
  }
}

Key sections of the schema:

SectionDescription
requirements.filesFiles to create or modify, with verification checks (type, pattern, description)
requirements.functionsFunctions to implement, including signature and logic description
requirements.integrationsIntegration points (CLI flags, API endpoints, UI components, external services)
requirements.telemetryEvents to track, with trigger locations and conditions
dependenciesOther loop IDs this loop depends on
verification_commandsCommands to verify the implementation
test_coverageUnit, integration, and manual test descriptions
metricsTelemetry events and success criteria (KPIs)
_metadataBuild metadata: source plan path, timestamp, chosen destination, generated prompt

Growth loop files accumulate over time. The plan command reads existing loops and instructs the council not to suggest duplicates, keeping successive iterations complementary.

LLM configuration

The build command requires LLM configuration. It loads settings from your config file (.skene-growth.config or ~/.config/skene-growth/config) and can be overridden with CLI flags.

If neither an API key nor a provider is configured, the command exits with an error listing all configuration options.

The LLM is used twice during a build:

  1. To generate the implementation prompt from the Technical Execution context
  2. To generate the growth loop definition JSON

If the LLM fails during prompt generation, the command falls back to a static template. If the LLM fails during growth loop generation, the command produces a minimal loop definition with empty arrays.

Debug mode

The --debug flag logs all LLM input and output to .skene-growth/debug/:

uvx skene-growth build --debug

You can also enable debug mode permanently in your config file:

debug = true

Next steps

  • Chat -- Use the interactive terminal chat for ad-hoc growth analysis
  • Configuration -- Set up persistent config so you do not need to pass flags every time
  • CLI Reference -- Full reference for all commands and flags