Token导航 LogoToken导航

Agent Skill · 开发

cross-platform-build-expert(跨平台构建专家)

cross-platform-build-expert 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

cross-platform-build-expert 是开发类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证为 MIT,第三方扫描有未通过项,按安装量在开发类的 21,746 个 Skill 里排第 5,218。

总安装 6,738周安装 310GitHub Stars 38下载 2,794核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:cross-platform-build-expert(跨平台构建专家)
来源仓库:https://github.com/martinholovsky/claude-skills-generator
仓库路径:skills/cross-platform-build-expert
安装命令:
npx skills add https://github.com/martinholovsky/claude-skills-generator --skill 'Cross-Platform Build Expert'
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/martinholovsky/claude-skills-generator --skill 'Cross-Platform Build Expert'

这个 Skill 是做什么的

开发类 Skill 面向写代码、改代码和排查问题,一般会读写仓库文件,部分还会执行构建或测试命令。

cross-platform-build-expert 协助配置和管理跨平台项目的构建系统与安全签名流程。适用于设置条件编译矩阵、优化构建性能或管理证书凭证等复杂工程任务场景。要求在使用前必须读取指定参考文档,遵循安全构建规范以防止凭据泄露或签名失败。

操作生产环境前应先在沙箱中测试配置变更,确保不影响现有部署流水线稳定性。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/cross-platform-build-expert

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/martinholovsky/claude-skills-generator --skill…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

cross-platform-build-expert 怎么安装?

在终端执行 npx skills add https://github.com/martinholovsky/claude-skills-generator --skill 'Cross-Pl…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

cross-platform-build-expert 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

cross-platform-build-expert 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

cross-platform-build-expert 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

cross-platform-build-expert 用的人多吗?

公开数据是累计安装 6,738 次,近一周安装 310 次,下载 2,794 次,GitHub 38 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

cross-platform-build-expert 安全吗?

第三方扫描有未通过项,风险较高。除非你确认过源码,否则不建议直接安装到常用环境。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。

先想清楚的地方

  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理开发类任务、又不想每次都手写提示词的人。

不太适合

  • 需要厂商级技术支持和 SLA 的生产系统。

开发类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
skill-vetter

技能审查员 · OpenClaw

8,779,018986操作浏览器MIT-0通过
ontology

本体论 · OpenClaw

6,636,960576只读MIT-0通过
entra-app-registration

内部应用程序注册 · Codex、Claude

6,631,872764接触敏感数据未明确通过
entra-app-registration

内部应用程序注册 · Codex、Claude

3,757,680201接触敏感数据未明确通过
nano-banana-pro

纳米香蕉专业版 · OpenClaw

3,526,898364接触敏感数据MIT-0有提醒
cross-platform-build-expert

跨平台构建专家 · 本页

6,73838需要联网MIT未通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Cross-Platform Build Expert

0. Mandatory Reading Protocol

CRITICAL: Before implementing ANY platform-specific build configuration, you MUST read the relevant reference files:

Trigger Conditions for Reference Files

Read references/advanced-patterns.md WHEN:

  • Configuring platform-specific build matrices
  • Setting up conditional compilation
  • Implementing platform-specific features
  • Optimizing build sizes and performance

Read references/security-examples.md WHEN:

  • Setting up code signing certificates
  • Configuring notarization for macOS
  • Implementing secure build environments
  • Managing signing credentials

1. Overview

Risk Level: MEDIUM

Justification: Cross-platform builds involve code signing credentials, platform-specific security configurations, and distribution through various app stores. Improper signing leads to security warnings, failed installations, or rejected submissions. Build configurations can also leak sensitive information or create platform-specific vulnerabilities.

You are an expert in cross-platform desktop application builds, specializing in:

  • Platform-specific configurations for Windows, macOS, and Linux
  • Code signing and notarization procedures
  • Distribution requirements for each platform
  • Build optimization for size and performance
  • Tauri configuration for multi-platform builds

Primary Use Cases

  • Building Tauri applications for all desktop platforms
  • Setting up code signing for trusted distribution
  • Configuring CI/CD for multi-platform builds
  • Optimizing application bundles
  • Meeting platform distribution requirements

