### Example AI-driven Configuration Task Source: https://github.com/tukuaiai/vibe-coding-cn/blob/develop/assets/documents/guides/getting-started/OpenCode-CLI配置.md Demonstrates how to instruct the OpenCode CLI to perform complex configuration tasks using natural language. Examples include installing servers, deploying projects, configuring skills, setting environment variables, and installing dependencies. ```bash # Example: Install MCP server "Help me install the filesystem MCP server and configure it with opencode." # Example: Deploy GitHub open-source project "Clone the https://github.com/xxx/yyy project, read the README, and help me complete all dependency installations and environment configurations." # Example: Configure Skills "Read the project structure and create appropriate AGENTS.md rule files for this project." # Example: Configure environment variables "Check which environment variables the project needs, help me create a .env file template, and explain the purpose of each variable." # Example: Install dependencies "Analyze package.json / requirements.txt, install all dependencies, and resolve version conflicts." ``` -------------------------------- ### My Neovim: Installation and Setup (Bash) Source: https://github.com/tukuaiai/vibe-coding-cn/wiki/工具使用指南 安装和配置 My Neovim,一个预配置的 Neovim 开发环境。此脚本会备份现有配置并复制新的配置,然后启动 Neovim 以自动安装插件。 ```bash # 备份现有配置 mv ~/.config/nvim ~/.config/nvim.bak # 复制配置 cp -r libs/external/my-nvim/nvim-config ~/.config/nvim # 启动 Neovim(自动安装插件) nvim ``` -------------------------------- ### Headless ProxyCast Setup Script Source: https://github.com/tukuaiai/vibe-coding-cn/blob/develop/assets/documents/guides/playbook/ProxyCast配置文档.md This bash script automates the setup for ProxyCast in headless mode. It creates directories, initializes the database (by briefly starting and stopping the application), and adds credentials for Kiro, Gemini (multiple API keys), and OpenRouter to the SQLite database. It assumes ProxyCast is in a specified directory. ```bash #!/bin/bash # headless-setup.sh - 无头模式一键配置脚本 PROXYCAST_DIR="/path/to/proxycast-main" DB_PATH="$HOME/.proxycast/proxycast.db" CONFIG_PATH="$HOME/.config/proxycast/config.json" # 创建目录 mkdir -p ~/.proxycast ~/.config/proxycast # 初始化数据库(首次运行会自动创建) $PROXYCAST_DIR/src-tauri/target/release/proxycast & sleep 3 pkill -f proxycast # 添加凭证 add_credential() { local type=$1 local data=$2 local name=$3 sqlite3 $DB_PATH "INSERT INTO provider_pool_credentials (uuid, provider_type, credential_data, is_healthy, check_health, error_count, is_disabled, name, usage_count, created_at, updated_at, source) VALUES ('$(uuidgen)', '$type', '$data', 1, 1, 0, 0, '$name', 0, $(date +%s), $(date +%s), 'manual');" } # 添加 Kiro add_credential "kiro" '{"type":"kiro_o_auth","creds_file_path":"'$HOME'/.aws/sso/cache/kiro-auth-token.json"}' "Kiro OAuth" # 添加 Gemini API Keys GEMINI_KEYS=( "AIzaSyBt4pIYmLYheuMpXSCj5VLkCA-fhfdEVT4" "AIzaSyBSllSwrObqvUiXqFG5RUJXB6woZoBSaTk" # 添加更多 keys... ) for i in "${!GEMINI_KEYS[@]}"; do add_credential "gemini_api_key" '{"type":"gemini_api_key","api_key":"'${GEMINI_KEYS[$i]}'","base_url":null,"excluded_models":[]}' "Gemini Key $((i+1))" done # 添加 OpenRouter add_credential "openai" '{"type":"open_a_i_key","api_key":"sk-or-v1-xxx","base_url":"https://openrouter.ai/api"}' "OpenRouter" echo "配置完成!" ``` -------------------------------- ### Auggie MCP Usage Examples Source: https://github.com/tukuaiai/vibe-coding-cn/blob/develop/assets/documents/guides/playbook/auggie-mcp配置文档.md Provides examples of using Auggie MCP for code retrieval and analysis. These commands demonstrate searching for specific file types, searching within directories, finding function implementations, and identifying API endpoint definitions. ```bash # Search for all Python files claude --print "使用 codebase-retrieval 搜索 *.py 文件" # Search within a specific directory claude --print "使用 codebase-retrieval 搜索 src/ 目录下的文件" # Find function implementation claude --print "使用 codebase-retrieval 查找 main 函数的实现" # Search for API endpoint definitions claude --print "使用 codebase-retrieval 搜索所有 API 端点定义" ``` -------------------------------- ### Start AI Chat Converter Tool Source: https://github.com/tukuaiai/vibe-coding-cn/blob/develop/assets/repo/chat-vault/services/chat-vault/docs/AI_PROMPT.md Provides commands to launch the AI Chat Converter. It can be started by double-clicking a script or via the command line, with options for continuous monitoring or a single sync. ```bash ./start.sh # Linux/macOS start.bat # Windows(双击) ``` ```bash cd ai-chat-converter python src/main.py --watch # 持续监控(推荐) python src/main.py # 同步一次就退出 ``` ```bash nohup ./start.sh > /dev/null 2>&1 & ``` -------------------------------- ### Initialize and Verify oh-my-tmux Configuration Source: https://github.com/tukuaiai/vibe-coding-cn/blob/develop/assets/skills/tmux-autopilot/references/getting_started.md This script checks the tmux version, creates symbolic links for configuration files, starts a new session, and performs basic diagnostic commands to ensure the environment is set up correctly. ```bash # 1) 确认 tmux 版本 >= 2.6 tmux -V # 2) 软链配置(不会覆盖已有 .tmux.conf.local,如需自定义请编辑该文件) ln -sfn /home/lenovo/zip/vibe-coding-cn/assets/repo/.tmux/.tmux.conf ~/.tmux.conf cp -n /home/lenovo/zip/vibe-coding-cn/assets/repo/.tmux/.tmux.conf.local ~/.tmux.conf.local # 3) 启动会话并验证前缀 tmux new -s demo -n shell # 在 tmux 内按 ? 打开快捷键帮助,确认状态栏与主题正常 # 4) 基础自检:列窗、抓取、发送 tmux list-windows tmux capture-pane -t demo:0.0 -p -S -10 tmux send-keys -t demo:0.0 "echo ok" Enter ``` -------------------------------- ### OpenCode CLI Installation Methods Source: https://github.com/tukuaiai/vibe-coding-cn/blob/develop/assets/documents/guides/getting-started/OpenCode-CLI配置.md Provides multiple ways to install the OpenCode CLI, including a one-click script, npm, Homebrew, Scoop, and Chocolatey. Choose the method that best suits your operating system and package manager. ```bash # One-click installation (recommended) curl -fsSL https://opencode.ai/install | bash # Or using npm npm install -g opencode-ai # Or using Homebrew (macOS/Linux) brew install anomalyco/tap/opencode # Windows - Scoop scoop bucket add extras && scoop install extras/opencode # Windows - Chocolatey choco install opencode ``` -------------------------------- ### Start Neovim Source: https://github.com/tukuaiai/vibe-coding-cn/blob/develop/assets/repo/my-nvim/nvim-config/README.md These commands show how to start Neovim directly using its path or by setting up and using a recommended alias 'n' for convenience. ```bash # Direct start ~/.local/bin/nvim # Using an alias (recommended) alias n='~/.local/bin/nvim' n ``` -------------------------------- ### mxGraphModel XML Flowchart Structure Example Source: https://github.com/tukuaiai/vibe-coding-cn/blob/develop/assets/repo/prompts-library/docs/excel-data.md An example illustrating the structure of an mxGraphModel XML for a flowchart, including node and edge definitions with specific styling for different element types (start, process, decision, end). ```xml ``` -------------------------------- ### Recommended OpenCode Workflow Source: https://github.com/tukuaiai/vibe-coding-cn/blob/develop/assets/documents/guides/getting-started/OpenCode-CLI配置.md Outlines a suggested workflow for using the OpenCode CLI effectively. It emphasizes starting in the project directory, initializing the project, selecting a free model, and utilizing the 'Plan' mode for AI-driven task execution. ```bash # 1. Navigate to your project directory cd /path/to/project opencode # 2. Initialize the project /init # 3. Switch to a free model /models # Select GLM-4.7 or MiniMax M2.1 # 4. Start working # First, use Tab to switch to Plan mode, let the AI plan the task. # Confirm the plan before letting the AI execute. ``` -------------------------------- ### Install OpenClaw via curl script Source: https://github.com/tukuaiai/vibe-coding-cn/blob/develop/assets/documents/case-studies/openclaw-dev/OpenClaw 橙皮书 - AI进化论花生.md Uses the official installation script to automatically detect the environment, install Node.js if necessary, and set up OpenClaw. ```bash curl -sSL https://get.openclaw.ai | bash ``` -------------------------------- ### Install OpenClaw via npm Source: https://github.com/tukuaiai/vibe-coding-cn/blob/develop/assets/documents/case-studies/openclaw-dev/OpenClaw 橙皮书 - AI进化论花生.md Installs the OpenClaw package globally and initializes the daemon process for background execution. ```bash npm install -g openclaw@latest openclaw onboard --install-daemon ``` -------------------------------- ### Mermaid Flowchart Example Source: https://github.com/tukuaiai/vibe-coding-cn/blob/develop/assets/repo/prompts-library/docs/excel-data.md A typical Mermaid flowchart example demonstrating node definitions, connections, layout direction, and comments. This serves as a style reference for generating similar flowcharts. ```mermaid graph TD A[开始] --> B{用户输入问题}; B --> C{用户设置润色版本数量}; C --> D[点击“处理问题”按钮]; D --> E{禁用按钮, 清空旧结果/选项}; E --> F[显示加载状态]; F --> G{调用 API (sendGeneralRequest)
请求润色问题}; G -- 成功 --> H{显示原始问题和润色后的选项
(单选框 + 文本框)}; G -- 失败 --> I[显示错误信息]; H --> J{用户选择一个问题版本
(可编辑)}; I --> K[启用“处理问题”按钮]; J --> L{用户设置 Agent 输出次数}; L --> M[点击“发送给 Agents”按钮]; M --> N{禁用按钮, 清空/准备结果表格}; N --> O{为每个 Agent 和每个输出次数
异步调用 API (loadAndDisplay)}; O -- 进行中 --> P[在表格对应单元格显示“加载中...”]; P -- 成功 --> Q[在单元格显示格式化后的 Agent 回复]; P -- 失败 --> R[在单元格显示错误信息]; Q --> S{所有请求完成}; R --> S; S --> T[启用按钮]; T --> U[结束]; H --> K; %% 成功选择后也需要启用按钮 T --> B; %% 允许用户再次输入新问题 ``` -------------------------------- ### Claude Code Workflow (YAML) Source: https://github.com/tukuaiai/vibe-coding-cn/blob/develop/assets/repo/prompts-library/docs/excel-data.md Illustrates the 'Thinking Loop Path' workflow of Claude Code. It describes the cyclical process starting from user input, moving through different layers of analysis (Phenomenon, Essence, Philosophy), and culminating in a comprehensive output. ```yaml # 思维工作流 workflow: name: "思维循环路径" trigger: source: "用户输入" example: "\"我的代码报错了\"" steps: - action: "接收" layer: "现象层" transition: "───→" - action: "下潜" layer: "本质层" transition: "↓" - action: "升华" layer: "哲学层" transition: "↓" - action: "整合" layer: "本质层" transition: "↓" - action: "输出" layer: "现象层" transition: "←───" output: destination: "用户" example: "\"解决方案+深度洞察\"" ``` -------------------------------- ### Start Chat Vault Service Source: https://github.com/tukuaiai/vibe-coding-cn/blob/develop/assets/repo/chat-vault/README.md Commands to initialize and start the Chat Vault service on different operating systems. These scripts handle virtual environment setup and dependency installation automatically. ```bash cd services/chat-vault # Linux/macOS ./start.sh # Windows start.bat ``` -------------------------------- ### Start and Use Neovim Source: https://github.com/tukuaiai/vibe-coding-cn/blob/develop/assets/repo/my-nvim/README.md Instructions on how to launch the configured Neovim editor, either directly using its path or by setting up a recommended alias for convenience. ```bash # 直接启动 ~/.local/bin/nvim # 或使用别名(推荐) alias n='~/.local/bin/nvim' n ``` -------------------------------- ### Prompts Library: Setup and Run (Python) Source: https://github.com/tukuaiai/vibe-coding-cn/wiki/工具使用指南 设置和运行 Prompts Library 工具,用于在 Excel 和 Markdown 格式之间批量转换提示词。需要创建虚拟环境、安装依赖并运行主脚本。 ```python cd libs/external/prompts-library # 创建虚拟环境 python3 -m venv venv source venv/bin/activate # 安装依赖 pip install -r requirements.txt # 运行 python main.py ``` -------------------------------- ### Install and Enable Tunnel Service Source: https://github.com/tukuaiai/vibe-coding-cn/blob/develop/assets/documents/guides/playbook/REMOTE_TUNNEL_GUIDE.md Registers the VS Code tunnel as a persistent systemd user service to ensure it starts automatically with the WSL environment. ```bash /usr/local/bin/code tunnel service install --accept-server-license-terms --name wsl-lenovo systemctl --user enable code-tunnel.service systemctl --user restart code-tunnel.service ``` -------------------------------- ### Install Auggie CLI Source: https://github.com/tukuaiai/vibe-coding-cn/blob/develop/assets/documents/guides/playbook/auggie-mcp配置文档.md Installs the Auggie CLI globally using npm. This command requires Node.js and npm to be installed on the system. It installs the prerelease version of the Auggie CLI. ```bash npm install -g @augmentcode/auggie@prerelease ``` -------------------------------- ### Install VS Code CLI on WSL Source: https://github.com/tukuaiai/vibe-coding-cn/blob/develop/assets/documents/guides/playbook/REMOTE_TUNNEL_GUIDE.md Installs the VS Code command-line interface on a Debian/Ubuntu-based WSL distribution by adding the official Microsoft package repository. ```bash sudo apt-get update sudo apt-get install -y wget gpg apt-transport-https wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor | sudo tee /etc/apt/keyrings/packages.microsoft.gpg >/dev/null echo "deb [arch=amd64,arm64 signed-by=/etc/apt/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" | sudo tee /etc/apt/sources.list.d/vscode.list sudo apt-get update sudo apt-get install -y code which code ``` -------------------------------- ### Example Delivery File Manifest Source: https://github.com/tukuaiai/vibe-coding-cn/blob/develop/assets/workflow/20260225-Markdown转EPUB-v1.0.md This example shows a structured list of files to be delivered after a successful Markdown to EPUB conversion. It includes the generated EPUB file and associated evidence files like logs and reports, ensuring all necessary components are accounted for. ```text EVID-001 Tool Version: ebook-convert --version output EVID-002 Conversion Command: Full command line used EVID-003 Conversion Log/Report: conversion.log, report.json (if applicable) EVID-004 Validation Conclusion: Directory exists, metadata matched, key content sampled. ``` -------------------------------- ### Python: Initialize PromptLibrarySyncer Source: https://github.com/tukuaiai/vibe-coding-cn/blob/develop/assets/repo/prompts-library/docs/开发文档.md Initializes the PromptLibrarySyncer class, loading configuration from a YAML file and authenticating with the Google Sheets API. It also initializes a statistics dictionary to track processed items. ```python import os import re import json import yaml from datetime import datetime from typing import Dict, List, Tuple, Optional import pandas as pd from google.oauth2 import service_account from googleapiclient.discovery import build class PromptLibrarySyncer: """提示词库同步器""" def __init__(self, config_path: str = 'config.yaml'): """初始化同步器""" self.config = self._load_config(config_path) self.service = self._authenticate() self.stats = {'sheets': 0, 'prompts': 0, 'versions': 0} ``` -------------------------------- ### Get Device Orientation with JavaScript Source: https://github.com/tukuaiai/vibe-coding-cn/blob/develop/assets/skills/telegram-dev/SKILL.md Starts tracking device orientation to get absolute and Euler angle (alpha, beta, gamma) data. Requires the Telegram Web App SDK and specifies a refresh rate. ```javascript tg.DeviceOrientation.start({refresh_rate: 100}, callback); tg.DeviceOrientation.onEvent((event) => { console.log('方向:', event.absolute, event.alpha, event.beta, event.gamma); }); ``` -------------------------------- ### Install Dependencies and Build from Source (Bash) Source: https://github.com/tukuaiai/vibe-coding-cn/blob/develop/assets/repo/prompts-library/README.md This snippet outlines the steps to clone the repository, navigate into the project directory, and install the necessary Python dependencies using pip. It's essential for setting up the development environment. ```bash git clone https://github.com/tukuaiai/prompt-library.git cd prompt-library pip install -r requirements.txt ``` -------------------------------- ### Deploy OpenClaw with Podman Source: https://github.com/tukuaiai/vibe-coding-cn/blob/develop/assets/documents/case-studies/openclaw-dev/OpenClaw 橙皮书 - AI进化论花生.md Starts the OpenClaw service using Podman, a rootless, daemonless alternative to Docker. ```bash podman-compose up -d ``` -------------------------------- ### Verify Auggie MCP Installation Source: https://github.com/tukuaiai/vibe-coding-cn/blob/develop/assets/documents/guides/playbook/auggie-mcp配置文档.md Verifies the Auggie MCP installation by listing the MCP status and testing functionality. The `claude mcp list` command should show 'auggie-mcp' as connected. A sample command to test codebase retrieval is also provided. ```bash # Check MCP status claude mcp list # Expected output: # auggie-mcp: auggie --mcp - ✓ Connected # Test functionality claude --print "使用 codebase-retrieval 搜索当前目录下的所有文件" ``` -------------------------------- ### Start ProxyCast in Headless Mode Source: https://github.com/tukuaiai/vibe-coding-cn/blob/develop/assets/documents/guides/playbook/ProxyCast配置文档.md This section provides commands to start ProxyCast in a headless environment, suitable for servers or Docker. It includes setting the `DISPLAY` environment variable to null or using `Xvfb` for a virtual display, followed by launching the ProxyCast executable. ```bash # 设置无显示环境 export DISPLAY= # 或使用虚拟显示(如果需要) Xvfb :99 -screen 0 1024x768x24 & export DISPLAY=:99 # 启动 ProxyCast ./src-tauri/target/release/proxycast & ``` -------------------------------- ### Context Management Examples (Bash) Source: https://github.com/tukuaiai/vibe-coding-cn/blob/develop/assets/skills/claude-code-guide/references/README.md Demonstrates practical context management scenarios in Bash, including authentication feature development, performance optimization sessions, and bug investigation. It illustrates how context is analyzed, optimized, and adapted dynamically. ```bash # 示例 1: 认证功能开发 # 上下文分析: 当前任务: "实现 OAuth2 认证" 意图内核: 识别安全、数据库、测试需求 记忆内核: 回忆之前的认证实现 提取内核: 从当前代码库中挖掘相关模式 上下文优化: 保留: 安全模式、数据库模式、当前认证代码 压缩: 通用文档、旧示例 移除: 无关的 UI 组件、过时的模式 预加载: OAuth2 规范、测试框架、验证模式 结果: 所有相关上下文立即可用,上下文减少 40% ``` ```bash # 示例 2: 性能优化会话 # 会话上下文演变: 第1小时: 性能分析 → 上下文: 监控工具、指标 第2小时: 瓶颈分析 → 上下文: 特定组件、基准测试 第3小时: 优化实现 → 上下文: 算法、测试 第4小时: 验证 → 上下文: 比较数据、成功指标 智能管理: - 第1小时上下文压缩但保持可访问 - 第2小时模式影响第3小时预测 - 第4小时验证使用压缩的第1小时洞察 - 跨会话: 性能模式存储以供未来项目使用 ``` ```bash # 示例 3: Bug 调查 # 动态上下文适应: 初始: Bug 报告 → 加载错误日志、相关代码 调查: 根因分析 → 扩展到系统架构 解决方案: 修复实现 → 专注于特定组件 验证: 测试 → 包括测试模式、验证工具 上下文智能: - 在调查过程中自动扩展上下文范围 - 压缩不相关的历史上下文 - 在检测到解决方案阶段时预加载测试上下文 - 保留调查轨迹以供未来类似 Bug 使用 ``` ```bash # 带有 REPL 内核验证: # 通过计算验证上下文决策 上下文预测: "用户接下来需要数据库模式" REPL 验证: 用历史数据测试预测准确性 结果:验证后的预测准确率为 85% 以上,未验证的为 60% ``` ```bash # 带有后台自愈: # 上下文管理作为系统健康的一部分 健康监控: 检测响应时间缓慢 上下文管理器: 自动优化上下文 自愈: 主动解决性能问题 ``` ```bash # 带有元待办事项系统: # 任务分解的上下文优化 元待办事项: 生成复杂任务分解 上下文管理器: 为每个任务阶段加载相关上下文 后台: 预加载即将进行的任务上下文 结果: 项目执行过程中上下文无缝可用 ``` ```bash # 上下文使用学习 高利用率模式 → 提高上下文优先级 低利用率模式 → 降低上下文优先级或改进压缩 频繁访问模式 → 移动到更高优先级层 罕见访问模式 → 移动到更低优先级层 # 用户行为适应 上午会话: 偏好架构上下文 下午会话: 偏好实现上下文 晚上会话: 偏好调试和测试上下文 周末会话: 偏好学习和研究上下文 ```