SkillAgentSearch skills...

AICode

A comprehensive collection of AI-related utility scripts designed to simplify AI development workflows and automate common tasks.

Install / Use

/learn @sylearn/AICode
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

🤖 AI Utility Scripts Collection

License: MIT Platform Shell

🇨🇳 Chinese | 🇺🇸 English

A comprehensive collection of practical AI-related scripts designed to simplify AI development workflows and automate common tasks.

🤖 WXn8n WeChat Bot

🚀 Features Overview

WXn8n is an intelligent bot that connects WeChat with N8N workflow platform, supporting:

  • 🔗 N8N Integration - Seamless connection with N8N workflow platform
  • 💬 Smart Conversations - AI-powered intelligent replies for text messages
  • 📁 File Processing - Automatic handling of images, documents, and other file types
  • 👥 Group Management - Group chat permission control and user management
  • Command System - Rich built-in command functionality (/help, /ps, etc.)
  • 🔄 Real-time Monitoring - Real-time monitoring of specified users and groups
  • 🛡️ Security Authentication - Webhook authentication and permission control support

🖥️ System Architecture

graph TD
A["Receive Message"] --> B["MessageContext"]
B --> C["process_message()"]

C --> D{File Message?}
D -->|Yes| E["MessageHandler.handle_file_message()"]
E --> F["Save File and Reply"]

D -->|No| G{Group Permission Check}
G -->|No Permission| H["Silent Processing"]
G -->|Has Permission| I{Is Command?}

I -->|Yes| J["CommandSystem.has_command()"]
J -->|Found| K["CommandSystem.execute_command()"]
J -->|Not Found| L["ResponseManager.handle_unknown_command()"]

I -->|No| M["MessageHandler.build_content()"]
M --> N["ResponseManager.send_ai_response()"]

K --> O{"/ps Command?"}
K --> P{"/help Command?"}
K --> Q["Other Commands..."]

O --> R["handle_ps_command()"]
P --> S["handle_help_command()"]

style A fill:#e1f5fe
style C fill:#f3e5f5
style J fill:#e8f5e8
style R fill:#fff3e0
style S fill:#fff3e0

💡 Key Features

🔍 Intelligent Message Processing

  • Automatic message type recognition (text, images, files, etc.)
  • Support for both group and private chat scenarios
  • Smart permission management and user whitelist

📦 N8N Workflow Integration

  • Webhook Triggers: Seamless integration with N8N via webhooks
  • File Upload: Support for sending files to N8N for processing
  • Response Handling: Automatic processing of N8N results and files

🔧 Flexible Configuration Management

  • Environment variable configuration support
  • Support for test and production environment switching
  • Configurable monitoring user and group lists
  • Custom timeout and authentication settings

🚀 Quick Start

1. Environment Setup

# Navigate to project directory
cd AICode/wxn8n

# Install dependencies (using uv package manager)
uv sync

2. Configuration Setup

# Copy configuration template
cp config.env.template config.env

# Edit configuration file
# Configure N8N Webhook URL, monitoring user list, etc.

3. Run the Bot

# Activate virtual environment and run
uv run python main.py

⚙️ Configuration Details

Main Configuration Parameters

# Basic Configuration
SAVE_PATH=                    # File save path
LOG_LEVEL=INFO               # Log level
LISTEN_INTERVAL=1            # Listening interval

# N8N Integration Configuration
WEBHOOK_TEST_URL=            # Test environment Webhook URL
WEBHOOK_PROD_URL=            # Production environment Webhook URL
AUTH_HEADER_KEY=             # Authentication header key
AUTH_HEADER_VALUE=           # Authentication header value

# Monitoring Configuration
LISTEN_USERS=                # Monitoring user list (comma-separated)
LISTEN_GROUPS=               # Monitoring group list (comma-separated)
GROUP_PLUS_USERS=            # Group privileged user list

# Timeout Settings
REQUEST_TIMEOUT=300          # Request timeout
IMG_DOWNLOAD_TIMEOUT=30      # Image download timeout

📋 System Requirements

  • Python: 3.12+
  • Dependencies: wxauto>=39.1.15
  • System: Windows (WeChat PC version)
  • N8N: Configured N8N workflow instance

🔧 Claude Code Automated Deployment Tool

🚀 Features Overview

This is a toolset for automating the deployment of Claude Code and Claude Code Proxy, with support for:

  • Auto Dependency Installation - Detects and installs uv, npm, and Claude Code
  • 🔄 Proxy Service Management - Automatically installs and configures Claude Code Proxy
  • 🚀 One-Click Start - Configures environment variables and starts the services
  • Port Conflict Handling - Intelligently detects and resolves port occupation issues
  • 🔧 Configuration Management - Automatically configures the .env file and environment variables
  • 🌐 Cross-Platform Support - Supports Windows, macOS, and Linux

🖥️ System Support