2. Core Principles

  1. TDD First - Write build configuration tests before implementing
  2. Performance Aware - Optimize build times, bundle sizes, and startup
  3. Test on all target platforms - Don't assume cross-platform compatibility
  4. Use platform abstractions - Rust std, Tauri APIs for platform differences
  5. Handle path differences - Forward vs backward slashes, case sensitivity
  6. Respect platform conventions - File locations, UI guidelines
  7. Sign all releases - Users trust signed applications
  8. Protect signing credentials - Never commit certificates
  9. Verify signatures - Check before distribution
  10. Use timestamping - Signatures remain valid after certificate expiry

3. Technical Foundation

3.1 Platform Build Targets

PlatformRust TargetTauri Bundle
Windows x64x86_64-pc-windows-msvcmsi, nsis
Windows ARMaarch64-pc-windows-msvcmsi, nsis
macOS Intelx86_64-apple-darwindmg, app
macOS Apple Siliconaarch64-apple-darwindmg, app
Linux x64x86_64-unknown-linux-gnudeb, appimage
Linux ARMaarch64-unknown-linux-gnudeb, appimage

3.2 Build Dependencies

Windows:

  • Visual Studio Build Tools
  • Windows SDK
  • WebView2 Runtime (bundled by Tauri)

macOS:

  • Xcode Command Line Tools
  • Apple Developer Certificate
  • App-specific password for notarization

Linux:

  • GTK3 development libraries
  • WebKitGTK
  • AppIndicator (for system tray)

4. Implementation Patterns

4.1 Tauri Configuration

// tauri.conf.json
{
  "build": {
    "beforeBuildCommand": "npm run build",
    "beforeDevCommand": "npm run dev",
    "devPath": "http://localhost:3000",
    "distDir": "../dist"
  },
  "package": {
    "productName": "MyApp",
    "version": "1.0.0"
  },
  "tauri": {
    "bundle": {
      "active": true,
      "identifier": "com.company.myapp",
      "icon": [
        "icons/32x32.png",
        "icons/128x128.png",
        "icons/128x128@2x.png",
        "icons/icon.icns",
        "icons/icon.ico"
      ],
      "targets": "all",
      "windows": {
        "certificateThumbprint": null,
        "digestAlgorithm": "sha256",
        "timestampUrl": "http://timestamp.digicert.com",
        "wix": {
          "language": "en-US"
        }
      },
      "macOS": {
        "entitlements": "./entitlements.plist",
        "exceptionDomain": "",
        "frameworks": [],
        "minimumSystemVersion": "10.15",
        "signingIdentity": null
      },
      "linux": {
        "deb": {
          "depends": ["libgtk-3-0", "libwebkit2gtk-4.0-37"]
        },
        "appimage": {
          "bundleMediaFramework": true
        }
      }
    },
    "security": {
      "csp": "default-src 'self'; script-src 'self'"
    }
  }
}

4.2 Platform-Specific Code

// src-tauri/src/main.rs

#[cfg(target_os = "windows")]
fn platform_init() {
    // Windows-specific initialization
    use windows::Win32::System::Console::SetConsoleOutputCP;
    unsafe { SetConsoleOutputCP(65001); }  // UTF-8 support
}

#[cfg(target_os = "macos")]
fn platform_init() {
    // macOS-specific initialization
    // Handle Dock, menu bar, etc.
}

#[cfg(target_os = "linux")]
fn platform_init() {
    // Linux-specific initialization
    // Handle DBus, system tray, etc.
}

fn main() {
    platform_init();

    tauri::Builder::default()
        .run(tauri::generate_context!())
        .expect("error while running tauri application");
}

4.3 GitHub Actions Build Matrix

name: Build

on:
  push:
    tags:
      - 'v*'

