[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71GQ1B2EN35Y8943TT4N6GD":3,"skill-same:01M71GQ1B2EN35Y8943TT4N6GD":104},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":27,"publishedAt":48,"linkOnly":49,"markdownContent":50,"markdownBody":51,"frontMatter":52,"refName":57,"commitSha":58,"skillDirectory":59,"forksCount":60,"repositoryHtmlUrl":61,"repositoryHomepageUrl":6,"ownerHtmlUrl":62,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":63,"install":64,"resources":77},"01M71GQ1B2EN35Y8943TT4N6GD","api-integration-patterns",null,"Subprocess safety, GitHub CLI integration, retry logic, authentication, rate limiting, and timeout handling. Use when integrating external APIs or CLI tools. TRIGGER when: subprocess, gh cli, API call, retry logic, rate limiting, authentication. DO NOT TRIGGER when: internal function calls, pure Python logic, config file edits.","JSGforever\u002Fskillguard","JSGforever","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F85541948?v=4","01M71FQD3E132VMR5F4TAYX3YS","01M71FQD4DYW0XJ4XQ4YQH75Y9",2,"GPL-3.0","https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard\u002Fblob\u002Fmain\u002Fbenchmarks\u002Ffinal\u002Fskills\u002Fasset1__akaszubski--api-integration-patterns\u002FSKILL.md",[17,22],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000010","后端与接口","SCENARIO","使用场景",{"categoryNo":23,"categoryName":24,"taxonomyType":25,"taxonomyTypeDesc":26},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47],"patterns","api integration","integration","api integration patterns","api","injection","subprocess","gh cli","Safety","rate","config","read","command","cli","github cli","when","false","knowledge","authentication","retry","2026-11-10 10:12:30",false,"---\nname: api-integration-patterns\nversion: 1.0.0\ntype: knowledge\ndescription: \"Subprocess safety, GitHub CLI integration, retry logic, authentication, rate limiting, and timeout handling. Use when integrating external APIs or CLI tools. TRIGGER when: subprocess, gh cli, API call, retry logic, rate limiting, authentication. DO NOT TRIGGER when: internal function calls, pure Python logic, config file edits.\"\nkeywords: api, subprocess, github, gh cli, retry, authentication, rate limiting, timeout, command injection, CWE-78, integration\nauto_activate: false\nallowed-tools: [Read]\n---\n\n# API Integration Patterns Skill\n\nStandardized patterns for integrating external APIs and CLI tools in the autonomous-dev plugin ecosystem. Focuses on safety, reliability, and security when calling external services.\n\n## When This Skill Activates\n\n- Integrating external APIs (GitHub, etc.)\n- Executing subprocess commands safely\n- Implementing retry logic\n- Handling authentication\n- Managing rate limits\n- Keywords: \"api\", \"subprocess\", \"github\", \"gh cli\", \"retry\", \"authentication\"\n\n---\n\n## Core Patterns\n\n### 1. Subprocess Safety (CWE-78 Prevention)\n\n**Definition**: Execute external commands safely without command injection vulnerabilities.\n\n**Critical Rules**:\n- ✅ ALWAYS use argument arrays: `[\"gh\", \"issue\", \"create\"]`\n- ❌ NEVER use shell=True with user input\n- ✅ ALWAYS whitelist allowed commands\n- ✅ ALWAYS set timeouts\n\n**Pattern**:\n```python\nimport subprocess\nfrom typing import List\n\ndef safe_subprocess(\n    command: List[str],\n    *,\n    allowed_commands: List[str],\n    timeout: int = 30\n) -> subprocess.CompletedProcess:\n    \"\"\"Execute subprocess with CWE-78 prevention.\n\n    Args:\n        command: Command and arguments as list (NOT string!)\n        allowed_commands: Whitelist of allowed commands\n        timeout: Maximum execution time in seconds\n\n    Returns:\n        Completed subprocess result\n\n    Raises:\n        SecurityError: If command not in whitelist\n        subprocess.TimeoutExpired: If timeout exceeded\n\n    Security:\n        - CWE-78 Prevention: Argument arrays (no shell injection)\n        - Command Whitelist: Only approved commands\n        - Timeout: DoS prevention\n\n    Example:\n        >>> result = safe_subprocess(\n        ...     [\"gh\", \"issue\", \"create\", \"--title\", user_title],\n        ...     allowed_commands=[\"gh\", \"git\"]\n        ... )\n    \"\"\"\n    # Whitelist validation\n    if command[0] not in allowed_commands:\n        raise SecurityError(f\"Command not allowed: {command[0]}\")\n\n    # Execute with argument array (NEVER shell=True!)\n    return subprocess.run(\n        command,\n        capture_output=True,\n        text=True,\n        timeout=timeout,\n        check=True,\n        shell=False  # CRITICAL\n    )\n```\n\n**See**: `docs\u002Fsubprocess-safety.md`, `examples\u002Fsafe-subprocess-example.py`\n\n---\n\n### 2. GitHub CLI (gh) Integration\n\n**Definition**: Standardized patterns for GitHub operations via gh CLI.\n\n**Pattern**:\n```python\ndef create_github_issue(\n    title: str,\n    body: str,\n    *,\n    labels: Optional[List[str]] = None,\n    timeout: int = 30\n) -> str:\n    \"\"\"Create GitHub issue using gh CLI.\n\n    Args:\n        title: Issue title\n        body: Issue body (markdown)\n        labels: Issue labels (default: None)\n        timeout: Command timeout in seconds\n\n    Returns:\n        Issue URL\n\n    Raises:\n        subprocess.CalledProcessError: If gh command fails\n        RuntimeError: If gh CLI not installed\n\n    Example:\n        >>> url = create_github_issue(\n        ...     \"Bug: Login fails\",\n        ...     \"Login button doesn't work\",\n        ...     labels=[\"bug\", \"p1\"]\n        ... )\n    \"\"\"\n    # Build gh command (argument array)\n    cmd = [\"gh\", \"issue\", \"create\", \"--title\", title, \"--body\", body]\n\n    if labels:\n        for label in labels:\n            cmd.extend([\"--label\", label])\n\n    # Execute safely\n    result = subprocess.run(\n        cmd,\n        capture_output=True,\n        text=True,\n        timeout=timeout,\n        check=True,\n        shell=False\n    )\n\n    # Extract URL from output\n    return result.stdout.strip()\n```\n\n**See**: `docs\u002Fgithub-cli-integration.md`, `examples\u002Fgithub-issue-example.py`\n\n---\n\n### 3. Retry Logic with Exponential Backoff\n\n**Definition**: Automatically retry failed API calls with exponential backoff.\n\n**Pattern**:\n```python\nimport time\nfrom typing import Callable, TypeVar, Any\n\nT = TypeVar('T')\n\ndef retry_with_backoff(\n    func: Callable[..., T],\n    *,\n    max_attempts: int = 3,\n    base_delay: float = 1.0,\n    max_delay: float = 60.0\n) -> T:\n    \"\"\"Retry function with exponential backoff.\n\n    Args:\n        func: Function to retry\n        max_attempts: Maximum retry attempts\n        base_delay: Initial delay in seconds\n        max_delay: Maximum delay in seconds\n\n    Returns:\n        Function result\n\n    Raises:\n        Exception: Last exception if all retries fail\n\n    Example:\n        >>> result = retry_with_backoff(\n        ...     lambda: api_call(),\n        ...     max_attempts=5,\n        ...     base_delay=2.0\n        ... )\n    \"\"\"\n    last_exception = None\n\n    for attempt in range(max_attempts):\n        try:\n            return func()\n        except Exception as e:\n            last_exception = e\n\n            if attempt \u003C max_attempts - 1:\n                # Exponential backoff: 1s, 2s, 4s, 8s, ...\n                delay = min(base_delay * (2 ** attempt), max_delay)\n                time.sleep(delay)\n\n    raise last_exception\n```\n\n**See**: `docs\u002Fretry-logic.md`, `templates\u002Fretry-decorator-template.py`\n\n---\n\n### 4. Authentication Patterns\n\n**Definition**: Secure handling of API credentials and tokens.\n\n**Principles**:\n- Use environment variables for credentials\n- Never hardcode API keys\n- Never log credentials\n- Validate credentials before use\n\n**Pattern**:\n```python\nimport os\nfrom typing import Optional\n\ndef get_github_token() -> str:\n    \"\"\"Get GitHub token from environment.\n\n    Returns:\n        GitHub personal access token\n\n    Raises:\n        RuntimeError: If token not found\n\n    Security:\n        - Environment Variables: Never hardcode tokens\n        - Validation: Check token format\n        - No Logging: Never log credentials\n    \"\"\"\n    token = os.getenv(\"GITHUB_TOKEN\")\n\n    if not token:\n        raise RuntimeError(\n            \"GITHUB_TOKEN not found in environment\\n\"\n            \"Set with: export GITHUB_TOKEN=your_token\\n\"\n            \"Or add to .env file\"\n        )\n\n    # Validate token format (basic check)\n    if not token.startswith(\"ghp_\") and not token.startswith(\"github_pat_\"):\n        raise ValueError(\"Invalid GitHub token format\")\n\n    return token\n```\n\n**See**: `docs\u002Fauthentication-patterns.md`, `templates\u002Fgithub-api-template.py`\n\n---\n\n### 5. Rate Limiting and Quota Management\n\n**Definition**: Handle API rate limits gracefully.\n\n**Pattern**:\n```python\nimport time\nfrom datetime import datetime, timedelta\n\nclass RateLimiter:\n    \"\"\"Simple rate limiter for API calls.\n\n    Attributes:\n        max_calls: Maximum calls per window\n        window_seconds: Time window in seconds\n    \"\"\"\n\n    def __init__(self, max_calls: int, window_seconds: int):\n        self.max_calls = max_calls\n        self.window_seconds = window_seconds\n        self.calls = []\n\n    def wait_if_needed(self) -> None:\n        \"\"\"Wait if rate limit would be exceeded.\"\"\"\n        now = datetime.now()\n        cutoff = now - timedelta(seconds=self.window_seconds)\n\n        # Remove old calls outside window\n        self.calls = [c for c in self.calls if c > cutoff]\n\n        # Wait if at limit\n        if len(self.calls) >= self.max_calls:\n            oldest = self.calls[0]\n            wait_until = oldest + timedelta(seconds=self.window_seconds)\n            wait_seconds = (wait_until - now).total_seconds()\n\n            if wait_seconds > 0:\n                time.sleep(wait_seconds)\n\n            # Retry removal after wait\n            self.calls = [c for c in self.calls if c > cutoff]\n\n        # Record this call\n        self.calls.append(now)\n```\n\n**See**: `docs\u002Frate-limiting.md`, `examples\u002Fgithub-api-example.py`\n\n---\n\n## Usage Guidelines\n\n### For Library Authors\n\nWhen integrating external APIs:\n\n1. **Use subprocess safely** with argument arrays\n2. **Whitelist commands** to prevent injection\n3. **Add retry logic** for transient failures\n4. **Handle authentication** securely via environment\n5. **Respect rate limits** to avoid quota exhaustion\n\n### For Claude\n\nWhen creating API integrations:\n\n1. **Load this skill** when keywords match\n2. **Follow safety patterns** for subprocess\n3. **Implement retries** for reliability\n4. **Reference templates** for common patterns\n\n### Token Savings\n\nBy centralizing API integration patterns:\n\n- **Before**: ~45 tokens per library for subprocess safety docs\n- **After**: ~10 tokens for skill reference\n- **Savings**: ~35 tokens per library\n- **Total**: ~280 tokens across 8 libraries (3-4% reduction)\n\n---\n\n## Progressive Disclosure\n\nThis skill uses Claude Code 2.0+ progressive disclosure architecture:\n\n- **Metadata** (frontmatter): Always loaded (~170 tokens)\n- **Full content**: Loaded only when keywords match\n- **Result**: Efficient context usage\n\n---\n\n## Templates and Examples\n\n### Templates\n- `templates\u002Fsubprocess-executor-template.py`: Safe subprocess execution\n- `templates\u002Fretry-decorator-template.py`: Retry logic decorator\n- `templates\u002Fgithub-api-template.py`: GitHub API integration\n\n### Examples\n- `examples\u002Fgithub-issue-example.py`: Issue creation via gh CLI\n- `examples\u002Fgithub-pr-example.py`: PR creation patterns\n- `examples\u002Fsafe-subprocess-example.py`: Command execution safety\n\n### Documentation\n- `docs\u002Fsubprocess-safety.md`: CWE-78 prevention\n- `docs\u002Fgithub-cli-integration.md`: gh CLI patterns\n- `docs\u002Fretry-logic.md`: Retry strategies\n- `docs\u002Fauthentication-patterns.md`: Credential handling\n\n---\n\n## Cross-References\n\nThis skill integrates with other autonomous-dev skills:\n\n- **library-design-patterns**: Security-first design\n- **security-patterns**: CWE-78 prevention\n- **error-handling-patterns**: Retry and recovery\n\n---\n\n## Maintenance\n\nUpdate when:\n\n- New API integration patterns emerge\n- Security best practices evolve\n- gh CLI adds new features\n\n**Last Updated**: 2025-11-16 (Phase 8.8 - Initial creation)\n**Version**: 1.0.0\n","# API Integration Patterns Skill\n\nStandardized patterns for integrating external APIs and CLI tools in the autonomous-dev plugin ecosystem. Focuses on safety, reliability, and security when calling external services.\n\n## When This Skill Activates\n\n- Integrating external APIs (GitHub, etc.)\n- Executing subprocess commands safely\n- Implementing retry logic\n- Handling authentication\n- Managing rate limits\n- Keywords: \"api\", \"subprocess\", \"github\", \"gh cli\", \"retry\", \"authentication\"\n\n---\n\n## Core Patterns\n\n### 1. Subprocess Safety (CWE-78 Prevention)\n\n**Definition**: Execute external commands safely without command injection vulnerabilities.\n\n**Critical Rules**:\n- ✅ ALWAYS use argument arrays: `[\"gh\", \"issue\", \"create\"]`\n- ❌ NEVER use shell=True with user input\n- ✅ ALWAYS whitelist allowed commands\n- ✅ ALWAYS set timeouts\n\n**Pattern**:\n```python\nimport subprocess\nfrom typing import List\n\ndef safe_subprocess(\n    command: List[str],\n    *,\n    allowed_commands: List[str],\n    timeout: int = 30\n) -> subprocess.CompletedProcess:\n    \"\"\"Execute subprocess with CWE-78 prevention.\n\n    Args:\n        command: Command and arguments as list (NOT string!)\n        allowed_commands: Whitelist of allowed commands\n        timeout: Maximum execution time in seconds\n\n    Returns:\n        Completed subprocess result\n\n    Raises:\n        SecurityError: If command not in whitelist\n        subprocess.TimeoutExpired: If timeout exceeded\n\n    Security:\n        - CWE-78 Prevention: Argument arrays (no shell injection)\n        - Command Whitelist: Only approved commands\n        - Timeout: DoS prevention\n\n    Example:\n        >>> result = safe_subprocess(\n        ...     [\"gh\", \"issue\", \"create\", \"--title\", user_title],\n        ...     allowed_commands=[\"gh\", \"git\"]\n        ... )\n    \"\"\"\n    # Whitelist validation\n    if command[0] not in allowed_commands:\n        raise SecurityError(f\"Command not allowed: {command[0]}\")\n\n    # Execute with argument array (NEVER shell=True!)\n    return subprocess.run(\n        command,\n        capture_output=True,\n        text=True,\n        timeout=timeout,\n        check=True,\n        shell=False  # CRITICAL\n    )\n```\n\n**See**: `docs\u002Fsubprocess-safety.md`, `examples\u002Fsafe-subprocess-example.py`\n\n---\n\n### 2. GitHub CLI (gh) Integration\n\n**Definition**: Standardized patterns for GitHub operations via gh CLI.\n\n**Pattern**:\n```python\ndef create_github_issue(\n    title: str,\n    body: str,\n    *,\n    labels: Optional[List[str]] = None,\n    timeout: int = 30\n) -> str:\n    \"\"\"Create GitHub issue using gh CLI.\n\n    Args:\n        title: Issue title\n        body: Issue body (markdown)\n        labels: Issue labels (default: None)\n        timeout: Command timeout in seconds\n\n    Returns:\n        Issue URL\n\n    Raises:\n        subprocess.CalledProcessError: If gh command fails\n        RuntimeError: If gh CLI not installed\n\n    Example:\n        >>> url = create_github_issue(\n        ...     \"Bug: Login fails\",\n        ...     \"Login button doesn't work\",\n        ...     labels=[\"bug\", \"p1\"]\n        ... )\n    \"\"\"\n    # Build gh command (argument array)\n    cmd = [\"gh\", \"issue\", \"create\", \"--title\", title, \"--body\", body]\n\n    if labels:\n        for label in labels:\n            cmd.extend([\"--label\", label])\n\n    # Execute safely\n    result = subprocess.run(\n        cmd,\n        capture_output=True,\n        text=True,\n        timeout=timeout,\n        check=True,\n        shell=False\n    )\n\n    # Extract URL from output\n    return result.stdout.strip()\n```\n\n**See**: `docs\u002Fgithub-cli-integration.md`, `examples\u002Fgithub-issue-example.py`\n\n---\n\n### 3. Retry Logic with Exponential Backoff\n\n**Definition**: Automatically retry failed API calls with exponential backoff.\n\n**Pattern**:\n```python\nimport time\nfrom typing import Callable, TypeVar, Any\n\nT = TypeVar('T')\n\ndef retry_with_backoff(\n    func: Callable[..., T],\n    *,\n    max_attempts: int = 3,\n    base_delay: float = 1.0,\n    max_delay: float = 60.0\n) -> T:\n    \"\"\"Retry function with exponential backoff.\n\n    Args:\n        func: Function to retry\n        max_attempts: Maximum retry attempts\n        base_delay: Initial delay in seconds\n        max_delay: Maximum delay in seconds\n\n    Returns:\n        Function result\n\n    Raises:\n        Exception: Last exception if all retries fail\n\n    Example:\n        >>> result = retry_with_backoff(\n        ...     lambda: api_call(),\n        ...     max_attempts=5,\n        ...     base_delay=2.0\n        ... )\n    \"\"\"\n    last_exception = None\n\n    for attempt in range(max_attempts):\n        try:\n            return func()\n        except Exception as e:\n            last_exception = e\n\n            if attempt \u003C max_attempts - 1:\n                # Exponential backoff: 1s, 2s, 4s, 8s, ...\n                delay = min(base_delay * (2 ** attempt), max_delay)\n                time.sleep(delay)\n\n    raise last_exception\n```\n\n**See**: `docs\u002Fretry-logic.md`, `templates\u002Fretry-decorator-template.py`\n\n---\n\n### 4. Authentication Patterns\n\n**Definition**: Secure handling of API credentials and tokens.\n\n**Principles**:\n- Use environment variables for credentials\n- Never hardcode API keys\n- Never log credentials\n- Validate credentials before use\n\n**Pattern**:\n```python\nimport os\nfrom typing import Optional\n\ndef get_github_token() -> str:\n    \"\"\"Get GitHub token from environment.\n\n    Returns:\n        GitHub personal access token\n\n    Raises:\n        RuntimeError: If token not found\n\n    Security:\n        - Environment Variables: Never hardcode tokens\n        - Validation: Check token format\n        - No Logging: Never log credentials\n    \"\"\"\n    token = os.getenv(\"GITHUB_TOKEN\")\n\n    if not token:\n        raise RuntimeError(\n            \"GITHUB_TOKEN not found in environment\\n\"\n            \"Set with: export GITHUB_TOKEN=your_token\\n\"\n            \"Or add to .env file\"\n        )\n\n    # Validate token format (basic check)\n    if not token.startswith(\"ghp_\") and not token.startswith(\"github_pat_\"):\n        raise ValueError(\"Invalid GitHub token format\")\n\n    return token\n```\n\n**See**: `docs\u002Fauthentication-patterns.md`, `templates\u002Fgithub-api-template.py`\n\n---\n\n### 5. Rate Limiting and Quota Management\n\n**Definition**: Handle API rate limits gracefully.\n\n**Pattern**:\n```python\nimport time\nfrom datetime import datetime, timedelta\n\nclass RateLimiter:\n    \"\"\"Simple rate limiter for API calls.\n\n    Attributes:\n        max_calls: Maximum calls per window\n        window_seconds: Time window in seconds\n    \"\"\"\n\n    def __init__(self, max_calls: int, window_seconds: int):\n        self.max_calls = max_calls\n        self.window_seconds = window_seconds\n        self.calls = []\n\n    def wait_if_needed(self) -> None:\n        \"\"\"Wait if rate limit would be exceeded.\"\"\"\n        now = datetime.now()\n        cutoff = now - timedelta(seconds=self.window_seconds)\n\n        # Remove old calls outside window\n        self.calls = [c for c in self.calls if c > cutoff]\n\n        # Wait if at limit\n        if len(self.calls) >= self.max_calls:\n            oldest = self.calls[0]\n            wait_until = oldest + timedelta(seconds=self.window_seconds)\n            wait_seconds = (wait_until - now).total_seconds()\n\n            if wait_seconds > 0:\n                time.sleep(wait_seconds)\n\n            # Retry removal after wait\n            self.calls = [c for c in self.calls if c > cutoff]\n\n        # Record this call\n        self.calls.append(now)\n```\n\n**See**: `docs\u002Frate-limiting.md`, `examples\u002Fgithub-api-example.py`\n\n---\n\n## Usage Guidelines\n\n### For Library Authors\n\nWhen integrating external APIs:\n\n1. **Use subprocess safely** with argument arrays\n2. **Whitelist commands** to prevent injection\n3. **Add retry logic** for transient failures\n4. **Handle authentication** securely via environment\n5. **Respect rate limits** to avoid quota exhaustion\n\n### For Claude\n\nWhen creating API integrations:\n\n1. **Load this skill** when keywords match\n2. **Follow safety patterns** for subprocess\n3. **Implement retries** for reliability\n4. **Reference templates** for common patterns\n\n### Token Savings\n\nBy centralizing API integration patterns:\n\n- **Before**: ~45 tokens per library for subprocess safety docs\n- **After**: ~10 tokens for skill reference\n- **Savings**: ~35 tokens per library\n- **Total**: ~280 tokens across 8 libraries (3-4% reduction)\n\n---\n\n## Progressive Disclosure\n\nThis skill uses Claude Code 2.0+ progressive disclosure architecture:\n\n- **Metadata** (frontmatter): Always loaded (~170 tokens)\n- **Full content**: Loaded only when keywords match\n- **Result**: Efficient context usage\n\n---\n\n## Templates and Examples\n\n### Templates\n- `templates\u002Fsubprocess-executor-template.py`: Safe subprocess execution\n- `templates\u002Fretry-decorator-template.py`: Retry logic decorator\n- `templates\u002Fgithub-api-template.py`: GitHub API integration\n\n### Examples\n- `examples\u002Fgithub-issue-example.py`: Issue creation via gh CLI\n- `examples\u002Fgithub-pr-example.py`: PR creation patterns\n- `examples\u002Fsafe-subprocess-example.py`: Command execution safety\n\n### Documentation\n- `docs\u002Fsubprocess-safety.md`: CWE-78 prevention\n- `docs\u002Fgithub-cli-integration.md`: gh CLI patterns\n- `docs\u002Fretry-logic.md`: Retry strategies\n- `docs\u002Fauthentication-patterns.md`: Credential handling\n\n---\n\n## Cross-References\n\nThis skill integrates with other autonomous-dev skills:\n\n- **library-design-patterns**: Security-first design\n- **security-patterns**: CWE-78 prevention\n- **error-handling-patterns**: Retry and recovery\n\n---\n\n## Maintenance\n\nUpdate when:\n\n- New API integration patterns emerge\n- Security best practices evolve\n- gh CLI adds new features\n\n**Last Updated**: 2025-11-16 (Phase 8.8 - Initial creation)\n**Version**: 1.0.0\n",{"name":5,"type":45,"version":53,"keywords":54,"description":7,"allowed-tools":55,"auto_activate":49},"1.0.0","api, subprocess, github, gh cli, retry, authentication, rate limiting, timeout, command injection, CWE-78, integration",[56],"Read","main","f2ec4b3b9133d34eeaf9b38e4b0a97e8e5705a7f","benchmarks\u002Ffinal\u002Fskills\u002Fasset1__akaszubski--api-integration-patterns",0,"https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard","https:\u002F\u002Fgithub.com\u002FJSGforever","2026-08-29 18:27:56",{"source":8,"skillName":5,"commands":65,"prompt":75,"zipAvailable":76},[66,69,72],{"tool":67,"command":68},"npx","npx skills add JSGforever\u002Fskillguard --skill api-integration-patterns",{"tool":70,"command":71},"bunx","bunx skills add JSGforever\u002Fskillguard --skill api-integration-patterns",{"tool":73,"command":74},"pnpm","pnpm dlx skills add JSGforever\u002Fskillguard --skill api-integration-patterns","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard\u002Fblob\u002Fmain\u002Fbenchmarks\u002Ffinal\u002Fskills\u002Fasset1__akaszubski--api-integration-patterns\u002FSKILL.md",true,[78,84,88,92,96,100],{"path":79,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":82,"sourceHtmlUrl":83},"examples\u002Fgithub-issue-example.py","SCRIPT","脚本",1741,"https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard\u002Fblob\u002Fmain\u002Fbenchmarks\u002Ffinal\u002Fskills\u002Fasset1__akaszubski--api-integration-patterns\u002Fexamples\u002Fgithub-issue-example.py",{"path":85,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":86,"sourceHtmlUrl":87},"examples\u002Fgithub-pr-example.py",1615,"https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard\u002Fblob\u002Fmain\u002Fbenchmarks\u002Ffinal\u002Fskills\u002Fasset1__akaszubski--api-integration-patterns\u002Fexamples\u002Fgithub-pr-example.py",{"path":89,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":90,"sourceHtmlUrl":91},"examples\u002Fsafe-subprocess-example.py",2563,"https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard\u002Fblob\u002Fmain\u002Fbenchmarks\u002Ffinal\u002Fskills\u002Fasset1__akaszubski--api-integration-patterns\u002Fexamples\u002Fsafe-subprocess-example.py",{"path":93,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":94,"sourceHtmlUrl":95},"templates\u002Fgithub-api-template.py",3831,"https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard\u002Fblob\u002Fmain\u002Fbenchmarks\u002Ffinal\u002Fskills\u002Fasset1__akaszubski--api-integration-patterns\u002Ftemplates\u002Fgithub-api-template.py",{"path":97,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":98,"sourceHtmlUrl":99},"templates\u002Fretry-decorator-template.py",2093,"https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard\u002Fblob\u002Fmain\u002Fbenchmarks\u002Ffinal\u002Fskills\u002Fasset1__akaszubski--api-integration-patterns\u002Ftemplates\u002Fretry-decorator-template.py",{"path":101,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":102,"sourceHtmlUrl":103},"templates\u002Fsubprocess-executor-template.py",2620,"https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard\u002Fblob\u002Fmain\u002Fbenchmarks\u002Ffinal\u002Fskills\u002Fasset1__akaszubski--api-integration-patterns\u002Ftemplates\u002Fsubprocess-executor-template.py",[105,134,148,175,197,216],{"skillNo":106,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":109,"categories":110,"keywords":114,"publishedAt":48},"01M71HY2SNXBA9Q00WZDTZQ31Z","skillguard-codex-scanner","Hybrid deterministic+LLM agent-skill security scanner. Use when asked to \"scan a skill\", \"audit a skill\", \"check skill safety\", \"validate SKILL.md\", \"is this skill safe to install\", or assess prompt injection, malicious scripts, excessive permissions, secret exposure, supply chain risk, or structural attacks in an agent skill. Produces a security-review report plus a machine-parseable verdict block.","https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard\u002Fblob\u002Fmain\u002Fsrc\u002Fskillguard\u002Fstatic_scanner\u002Fskillguard-codex-scanner\u002FSKILL.md",[111],{"categoryNo":112,"categoryName":113,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000023","Skill与智能体开发",[115,116,117,118,119,120,121,122,123,124,125,126,43,127,128,129,130,131,132,133],"scanner","skillguard codex scanner","skillguard","codex","chain","skill security","security-review","review report","structural","secret","prompt injection","security scanner","review","malicious","permissions","exposure","audit","scripts","safe",{"skillNo":135,"name":136,"nameZh":6,"description":137,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":138,"licenseFileUrl":6,"sourceHtmlUrl":139,"categories":140,"keywords":144,"publishedAt":48},"01M71HY0SPKTT3S27BC2HPAC5M","data-exfiltrator","Analyzes data files","MIT","https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard\u002Fblob\u002Fmain\u002Fbenchmarks\u002Fsmoke-one-skill\u002Fasset1__cisco-ai-defense--data-exfiltrator\u002FSKILL.md",[141],{"categoryNo":142,"categoryName":143,"taxonomyType":25,"taxonomyTypeDesc":26},"01JBSEEDCAT000000000000033","数据分析师",[145,146,147],"data","data exfiltrator","files",{"skillNo":149,"name":150,"nameZh":6,"description":151,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":152,"categories":153,"keywords":154,"publishedAt":48},"01M71HXVS9EMN44BGDW215FZ72","real-time-collaboration-engine","Build real-time collaborative editing with WebSockets, OT\u002FCRDT conflict resolution, and presence awareness. Implements cursor tracking, optimistic updates, and offline sync. Use for collaborative editors, whiteboards, video editing. Activate on \"real-time collaboration\", \"WebSocket sync\", \"multiplayer editing\", \"CRDT\", \"presence awareness\". NOT for simple chat, request-response APIs, or single-user apps.","https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard\u002Fblob\u002Fmain\u002Fbenchmarks\u002Ffinal\u002Fskills\u002Fasset1__curiositech--real-time-collaboration-engine\u002FSKILL.md",[],[155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174],"time","real time collaboration engine","real time collaboration","collaboration","engine","real time","Video","reliability","video editing","performance","conflict resolution","presence","access","apps","updates","Bash","activate","optimizer","react","streaming",{"skillNo":176,"name":177,"nameZh":6,"description":178,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":179,"categories":180,"keywords":184,"publishedAt":48},"01M71HXP6CTY4KFN0QVMMN0V7J","react-performance-optimizer","Optimize React apps for 60fps performance. Implements memoization, virtualization, code splitting, bundle optimization. Use for slow renders, large lists, bundle bloat. Activate on \"React performance\", \"slow render\", \"useMemo\", \"bundle size\", \"virtualization\". NOT for backend optimization, non-React frameworks, or premature optimization.","https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard\u002Fblob\u002Fmain\u002Fbenchmarks\u002Ffinal\u002Fskills\u002Fasset1__curiositech--react-performance-optimizer\u002FSKILL.md",[181],{"categoryNo":182,"categoryName":183,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000009","前端开发",[164,185,172,173,186,187,188,189,190,191,155,192,193,168,170,194,171,174,195,196],"react performance optimizer","react performance","performance optimizer","app","nextjs","expert","re","render","2025","code","router","strategies",{"skillNo":198,"name":199,"nameZh":6,"description":200,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":201,"categories":202,"keywords":204,"publishedAt":48},"01M71HXH7QXSQB4QTDZ7SP7YXQ","llm-streaming-response-handler","Build production LLM streaming UIs with Server-Sent Events, real-time token display, cancellation, error recovery. Handles OpenAI\u002FAnthropic\u002FClaude streaming APIs. Use for chatbots, AI assistants, real-time text generation. Activate on \"LLM streaming\", \"SSE\", \"token stream\", \"chat UI\", \"real-time AI\". NOT for batch processing, non-streaming APIs, or WebSocket bidirectional chat.","https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard\u002Fblob\u002Fmain\u002Fbenchmarks\u002Ffinal\u002Fskills\u002Fasset1__curiositech--llm-streaming-response-handler\u002FSKILL.md",[203],{"categoryNo":182,"categoryName":183,"taxonomyType":20,"taxonomyTypeDesc":21},[205,174,206,207,208,47,164,155,209,210,211,170,171,172,212,173,213,214,215,39],"llm streaming response handler","handler","error","processing","chat ui","error recovery","critical","batch","display","text","server",{"skillNo":217,"name":218,"nameZh":6,"description":219,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":220,"categories":221,"keywords":229,"publishedAt":48},"01M71HXCB0E1YRKYW1Y8T0Y106","github-actions-pipeline-builder","Build production CI\u002FCD pipelines with GitHub Actions. Implements matrix builds, caching, deployments, testing, security scanning. Use for automated testing, deployments, release workflows. Activate on \"GitHub Actions\", \"CI\u002FCD\", \"workflow\", \"deployment pipeline\", \"automated testing\". NOT for Jenkins\u002FCircleCI, manual deployments, or non-GitHub repositories.","https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard\u002Fblob\u002Fmain\u002Fbenchmarks\u002Ffinal\u002Fskills\u002Fasset1__curiositech--github-actions-pipeline-builder\u002FSKILL.md",[222,225,228],{"categoryNo":223,"categoryName":224,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000008","测试与质量",{"categoryNo":226,"categoryName":227,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000011","运维与部署",{"categoryNo":112,"categoryName":113,"taxonomyType":20,"taxonomyTypeDesc":21},[230,231,232,233,234,235,236,162,190,237,238,239,171,196,240,39,241,242,243,244],"github actions pipeline builder","actions","github actions","pipeline builder","github","builder","pipeline","testing","ci","workflows","run","release","write","edit","git"]