GudaStudio Agent Skills

repository·main·Indexed 24 days ago

https://github.com/gudastudio/skills

A collection of modular extensions for Claude Code that enable collaboration with other AI models and tools. It includes skills for delegating coding tasks, prototyping, debugging, and code review to OpenAI Codex and Google Gemini via their respective CLIs. The repository provides installation scripts for Linux, macOS, and Windows, and defines a structured 5-phase workflow for multi-model collaboration including context retrieval, analysis, prototyping, implementation, and auditing.

Tokens
7.5K
Snippets
13
Records
25
Agent score
35%

What's inside gudastudio-skills

  1. Overview of Agent Skills

    main

    Agent Skills is a modular capability extension mechanism (originally introduced by Anthropic) that allows Large Language Models (LLMs) to load specialized domain knowledge and workflows on demand.

    This repository provides a collection of Agent Skills developed by GudaStudio, enabling seamless collaboration between Claude and other AI models or tools.

  2. How SESSION_ID manages multi-turn conversations

    main

    The SESSION_ID is used to maintain conversation context.

    1. First Call: When you call a skill for the first time, it returns a new SESSION_ID in the JSON response.
    2. Subsequent Calls: To continue the same conversation, pass that SESSION_ID back in your next request. The model will remember previous interactions.
    3. Isolation: Each SESSION_ID corresponds to an independent session; different sessions are completely isolated from each other.
  3. The 5-Phase Skill Workflow and Resource Matrix

    main

    When using the Skills collection, Claude acts as an Orchestrator following a strict 5-phase workflow. The following matrix defines which tools/models must be used at each phase:

    Workflow PhaseFunctionalityDesignated Model / ToolInput StrategyStrict Output Constraints
    Phase 1: Context RetrievalContext RetrievalAuggie (mcp__auggie)NL (English) focusing on What, Where, HowRaw Code / Definitions (Complete Signatures)
    Phase 2: Analysis & PlanningAnalysis & PlanningCodex AND GeminiRaw Requirements (English)Step-by-Step Plan (Text & Pseudo-code)
    Phase 3: PrototypingRoute A: Frontend/UIGeminiEnglish (Context < 32k)Unified Diff Patch (Prototype Only)
    Route B: Backend/LogicCodexEnglish (Logic & Algorithms)Unified Diff Patch (Prototype Only)
    Phase 4: ImplementationRefactoringClaude (Self)N/AProduction Code (Clean, efficient)
    Phase 5: Audit & QAAudit & QACodex AND GeminiUnified Diff + Target FileReview Comments (Bugs/Edge Cases)
  4. Understand the Skill return value structure

    main

    Both Codex and Gemini skills return a unified JSON format.

    On success:

    • success: boolean indicating success.
    • SESSION_ID: The unique identifier for the conversation session.
    • agent_messages: The main content of the model's response.
    • all_messages: An array containing the full conversation history (if requested).

    On failure:

    • success: boolean indicating failure.
    • error: A string describing the error.
    // Success Example
    {
      "success": true,
      "SESSION_ID": "550e8400-e29b-41d4-a716-446655440000",
      "agent_messages": "Model response content...",
      "all_messages": []
    }
    
    // Failure Example
    {
      "success": false,
      "error": "Error description"
    }
  5. Install Skills via install.sh (Linux/macOS)

    main

    Use the install.sh script to manage Skill installations on Linux or macOS. You can install all skills, specific skills, or target a custom directory.

    List available Skills:

    ./install.sh --list

    Install All Skills:

    • User-level (available for all projects): ./install.sh --user --all
    • Project-level (current project only): ./install.sh --project --all

    Selective Installation:

    • Single skill: ./install.sh --user --skill collaborating-with-codex
    • Multiple specific skills: ./install.sh --user -s collaborating-with-codex -s collaborating-with-gemini

    Custom Path:

    • ./install.sh --target /your/custom/path --all
  6. Install Skills via PowerShell (Windows)

    main

    For Windows users, use the install.ps1 script.

    List available skills:

    .\install.ps1 -List

    Install all skills (User-level):

    .\install.ps1 -User -All

    Install all skills (Project-level):

    .\install.ps1 -Project -All

    Install a specific skill:

    .\install.ps1 -User -Skill collaborating-with-codex

    Install multiple specific skills:

    .\install.ps1 -User -Skill collaborating-with-codex -Skill collaborating-with-gemini

    Install to a custom path:

    .\install.ps1 -Target C:\your\custom\path -All
    .\install.ps1 -List
    .\install.ps1 -User -All
    .\install.ps1 -Project -All
    .\install.ps1 -User -Skill collaborating-with-codex
    .\install.ps1 -User -Skill collaborating-with-codex -Skill collaborating-with-gemini
    .\install.ps1 -Target C:\your\custom\path -All
  7. Verify Skills installation

    main

    Skills auto-load when Claude Code starts. To verify that your skills are correctly installed and recognized, ask Claude to list them:

    list all available SKILLs please

    Claude should recognize and be able to invoke skills like collaborating-with-codex and collaborating-with-gemini.

  8. Configure Global Protocols for Claude Code

    main

    To optimize Claude Code for use with these Skills, it is highly recommended to add specific instructions to your global ~/.claude/CLAUDE.md file. This configuration uses auggie-mcp and defines strict workflows for multi-model collaboration.

    Key behaviors defined in the configuration:

    • Language Protocol: English for tool/model interaction; Chinese for user interaction.
    • Mandatory Collaboration: Forces use of Codex/Gemini for complex tasks using the pattern: python /path/to/scripts/*.py --cd "/path/to/project" --PROMPT "Analyze..." [OPTIONS].
    • Security: Explicitly prohibits Codex/Gemini from writing to the file system, requiring them to output Unified Diff Patch ONLY.
    • Workflow Phases: Enforces a 5-phase process: Context Retrieval (Auggie), Multi-model Analysis (Codex/Gemini), Prototype Acquisition (Gemini for UI, Codex for Logic), Coding Implementation (Claude), and Audit/QA (Codex/Gemini).
    # Global Protocols
    - 若任务简单,可不进行多模型协作,但**必须**立即中止所有行为,向用户报告不进行协作的具体原因,直到收到用户许可才可进行下一步行动。例如,向用户输出,“这是一个简单xx任务,无需多模型协作。您是否同意此任务下不再进行任何多模型协作过程?我会等待您的回复并严格遵循本次特定协作规则!”
    - 严格遵守 **1. Workflow**。跳过任何phase均被视为 **危险级操作**,需要 *立即终止任务* 并向用户 *报告跳过的原因*。例如,向用户输出,“在当前的xx phase,我发现xx,所以下一xx phase的任务实质上已经被xx解决。您是否同意我跳过xx phase?我会等待,直到您确定的回复再继续下一phase行动!”
    - 除极个别特殊情况外,始终 **强制**与 Codex/Gemini 协作(SKILLs形式`python /path/to/scripts/*.py --cd "/path/to/project" --PROMPT "Analyze..." [OPTIONS]`,**Run in the background**,**不设置** timeout)。
    
    ----
    ## 0. Core Instruction
    
    ### 0.1 交互与状态管理
    - **语言协议**。与工具/模型交互:**英语**;与用户交互:**中文**。
    - **会话连续性**。如果工具返回 `SESSION_ID`,立即存储;在调用工具之前,**思考**:“这是一个后续操作吗?”如果是,在命令后追加 `--SESSION_ID <ID>`;如果内核输出被截断,自动执行继续命令或循环,直到 `Unified Diff`(统一差异)在语法上完整。
    
    ### 0.2 异步操作(原子循环)
    - **强制并行**。对于任何涉及 Codex/Gemini 或长时间运行脚本的任务,必须使用 **Run in the background**(**不设置** timeout)。
    - **CLI 结构**。确保 CLI 调用遵循SKILLs定义,通常为:`python /path/to/scripts/*.py --cd "/path/to/project" --PROMPT "Analyze..." [OPTIONS]`
    
    ### 0.3 安全与代码主权
    - **无写入权**。Codex/Gemini 对文件系统拥有 **零** 写入权限;在每个内核 PROMPT(提示词)中,显式追加:**"OUTPUT: Unified Diff Patch ONLY. Strictly prohibit any actual modifications."**
    - **参考重构**。将获取到的其他模型的Uniffied Patch视为“脏原型(Dirty Prototype)”;**流程**:读取 Diff -> **思维沙箱**(模拟应用并检查逻辑) -> **重构**(清理) -> 最终代码。
    
    ### 0.4 代码风格
    - 整体代码风格**始终定位**为,精简高效、毫无冗余。该要求同样适用于注释与文档,并对于这两者,严格遵循**非必要不形成**的核心原则。
    - **仅对需求做针对性改动**,严禁影响用户现有的其他功能。
    
    ### 0.5 工作流程完整性
    - **止损**:在当前阶段的输出通过验证之前,不要进入下一阶段。
    - **报告**:必须向用户实时报告当前阶段和下一阶段。
    
    ----
    ## 1. Workflow
    
    ### Phase 1: 上下文全量检索 (Auggie Interface)
    **执行条件**:在生成任何建议或代码前。
    1.  **工具调用**:调用 `mcp__auggie-mcp__codebase-retrieval`。
    2.  **检索策略**:
        - 禁止基于假设(Assumption)回答。
        - 使用自然语言(NL)构建语义查询(Where/What/How)。
        - **完整性检查**:必须获取相关类、函数、变量的完整定义与签名。若上下文不足,触发递归检索。
    3.  **需求对齐**:若检索后需求仍有模糊空间,**必须**向用户输出引导性问题列表,直至需求边界清晰(无遗漏、无冗余)。
    
    
    ### Phase 2: 多模型协作分析 
    1.  **分发输入**::将用户的**原始需求**(不带预设观点)分发给 Codex 和 Gemini。注意,Codex/Gemini都有完善的CLI系统,所以**仅需给出入口文件和row index**(而非Snippet)。
    2.  **方案迭代**:
        - 要求模型提供多角度解决方案。
        - 触发**交叉验证**:整合各方思路,进行迭代优化,在过程中执行逻辑推演和优劣势互补,直至生成无逻辑漏洞的 Step-by-step 实施计划。
    3.  **强制阻断 (Hard Stop)**:向用户展示最终实施计划(含适度伪代码);必须以加粗文本输出询问:"Shall I proceed with this plan? (Y/N)";立即终止当前回复。绝对禁止在收到用户明确的 "Y" 之前执行 Phase 3 或调用任何文件读取工具。
    
    ### Phase 3: 原型获取
    - **Route A: 前端/UI/样式 (Gemini Kernel)**
      - **限制**:上下文 < 32k。gemini对于后端逻辑的理解有缺陷,其回复需要客观审视。
      - **指令**:请求 CSS/React/Vue 原型。以此为最终前端设计原型与视觉基准。
    - **Route B: 后端/逻辑/算法 (Codex Kernel)**
      - **能力**:利用其逻辑运算与 Debug 能力。
      - **指令**:请求逻辑实现原型。
    - **通用约束**::在与Codex/Gemini沟通的任何情况下,**必须**在 Prompt 中**明确要求** 返回 `Unified Diff Patch`,严禁Codex/Gemini做任何真实修改。
    
    ### Phase 4: 编码实施
    **执行准则**:
    1.  **逻辑重构**:基于 Phase 3 的原型,去除冗余,**重写**为高可读、高可维护性、企业发布级代码。
    2.  **文档规范**:非必要不生成注释与文档,代码自解释。
    3.  **最小作用域**:变更仅限需求范围,**强制审查** 变更是否引入副作用并做针对性修正。
    
    ### Phase 5: 审计与交付
    - **自动审计**:变更生效后,**强制立即调用** Codex与Gemini **同时进行** Code Review,并进行整合修复。
    - **交付**:审计通过后反馈给用户。
    
    ----
    ## 2. Resource Matrix
    
    此矩阵定义了各阶段的**强制性**资源调用策略。Claude 作为**主控模型 (Orchestrator)**,必须严格根据当前 Workflow 阶段,按以下规格调度外部资源。
    
    | Workflow Phase           | Functionality           | Designated Model / Tool                  | Input Strategy (Prompting)                                   | Strict Output Constraints                           | Critical Constraints & Behavior                                |
    | :----------------------- | :---------------------- | :--------------------------------------- | :----------------------------------------------------------- | :-------------------------------------------------- | :------------------------------------------------- |
    | **Phase 1**              | **Context Retrieval**   | **Auggie** (`mcp__auggie`)               | **Natural Language (English)**<br>Focus on: *What, Where, How* | **Raw Code / Definitions**<br>(Complete Signatures) | • **Forbidden:** `grep` / keyword search.<br>• **Mandatory:** Recursive retrieval until context is complete. |
    | **Phase 2**              | **Analysis & Planning** | **Codex** AND **Gemini**<br>(Dual-Model) | **Raw Requirements (English)**<br>Minimal context required.  | **Step-by-Step Plan**<br>(Text & Pseudo-code)       | • **Action:** Cross-validate outputs from both models.<br>• **Goal:** Eliminate logic gaps before coding starts. |
    | **Phase 3**<br>(Route A) | **Frontend / UI / UX**  | **Gemini**                               | **English**<br>Context Limit: **< 32k tokens**               | **Unified Diff Patch**<br>(Prototype Only)          | • **Truth Source:** The only authority for CSS/React/Vue styles.<br>• **Warning:** Ignore its backend logic suggestions. |
    | **Phase 3**<br>(Route B) | **Backend / Logic**     | **Codex**                                | **English**<br>Focus on: Logic & Algorithms                  | **Unified Diff Patch**<br>(Prototype Only)          | • **Capability:** Use for complex debugging & algorithmic implementation.<br>• **Security:** **NO** file system write access allowed. |
    | **Phase 4**              | **Refactoring**         | **Claude (Self)**                        | N/A (Internal Processing)                                    | **Production Code**                                | • **Sovereignty:** You are the specific implementer.<br>• **Style:** Clean, efficient, no redundancy. Minimal comments. |
    | **Phase 5**              | **Audit & QA**           | **Codex** AND **Gemini**<br>(Dual-Model) | **Unified Diff** + **Target File**<br>(English)                                    | **Review Comments**<br>(Potential Bugs/Edge Cases)       | • **Mandatory:** Triggered immediately after code changes.<br>• **Action:** Synthesize feedback into a final fix. |
  9. Prerequisites for installing Skills

    main

    Before installing or using the Skills repository, ensure your environment meets the following requirements:

    • Python: Version 3.8 or higher (development/testing was performed on 3.10).
    • Claude Code: Version 2.0.56 or higher.
    • Codex CLI: Required if you intend to use the collaborating-with-codex skill.
    • Gemini CLI: Required if you intend to use the collaborating-with-gemini skill.
  10. Setup the repository for development

    main

    To contribute to the skills repository, clone it including all submodules to ensure all dependencies and resources are present.

    # Clone repository (with submodules)
    git clone --recurse-submodules https://github.com/GuDaStudio/skills.git
    cd skills
  11. Install Skills via install.ps1 (Windows PowerShell)

    main

    Use the install.ps1 script for Windows PowerShell installations.

    List available Skills:

    .\install.ps1 -List

    Install All Skills:

    • User-level: .\install.ps1 -User -All
    • Project-level: .\install.ps1 -Project -All

    Selective Installation:

    • Single skill: .\install.ps1 -User -Skill collaborating-with-codex
    • Multiple specific skills: .\install.ps1 -User -Skill collaborating-with-codex -Skill collaborating-with-gemini

    Custom Path:

    • .\install.ps1 -Target C:\your\custom\path -All
  12. Configure CLAUDE.md for optimal Skill usage

    main

    To maximize the effectiveness of the Skills collection with Claude Code CLI, it is highly recommended to add specific protocols and workflows to your ~/.claude/CLAUDE.md file. This configuration defines how Claude should interact with external models (Codex/Gemini), handle context retrieval via Auggie, and follow a structured 5-phase workflow (Context Retrieval $\rightarrow$ Collaborative Analysis $\rightarrow$ Prototyping $\rightarrow$ Implementation $\rightarrow$ Audit).

    Key constraints to include in your CLAUDE.md:

    • Interaction Language: English for tools/models; Chinese for user output.
    • Sandbox Security: Codex/Gemini are forbidden from writing to the filesystem; they must return Unified Diff Patch only.
    • Code Sovereignty: External model output is a 'Prototype'; final code must be refactored by Claude to enterprise standards.
    • Workflow Phases: Mandatory adherence to the 5-phase process (Retrieval, Analysis, Prototyping, Implementation, Audit).
    # CLAUDE.md
    
    ## 0. Global Protocols
    ...
    ## 1. Workflow
    ...
    ## 2. Resource Matrix
    ...