jobs:
  build:
    strategy:
      fail-fast: false
      matrix:
        include:
          - platform: windows-latest
            args: ''
            target: x86_64-pc-windows-msvc
          - platform: macos-latest
            args: '--target x86_64-apple-darwin'
            target: x86_64-apple-darwin
          - platform: macos-latest
            args: '--target aarch64-apple-darwin'
            target: aarch64-apple-darwin
          - platform: ubuntu-22.04
            args: ''
            target: x86_64-unknown-linux-gnu

    runs-on: ${{ matrix.platform }}

    steps:
      - uses: actions/checkout@v4

      - name: Setup Rust
        uses: dtolnay/rust-toolchain@stable
        with:
          targets: ${{ matrix.target }}

      - name: Install Linux Dependencies
        if: matrix.platform == 'ubuntu-22.04'
        run: |
          sudo apt-get update
          sudo apt-get install -y \
            libgtk-3-dev \
            libwebkit2gtk-4.0-dev \
            libappindicator3-dev \
            librsvg2-dev \
            patchelf

      - name: Setup Node.js
        uses: actions/setup-node@v4
        with:
          node-version: '20'
          cache: 'npm'

      - name: Install Dependencies
        run: npm ci

      - name: Build
        run: npm run tauri build -- ${{ matrix.args }}

      - name: Upload Artifacts
        uses: actions/upload-artifact@v3
        with:
          name: ${{ matrix.target }}
          path: |
            src-tauri/target/${{ matrix.target }}/release/bundle/

4.4 Code Signing Configuration

Windows (tauri.conf.json):

{
  "tauri": {
    "bundle": {
      "windows": {
        "certificateThumbprint": "YOUR_CERT_THUMBPRINT",
        "digestAlgorithm": "sha256",
        "timestampUrl": "http://timestamp.digicert.com"
      }
    }
  }
}

macOS (tauri.conf.json):

{
  "tauri": {
    "bundle": {
      "macOS": {
        "signingIdentity": "Developer ID Application: Company Name (TEAM_ID)",
        "entitlements": "./entitlements.plist"
      }
    }
  }
}

macOS Entitlements (entitlements.plist):

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>com.apple.security.cs.allow-jit</key>
    <true/>
    <key>com.apple.security.cs.allow-unsigned-executable-memory</key>
    <true/>
    <key>com.apple.security.cs.disable-library-validation</key>
    <true/>
</dict>
</plist>

5. Security Standards

5.1 Code Signing Requirements

PlatformCertificate TypePurpose
WindowsEV Code SigningImmediate SmartScreen trust
WindowsStandard Code SigningTrust after reputation
macOSDeveloper ID ApplicationDistribution outside App Store
macOSDeveloper ID InstallerSigned PKG installers
LinuxGPG KeyPackage signing

5.2 Signing Best Practices

# Windows: Verify signature
signtool verify /pa /v MyApp.exe

# macOS: Verify signature
codesign --verify --deep --strict MyApp.app
spctl --assess --type execute MyApp.app

# macOS: Check notarization
xcrun stapler validate MyApp.app

5.3 Build Security

  • Certificates stored in CI/CD secrets, not repository
  • Signing happens only on tagged releases
  • Build environment is clean/ephemeral
  • Dependencies pinned and verified
  • Artifacts checksummed after signing

6. Implementation Workflow (TDD)

Step 1: Write Failing Test First

// tests/build_config_test.rs
#[cfg(test)]
mod tests {
    use std::path::Path;
    use std::process::Command;

    #[test]
    fn test_tauri_config_exists() {
        assert!(Path::new("src-tauri/tauri.conf.json").exists());
    }

    #[test]
    fn test_icons_all_platforms() {
        let required_icons = vec![
            "icons/icon.ico",      // Windows
            "icons/icon.icns",     // macOS
            "icons/icon.png",      // Linux
        ];
        for icon in required_icons {
            assert!(Path::new(&format!("src-tauri/{}", icon)).exists(),
                "Missing icon: {}", icon);
        }
    }

    #[test]
    fn test_bundle_identifier_format() {
        let config: serde_json::Value = serde_json::from_str(
            &std::fs::read_to_string("src-tauri/tauri.conf.json").unwrap()
        ).unwrap();
        let identifier = config["tauri"]["bundle"]["identifier"].as_str().unwrap();
        assert!(identifier.contains('.'), "Bundle ID must use reverse domain");
    }

    #[test]
    fn test_frontend_builds_successfully() {
        let output = Command::new("npm")
            .args(["run", "build"])
            .output()
            .expect("Failed to run build");
        assert!(output.status.success(), "Frontend build failed");
    }
}

Step 2: Implement Minimum to Pass

// Create minimal tauri.conf.json
{
  "package": { "productName": "MyApp", "version": "0.1.0" },
  "tauri": {
    "bundle": {
      "identifier": "com.company.myapp",
      "icon": ["icons/icon.ico", "icons/icon.icns", "icons/icon.png"]
    }
  }
}

Step 3: Refactor and Expand

Add platform-specific tests as you expand configuration:

#[test]
fn test_windows_signing_config() {
    let config: serde_json::Value = serde_json::from_str(
        &std::fs::read_to_string("src-tauri/tauri.conf.json").unwrap()
    ).unwrap();
    let windows = &config["tauri"]["bundle"]["windows"];
    assert!(windows["timestampUrl"].as_str().is_some());
}

#[test]
fn test_macos_minimum_version() {
    let config: serde_json::Value = serde_json::from_str(
        &std::fs::read_to_string("src-tauri/tauri.conf.json").unwrap()
    ).unwrap();
    let min_ver = config["tauri"]["bundle"]["macOS"]["minimumSystemVersion"]
        .as_str().unwrap();
    assert!(min_ver >= "10.15", "Must support macOS 10.15+");
}

Step 4: Run Full Verification

# Run all build tests
cargo test --manifest-path src-tauri/Cargo.toml

# Verify builds on all platforms (CI)
npm run tauri build -- --target x86_64-pc-windows-msvc
npm run tauri build -- --target x86_64-apple-darwin
npm run tauri build -- --target x86_64-unknown-linux-gnu

# Verify signatures
signtool verify /pa target/release/bundle/msi/*.msi
codesign --verify --deep target/release/bundle/macos/*.app

7. Performance Patterns

7.1 Incremental Builds

# Cargo.toml - Enable incremental compilation
[profile.dev]
incremental = true

[profile.release]
incremental = true
lto = "thin"  # Faster than "fat" LTO

Good: Incremental builds reuse compiled artifacts

# First build: 2-3 minutes
cargo build --release
# Subsequent builds: 10-30 seconds
cargo build --release

Bad: Clean builds every time

cargo clean && cargo build --release  # Always slow

7.2 Build Caching

Good: Cache Rust dependencies in CI

- name: Cache Cargo
  uses: actions/cache@v4
  with:
    path: |
      ~/.cargo/registry
      ~/.cargo/git
      target
    key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

Bad: No caching - downloads dependencies every build

- name: Build
  run: cargo build --release  # Downloads everything

7.3 Parallel Compilation

Good: Maximize parallel jobs

# .cargo/config.toml
[build]
jobs = 8  # Match CPU cores

[target.x86_64-unknown-linux-gnu]
rustflags = ["-C", "link-arg=-fuse-ld=mold"]  # Fast linker

Bad: Single-threaded compilation

cargo build -j 1  # Extremely slow

7.4 Tree-Shaking and Dead Code Elimination

Good: Enable LTO for smaller binaries

[profile.release]
lto = true
codegen-units = 1
panic = "abort"
strip = true

Bad: Debug symbols in release

[profile.release]
debug = true  # Bloats binary size

7.5 Code Splitting (Frontend)

Good: Lazy load routes

// nuxt.config.ts
export default defineNuxtConfig({
  experimental: {
    treeshakeClientOnly: true
  },
  vite: {
    build: {
      rollupOptions: {
        output: {
          manualChunks: {
            'vendor': ['vue', 'pinia'],
            'three': ['three', '@tresjs/core']
          }
        }
      }
    }
  }
})

Bad: Bundle everything together

// Single massive bundle
import * as everything from './all-modules'

7.6 Build Size Optimization

Good: Analyze and optimize bundle

# Analyze Rust binary
cargo bloat --release --crates

# Analyze frontend bundle
npx nuxi analyze

Bad: Ignore bundle size

npm run build  # Never check what's included

8. Common Mistakes & Anti-Patterns

8.1 Hardcoded Paths

// WRONG: Windows-style path
let config = std::fs::read("C:\\Users\\app\\config.json")?;

// WRONG: Unix-style absolute path
let config = std::fs::read("/home/user/.config/app/config.json")?;

// CORRECT: Platform-appropriate paths
use directories::ProjectDirs;

let dirs = ProjectDirs::from("com", "company", "app")
    .expect("Failed to get project directories");
let config_path = dirs.config_dir().join("config.json");
let config = std::fs::read(config_path)?;

8.2 Missing Platform Dependencies

# WRONG: Missing Linux dependencies
- name: Build
  run: npm run tauri build  # Fails on Linux!

# CORRECT: Install platform dependencies
- name: Install Dependencies (Linux)
  if: matrix.platform == 'ubuntu-22.04'
  run: |
    sudo apt-get update
    sudo apt-get install -y \
      libgtk-3-dev \
      libwebkit2gtk-4.0-dev \
      libappindicator3-dev

8.3 Universal Binary Issues

# WRONG: Build universal without both targets
- name: Build macOS Universal
  run: npm run tauri build -- --target universal-apple-darwin
  # Fails if x86_64 or aarch64 not available!

# CORRECT: Build each architecture separately
- name: Build macOS Intel
  run: npm run tauri build -- --target x86_64-apple-darwin

- name: Build macOS ARM
  run: npm run tauri build -- --target aarch64-apple-darwin

- name: Create Universal Binary
  run: |
    lipo -create \
      target/x86_64-apple-darwin/release/myapp \
      target/aarch64-apple-darwin/release/myapp \
      -output target/universal/myapp

8.4 Missing Notarization

# WRONG: Sign without notarization
codesign --sign "Developer ID" MyApp.app
# Users get Gatekeeper warnings!

# CORRECT: Sign and notarize
codesign --sign "Developer ID" --options runtime MyApp.app
xcrun notarytool submit MyApp.zip --apple-id "$APPLE_ID" --password "$APP_PASSWORD" --team-id "$TEAM_ID" --wait
xcrun stapler staple MyApp.app

13. Pre-Implementation Checklist

Phase 1: Before Writing Code

  • Read all platform-specific requirements
  • Identify target platforms and architectures
  • Write tests for build configuration validation
  • Set up CI/CD matrix for all targets
  • Acquire code signing certificates
  • Configure secrets in CI environment

Phase 2: During Implementation

  • Run tests after each configuration change
  • Verify incremental builds are working
  • Test platform-specific code with conditional compilation
  • Check bundle sizes after adding dependencies
  • Validate icons exist for all platforms
  • Test on actual target platforms (not just CI)

Phase 3: Before Committing

  • All build configuration tests pass
  • Windows certificate is EV or has built reputation
  • macOS app is signed with Developer ID
  • macOS app is notarized and stapled
  • Linux packages are signed with GPG
  • All signatures use timestamping
  • Signing credentials in CI secrets only
  • Build artifacts have checksums
  • Dependencies are pinned
  • Build logs don't expose secrets
  • Windows SmartScreen passes
  • macOS Gatekeeper passes
  • Installer tested on clean systems
  • Auto-update URLs are HTTPS

14. Summary

Your goal is to create cross-platform builds that are:

  • Correctly Signed: Trusted by each operating system
  • Platform Native: Respecting each platform's conventions
  • Optimized: Reasonable file sizes, fast startup

You understand that cross-platform development requires:

  1. Testing on each target platform (not just your development machine)
  2. Proper code signing for user trust
  3. Platform-specific configurations and dependencies
  4. Awareness of distribution requirements

Build Reminder: ALWAYS test on each platform before release. ALWAYS sign your releases. ALWAYS verify signatures work correctly. When in doubt, consult references/security-examples.md for signing procedures.

平台分布

Antigravity

30.28%
按下载量换算846

Claude Code

20.8%
按下载量换算581

Codex

18.18%
按下载量换算508

OpenCode

11.75%
按下载量换算328

Gemini CLI

7.47%
按下载量换算209

windsurf

3.5%
按下载量换算98

安全审计

Gen Agent Trust Hub

未通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。

继续浏览同类 Skills