| System | Script File | Description | |---|---|---| | 🐧 Linux/macOS | Claude_code_proxy.sh | Bash script for Unix-like systems | | 🪟 Windows | Claude_code_proxy.ps1 | PowerShell script for Windows |

🔌 Copilot-API Proxy Service

🚀 Features Overview

copilot-api is a proxy service that forwards GitHub Copilot API calls to Claude Code, supporting:

  • 🔄 API Proxy Forwarding - Seamlessly forwards GitHub Copilot API calls to Claude Code
  • 🔑 GitHub Authentication - Supports GitHub device authorization flow
  • 🎯 Model Mapping - Automatically maps GitHub Copilot models to corresponding Claude models
  • Local Deployment - Runs proxy service locally for privacy protection
  • 🛠️ Simple Configuration - One-click installation and configuration for quick setup
  • 🌐 High Compatibility - Fully compatible with GitHub Copilot API interface

💡 How It Works

graph LR
A["GitHub Copilot Client"] --> B["copilot-api Proxy Service<br/>(localhost:4141)"]
B --> C["Claude Code"]
C --> D["Claude API"]

style B fill:#e1f5fe
style C fill:#f3e5f5
style D fill:#e8f5e8

🛠️ Installation & Configuration

1. Install Dependencies

Ensure Node.js is installed on your system, then install the required tools:

# Install copilot-api
npm install -g copilot-api

# Install Claude Code
npm install -g @anthropic-ai/claude-code

2. Start Proxy Service

Open the first terminal and start the proxy service:

copilot-api start

The system will prompt for GitHub authorization. Follow the instructions to visit the page and enter the device code to complete authorization.

3. Configure Claude Code

Add configuration to ~/.claude/settings.json:

{
  "env": {
    "ANTHROPIC_BASE_URL": "http://localhost:4141",
    "ANTHROPIC_AUTH_TOKEN": "dummy",
    "ANTHROPIC_MODEL": "claude-sonnet-4",
    "ANTHROPIC_SMALL_FAST_MODEL": "claude-3.7-sonnet",
    "DISABLE_NON_ESSENTIAL_MODEL_CALLS": "1",
    "CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1"
  }
}

4. Start Claude Code

In the second terminal, execute:

claude

📋 System Requirements

  • Node.js: 16.0+
  • GitHub Account: Requires GitHub Copilot access permissions
  • Network Connection: Stable internet connection for authentication

🚀 Quick Start

1. Clone the Project

git clone https://github.com/sylearn/AICode.git
cd AICode/Claude_Code

2. Run the Script

For Linux/macOS

# Grant execution permission to the script
chmod +x Claude_code_proxy.sh

# Run the script
./Claude_code_proxy.sh

For Windows

# Run PowerShell as Administrator
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

# Run the script
.\Claude_code_proxy.ps1

3. Follow the Prompts to Complete Configuration

The script will automatically detect your environment and guide you through the configuration process.

💡 Features

🔍 Automatic Environment Detection

  • Checks if Node.js and npm are installed
  • Checks if the Python package manager uv is installed
  • Checks if Claude Code is already installed
  • Checks if Git is available

📦 Automatic Dependency Installation

  • uv Installation: Automatically installs the Python package manager from the official source
  • Claude Code Installation: Installs Claude Code globally via npm
  • Proxy Service Installation: Automatically clones and configures Claude Code Proxy

🔧 Smart Configuration Management

  • Automatically generates and updates the .env configuration file
  • Intelligently detects the local IP address
  • Automatically configures proxy server parameters
  • Supports custom model and API configurations

⚡ Port Conflict Handling

  • Automatically detects port usage status
  • Intelligently identifies and terminates conflicting processes
  • Supports interactive user choices for handling conflicts

📋 System Requirements

Basic Requirements

  • Operating System: Windows 10+, macOS 10.14+, Linux (Ubuntu 18.04+)
  • Network: A stable internet connection
  • Permissions: Administrator privileges (for installing dependencies)

Software Dependencies

| Software | Version Requirement | Auto-Install | Notes | |---|---|---|---| | Node.js | 16.0+ | ❌ | Requires manual installation | | npm | 8.0+ | ✅ | Installed with Node.js | | Git | 2.0+ | ❌ | Requires manual installation | | uv | Latest | ✅ | Script will install automatically | | Claude Code | Latest | ✅ | Script will install automatically |

🛠️ Detailed Usage Instructions

First Time Use

  1. Prepare Your Environment

    • Ensure Node.js and Git are installed
    • Have your OpenAI API Key ready
    • Have your API Base URL ready
  2. Run the Script

    • Download and run the script for your operating system
    • The script will auto-detect the environment and install any missing dependencies
  3. **Configure Parameter

View on GitHub
GitHub Stars254
CategoryDevelopment
Updated8h ago
Forks21

Languages

Python

Security Score

95/100

Audited on Apr 2, 2026

No findings