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...
--- 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: ```bash # Activate virtual environment source ~/.nanobot/workspace/venv/bin/activate # Install packages pip install <package_name> # Execute Python scripts python <script_path> # 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: <script_name> Directory: ~/.nanobot/workspace/test/<script_name> File: <script_name>.<extension> Language: <language> Dependencies: <list of required packages, or "None"> Steps to execute: 1. Create directory ~/.nanobot/workspace/test/<script_name> 2. Initialize Git repository 3. Create script file <script_name>.<extension> 4. [If Python with dependencies] Activate venv and install: <packages> 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** ```bash cd ~/.nanobot/workspace/test mkdir <script_name> ``` Output: `✓ Created directory: ~/.nanobot/workspace/test/<script_name>` **Step 2: Initialize Git** ```bash cd <script_name> git init ``` Output: `✓ Initialized Git repository` **Step 3: Create script file** ```bash touch <script_name>.<extension> ``` Output: `✓ Created file: <script_name>.<extension>` **Step 4: Install dependencies (if Python with dependencies)** ```bash source ~/.nanobot/workspace/venv/bin/activate pip install <package1> <package2> ... deactivate ``` Output: `✓ Installed Python packages: <package_list>` **Step 5: Write script content** ```bash # Write the actual script code to the file ``` Output: `✓ Script content written (<X> lines)` **Step 6: Create initial commit** ```bash git add . git commit -m "Initial commit: <script_name>" ``` Output: `✓ Initial Git commit created` **Final summary:** ``` ✅ Script created successfully! Location: ~/.nanobot/workspace/test/<script_name>/<script_name>.<extension> 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: <script_name> Location: ~/.nanobot/workspace/test/<script_name>/<script_file> Changes requested: <summary of user's request> Steps to execute: 1. Enter script directory 2. Create checkpoint commit (current state) 3. Apply modifications: <specific changes> 4. [If new Python dependencies] Install via venv: <packages> 5. Commit changes with message: "<description>" Proceed with this plan? (yes/no) ``` **Wait for explicit user confirmation before proceeding.** ### Phase 2: Step-by-Step Execution **Step 1: Enter directory** ```bash cd ~/.nanobot/workspace/test/<script_name> ``` Output: `✓ Entered script directory` **Step 2: Create checkpoint** ```bash git add . git commit -m "Checkpoint before modification" ``` Output: `✓ Checkpoint commit created` **Step 3: Apply modifications** ```bash # Modify the script file as requested ``` Output: `✓ Modifications applied to <script_file>` **Step 4: Install new dependencies (if applicable)** ```bash source ~/.nanobot/workspace/venv/bin/activate pip install <new_package> deactivate ``` Output: `✓ Installed new packages: <package_list>` **Step 5: Commit changes** ```bash git add . git commit -m "<concise description of the change>" ``` Output: `✓ Changes committed: "<commit_message>"` **Final summary:** ``` ✅ Script modified successfully! Location: ~/.nanobot/workspace/test/<script_name>/<script_file> Changes: <brief summary> 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.
don't have the plugin yet? install it then click "run inline in claude" again.
added explicit inputs section with external dependencies (git, venv setup), edge cases (network timeouts, rate limiting, disk space), and detailed decision points; restructured procedure with step-by-step inputs/outputs; added output contract with success criteria; clarified outcome signals with concrete user validation steps.
This skill enforces a strict, deterministic workflow for creating and modifying scripts using Git as the sole state memory. It prevents accidental file creation, uncontrolled refactors, and loss of history by requiring explicit user confirmation before any filesystem changes and reporting progress at each step.
Use this skill when you need to create a new script from scratch or modify an existing script in the ~/.nanobot/workspace/test directory. The skill ensures every script has its own isolated Git repository, deterministic version control, and a reproducible Python environment. creation requires explicit user confirmation of the plan before execution. Modification requires a checkpoint commit to preserve pre-change state. This is your tool for scripting that doesn't lose history.
filesystem paths (required):
~/.nanobot/workspace/test (must exist; create if missing)~/.nanobot/workspace/venv (must be pre-initialized with python -m venv ~/.nanobot/workspace/venv)git (required):
git --versiongit config --global user.name and git config --global user.email (skill will fail if missing)context from user (required):
edge cases to handle:
Step 1: Validate inputs and present plan
Input: user's explicit request to create script, script name, language, dependencies list
git config --global user.name)~/.nanobot/workspace/test exists (if not, create it: mkdir -p ~/.nanobot/workspace/test)~/.nanobot/workspace/venv exists and is valid python venvOutput: creation plan displayed, user confirmation captured
📋 Script Creation Plan for: <script_name>
Directory: ~/.nanobot/workspace/test/<script_name>
File: <script_name>.<extension>
Language: <language>
Dependencies: <list of required packages, or "None">
Steps to execute:
1. Create directory ~/.nanobot/workspace/test/<script_name>
2. Initialize Git repository
3. Create script file <script_name>.<extension>
4. [If dependencies] Activate venv and install: <packages>
5. Write script content
6. Create initial Git commit
Proceed with this plan? (yes/no)
Step 2: Create directory
Input: script_name, confirmed user approval
cd ~/.nanobot/workspace/test && mkdir <script_name>Output: ✓ Created directory: ~/.nanobot/workspace/test/<script_name>
Step 3: Initialize Git repository
Input: script_name
cd ~/.nanobot/workspace/test/<script_name> && git initOutput: ✓ Initialized Git repository
Step 4: Create script file
Input: script_name, extension
touch <script_name>.<extension> (from within the script directory)Output: ✓ Created file: <script_name>.<extension>
Step 5: Install dependencies (if applicable)
Input: dependencies list, venv path
source ~/.nanobot/workspace/venv/bin/activatepip install <package1> <package2> ... (each package on command line)deactivateOutput: ✓ Installed Python packages: <package_list> or ✓ No dependencies to install
Step 6: Write script content
Input: script_name, extension, user-provided code
<script_name>.<extension> (in script directory)Output: ✓ Script content written (<X> lines)
Step 7: Create initial Git commit
Input: script_name
git add .git commit -m "Initial commit: <script_name>"Output: ✓ Initial Git commit created
Step 8: Report final success
Input: (none, reporting phase)
Output:
✅ Script created successfully!
Location: ~/.nanobot/workspace/test/<script_name>/<script_name>.<extension>
Git status: Clean (1 commit)
[If Python] Virtual environment: ~/.nanobot/workspace/venv
Step 1: Validate inputs and present plan
Input: user's explicit request to modify script, script name, modification scope
~/.nanobot/workspace/test/<script_name>.git/ folder).git/)Output: modification plan displayed, user confirmation captured
📝 Script Modification Plan for: <script_name>
Location: ~/.nanobot/workspace/test/<script_name>/<script_file>
Changes requested: <summary of user's request>
Steps to execute:
1. Enter script directory
2. Create checkpoint commit (current state)
3. Apply modifications: <specific changes>
4. [If new dependencies] Install via venv: <packages>
5. Commit changes with message: "<description>"
Proceed with this plan? (yes/no)
Step 2: Enter directory
Input: script_name
cd ~/.nanobot/workspace/test/<script_name>Output: ✓ Entered script directory
Step 3: Create checkpoint commit
Input: (none, automatic)
git add .git commit -m "Checkpoint before modification" (from script directory)Output: ✓ Checkpoint commit created (or ✓ No changes to checkpoint (already committed))
Step 4: Apply modifications
Input: script_name, extension, modification scope, user-provided code/changes
Output: ✓ Modifications applied to <script_file>
Step 5: Install new dependencies (if applicable)
Input: new dependencies list (if any)
source ~/.nanobot/workspace/venv/bin/activatepip install <new_package1> <new_package2> ...deactivateOutput: ✓ Installed new packages: <package_list> or ✓ No new dependencies to install
Step 6: Commit changes
Input: modification scope, change summary
git add .git commit -m "<concise description of the change>" (e.g., "Add error handling to main loop")Output: ✓ Changes committed: "<commit_message>"
Step 7: Report final success
Input: (none, reporting phase)
Output:
✅ Script modified successfully!
Location: ~/.nanobot/workspace/test/<script_name>/<script_file>
Changes: <brief summary>
Git commits: 2 new commits (checkpoint + modification)
if script directory does not exist:
if script directory exists but .git/ folder is missing:
if user intent is ambiguous (e.g., "make a script" vs. "update the script"):
if user does not confirm the plan:
if git author/email not configured:
git config --global user.name "Your Name" and git config --global user.email "your@email.com"if pip install times out or fails:
if disk space < 100 MB:
if venv does not exist or is corrupted:
python -m venv ~/.nanobot/workspace/venvif script file already exists with same name (during creation):
on successful creation:
~/.nanobot/workspace/test/<script_name>/~/.nanobot/workspace/test/<script_name>/<script_name>.<extension> (readable, contains user-provided code).git/ folder present in script directorygit log shows exactly 1 commit with message "Initial commit: git status shows "working tree clean"pip list (after activating venv) shows all packageson successful modification:
<script_name>.<extension> contains new codegit log shows all previous commits plus 2 new commits (checkpoint + modification)git status shows "working tree clean"pip list (after activating venv) includes new packageson failure:
user knows creation worked when:
✅ Script created successfully!~/.nanobot/workspace/test/<script_name>/ and see the script filecd ~/.nanobot/workspace/test/<script_name> && git log and see the initial commituser knows modification worked when:
✅ Script modified successfully!cd ~/.nanobot/workspace/test/<script_name> && git log and see 2 new commits (checkpoint + modification) above the original commitsgit diff HEAD~1 HEAD and see the exact changes applieduser knows something failed when:
❌ symbolcredits: original author cadot-eu (clawhub). enriched for implexa quality standards.