Get the FREE Ultimate OpenClaw Setup Guide →

cloning-project

Scanned
npx machina-cli add skill oaustegard/claude-skills/cloning-project --openclaw
Files (1)
SKILL.md
3.9 KB

Cloning Project

When users request to clone, copy, export, or backup their current project:

Step 1: Verify Project Context

Check if the user is in a project by looking for project-specific indicators:

  • Project instructions in the context window
  • Knowledge files mentioned in <available_skills> or similar sections
  • User explicitly stating they're in a project

If not in a project, inform the user that this skill requires being inside a Claude project.

Step 2: Gather Project Instructions

Project instructions are typically found in the context window as XML or markdown content describing the project's purpose and configuration. Extract and save these instructions to a file.

Create the instructions file:

cat > /home/claude/project-instructions.md << 'INSTRUCTIONS'
[Extracted project instructions content]
INSTRUCTIONS

Step 3: Locate Knowledge Files

Knowledge files are user-uploaded documents stored in /mnt/user-data/uploads/. List all files:

ls -lh /mnt/user-data/uploads/

If knowledge files exist, copy them to the working directory for bundling:

cp /mnt/user-data/uploads/* /home/claude/project-export/

Step 4: Create Export Bundle

If only project instructions exist (no knowledge files):

  • Copy instructions directly to outputs:
    cp /home/claude/project-instructions.md /mnt/user-data/outputs/
    

If project has both instructions and knowledge files:

  • Create an organized export directory:
    mkdir -p /home/claude/project-export
    cp /home/claude/project-instructions.md /home/claude/project-export/
    cp /mnt/user-data/uploads/* /home/claude/project-export/ 2>/dev/null || true
    
  • Create zip bundle:
    cd /home/claude
    zip -r /mnt/user-data/outputs/project-export.zip project-export/
    
  • Show bundle contents:
    unzip -l /mnt/user-data/outputs/project-export.zip
    

Step 5: Provide Files and Instructions to User

Link the exported files:

For single instructions file:

[Download project-instructions.md](computer:///mnt/user-data/outputs/project-instructions.md)

For bundled export:

[Download project-export.zip](computer:///mnt/user-data/outputs/project-export.zip)

Then provide clear setup instructions:

## How to Import Into a New Project

1. **Create a new Claude project** (or open an existing one where you want to clone this configuration)

2. **Add project instructions:**
   - Open the new project's settings
   - Navigate to the "Instructions" section
   - Copy and paste the content from `project-instructions.md`
   - Save the instructions

3. **Upload knowledge files** (if applicable):
   - In the new project, go to the "Knowledge" section
   - Upload all files from the export (except project-instructions.md)
   - Files will become available as project knowledge

Your project is now cloned with the same configuration and knowledge base.

Edge Cases

Empty project (no custom instructions or knowledge):

  • Inform the user that the project has no custom configuration to export
  • Explain that projects by default only have access to Claude's base capabilities

Large knowledge bases:

  • If the zip file exceeds reasonable size (~50MB), warn the user and suggest selective export
  • Provide individual file links as fallback

Corrupted or inaccessible files:

  • Skip files that cannot be read
  • Report which files were successfully exported vs. skipped
  • Provide export anyway with available content

Usage Examples

Trigger phrases:

  • "Clone this project"
  • "Export my project configuration"
  • "How do I copy this project setup?"
  • "Backup my project"
  • "Save this project's settings"

Source

git clone https://github.com/oaustegard/claude-skills/blob/main/cloning-project/SKILL.mdView on GitHub

Overview

Exports a Claude project's configuration by capturing project instructions and knowledge files. Use this to clone, copy, backup, or export a complete project setup for reuse or transfer.

How This Skill Works

The skill first verifies you’re inside a Claude project. It then extracts project instructions from the context into a file, locates knowledge files in /mnt/user-data/uploads/, copies them to the export area, and builds a zip bundle at /mnt/user-data/outputs/project-export.zip (or a single instructions file if there are no knowledge files). It finally provides download links for the exported content.

When to Use It

  • You want to clone a Claude project into a new workspace.
  • You need to backup the project configuration and knowledge base.
  • You’re exporting a project to share with a teammate.
  • You’re migrating a project to a different environment or device.
  • You want a bundled export when knowledge files exist, with a fallback to instructions only.

Quick Start

  1. Step 1: Confirm you are inside the target Claude project context.
  2. Step 2: Gather project instructions and locate knowledge files in /mnt/user-data/uploads/.
  3. Step 3: Create an export bundle at /mnt/user-data/outputs/project-export.zip (or provide project-instructions.md if no knowledge files exist) and share the download link.

Best Practices

  • Always verify you are inside the correct Claude project before exporting.
  • Check for knowledge files; handle empty exports gracefully if none exist.
  • Follow the file paths: project-instructions.md, /mnt/user-data/uploads, /home/claude/project-export, and /mnt/user-data/outputs.
  • For large knowledge bases, consider selective export to keep the bundle manageable.
  • Test importing the export into a fresh project to confirm fidelity.

Example Use Cases

  • Clone a project into a new Claude workspace to test changes without affecting the original.
  • Perform a weekly backup of project configuration and knowledge for compliance.
  • Share a project snapshot with a teammate by sending project-export.zip.
  • Migrate a project to a new environment while preserving instructions and files.
  • Export updated knowledge files and instructions after major project updates.

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers