🎁 Get the FREE AI Skills Starter Guide β€” Subscribe β†’
BytesAgainBytesAgain
πŸ¦€ ClawHub

script creator with github companion

by @cadot-eu

Create and modify scripts in ~/.nanobot/workspace/test with strict Git versioning. Each script lives in its own directory with an isolated git repository. Al...

Versionv1.0.0
Downloads1,287
TERMINAL
clawhub install script-creator

πŸ“– About This Skill


name: script-git-manager description: > Create and modify scripts in ~/.nanobot/workspace/test with strict Git versioning. Each script lives in its own directory with an isolated git repository. Always confirms creation plan before execution and reports progress at each step. Uses ~/.nanobot/workspace/venv for Python environment and package management.

Script Git Manager Skill

This skill enforces a strict, deterministic workflow for creating and modifying scripts, using Git as the sole state memory. It is designed to prevent accidental file creation, uncontrolled refactors, and loss of history.


Scope

  • Base directory: ~/.nanobot/workspace/test
  • Python virtual environment: ~/.nanobot/workspace/venv
  • One script = one directory = one git repository
  • Git is mandatory and authoritative

  • Python Environment

    All Python-related operations (pip install, script execution) must use the virtual environment:

    # Activate virtual environment
    source ~/.nanobot/workspace/venv/bin/activate

    Install packages

    pip install

    Execute Python scripts

    python

    Deactivate when done

    deactivate

    Always activate the venv before any pip or python command.


    Creation Workflow

    Use this skill only when the user explicitly asks to create a new script.

    Phase 1: Plan Confirmation

    Before creating anything, present a detailed creation plan to the user:

    πŸ“‹ Script Creation Plan for: 

    Directory: ~/.nanobot/workspace/test/ File: . Language: Dependencies:

    Steps to execute: 1. Create directory ~/.nanobot/workspace/test/ 2. Initialize Git repository 3. Create script file . 4. [If Python with dependencies] Activate venv and install: 5. Write script content 6. Create initial Git commit

    Proceed with this plan? (yes/no)

    Wait for explicit user confirmation before proceeding.

    Phase 2: Step-by-Step Execution

    Execute each step sequentially and report progress after each one:

    Step 1: Create directory

    cd ~/.nanobot/workspace/test
    mkdir 
    
    Output: βœ“ Created directory: ~/.nanobot/workspace/test/

    Step 2: Initialize Git

    cd 
    git init
    
    Output: βœ“ Initialized Git repository

    Step 3: Create script file

    touch .
    
    Output: βœ“ Created file: .

    Step 4: Install dependencies (if Python with dependencies)

    source ~/.nanobot/workspace/venv/bin/activate
    pip install   ...
    deactivate
    
    Output: βœ“ Installed Python packages:

    Step 5: Write script content

    # Write the actual script code to the file
    
    Output: βœ“ Script content written ( lines)

    Step 6: Create initial commit

    git add .
    git commit -m "Initial commit: "
    
    Output: βœ“ Initial Git commit created

    Final summary:

    βœ… Script created successfully!

    Location: ~/.nanobot/workspace/test//. Git status: Clean (1 commit) [If Python] Virtual environment: ~/.nanobot/workspace/venv


    Modification Workflow

    Use this skill only when the user asks to modify an existing script.

    Phase 1: Plan Confirmation

    Before modifying, present the modification plan:

    πŸ“ Script Modification Plan for: 

    Location: ~/.nanobot/workspace/test// Changes requested:

    Steps to execute: 1. Enter script directory 2. Create checkpoint commit (current state) 3. Apply modifications: 4. [If new Python dependencies] Install via venv: 5. Commit changes with message: ""

    Proceed with this plan? (yes/no)

    Wait for explicit user confirmation before proceeding.

    Phase 2: Step-by-Step Execution

    Step 1: Enter directory

    cd ~/.nanobot/workspace/test/
    
    Output: βœ“ Entered script directory

    Step 2: Create checkpoint

    git add .
    git commit -m "Checkpoint before modification"
    
    Output: βœ“ Checkpoint commit created

    Step 3: Apply modifications

    # Modify the script file as requested
    
    Output: βœ“ Modifications applied to

    Step 4: Install new dependencies (if applicable)

    source ~/.nanobot/workspace/venv/bin/activate
    pip install 
    deactivate
    
    Output: βœ“ Installed new packages:

    Step 5: Commit changes

    git add .
    git commit -m ""
    
    Output: βœ“ Changes committed: ""

    Final summary:

    βœ… Script modified successfully!

    Location: ~/.nanobot/workspace/test// Changes: Git commits: 2 new commits (checkpoint + modification)


    Hard Constraints (Must Never Be Violated)

  • Never create a new script unless explicitly instructed
  • Never proceed without user confirmation of the plan
  • Never skip progress reporting after each step
  • Never create additional files unless explicitly instructed
  • Never skip the pre-modification git commit
  • Never modify files outside the target script
  • Never rewrite git history
  • Never use system Python - always use ~/.nanobot/workspace/venv
  • Never assume missing intent

  • Decision Rules

  • If the script directory does not exist β†’ creation workflow
  • If the script directory exists β†’ modification workflow
  • If intent is ambiguous β†’ ask for clarification, do nothing
  • If plan is not confirmed β†’ stop and wait for confirmation

  • Progress Reporting Format

    Use these symbols for consistency:

  • πŸ“‹ Plan presentation
  • βœ“ Successful step completion
  • βœ… Final success summary
  • ⚠️ Warning or clarification needed
  • ❌ Error or failure
  • Each step output should be concise (1-2 lines) but informative.


    Philosophy

    Git is the memory. The filesystem is the contract. Confirmation prevents mistakes. Transparency builds trust. The venv isolates dependencies.