Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问许可证需确认审计通过

axiom-code-signing公理代码签名

Agent Skill

axiom-code-signing 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

1,368

周安装

57

GitHub Stars

873

下载量

456
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

请帮我安装这个 Agent Skill:axiom-code-signing(公理代码签名)
来源仓库:https://github.com/charleswiltgen/axiom
仓库路径:skills/axiom-code-signing
安装命令:
npx skills add https://github.com/charleswiltgen/axiom --skill axiom-code-signing
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/charleswiltgen/axiom --skill axiom-code-signing

简介

代码签名证书、描述文件与权利配置的全流程管理。

  • 支持 App Store、TestFlight 与 Ad Hoc 分发场景准备。
  • 涵盖 fastlane match 团队协作与 CI/CD 自动化设置。
  • 需定期更新证书并验证描述文件有效期与设备列表匹配。
  • axiom-code-signing 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Code Signing

Certificate management, provisioning profiles, entitlements configuration, CI/CD signing setup, and distribution build preparation for iOS/macOS apps.

When to Use This Skill

Use when you need to:

  • ☑ Set up code signing for a new project or CI/CD pipeline
  • ☑ Debug any code signing error (certificate, profile, entitlement, Keychain)
  • ☑ Configure signing for App Store, TestFlight, or Ad Hoc distribution
  • ☑ Manage certificates and profiles across a team
  • ☑ Set up fastlane match for team-wide certificate management
  • ☑ Understand automatic vs manual signing tradeoffs
  • ☑ Add a new capability that requires entitlement changes
  • ☑ Fix CI/CD signing failures (errSecInternalComponent, locked keychain)

Example Prompts

"How do I set up code signing for my app?" "My build fails with 'No signing certificate found'" "How do I set up fastlane match for my team?" "errSecInternalComponent in GitHub Actions" "ITMS-90035 when uploading to App Store" "How do I add push notification entitlements?" "Multiple certificates match — ambiguous identity" "Code signing works locally but fails in CI" "How do I sign for App Store distribution?" "My provisioning profile expired, what do I do?"

Red Flags

Signs you're making this harder than it needs to be:

  • ❌ Sharing certificates via Slack/email —.p12 files in chat create security risks and version confusion. Use fastlane match or Xcode's automatic signing.
  • ❌ Disabling code signing to "fix" a build — Code signing can't be disabled for device or distribution builds. The error will return.
  • ❌ Committing.p12 or.mobileprovision to git — These are secrets. Use CI secrets management (GitHub Secrets, environment variables).
  • ❌ Regenerating all certificates "to be safe" — Revokes existing certs, breaking every team member and CI pipeline.
  • ❌ Using a personal certificate for team/CI builds — When that person leaves or their cert expires, everything breaks.
  • ❌ Ignoring "profile doesn't include signing certificate" warnings — This always becomes a build failure. Fix it now.
  • ❌ Setting CODE_SIGN_IDENTITY = "" to suppress errors — Defers the problem to archive/export where it's harder to debug.
  • ❌ Manually managing profiles for automatic-signing projects — Pick one approach. Mixing causes conflicts.

Mandatory First Steps

Before configuring or debugging any code signing issue:

1. List Available Signing Identities

security find-identity -v -p codesigning

This tells you what certificates are installed, valid, and available for signing.

2. Decode the Provisioning Profile

# Find profile embedded in most recent build
find ~/Library/Developer/Xcode/DerivedData -name "embedded.mobileprovision" -newer . 2>/dev/null | head -3

# Decode it
security cms -D -i path/to/embedded.mobileprovision

Check: expiration, embedded certificates, entitlements, device list.

3. Extract Entitlements from the Binary

codesign -d --entitlements - /path/to/MyApp.app

Compare these against the profile's entitlements and your.entitlements file. All three must agree.

4. Verify Certificate in Profile

# Get SHA-1 from keychain
security find-identity -v -p codesigning | grep "Apple Distribution"
# Output: 1) ABCDEF123... "Apple Distribution: Company (TEAMID)"

# Get SHA-1 from profile
security cms -D -i embedded.mobileprovision | plutil -extract DeveloperCertificates xml1 -o - -
echo "<base64 data>" | base64 -d | openssl x509 -inform DER -noout -fingerprint -sha1

The SHA-1 hashes must match. If they don't, the profile was generated with a different certificate than the one in your keychain.

Automatic vs Manual Signing

digraph signing_decision {
    "New project or\nsmall team?" [shape=diamond];
    "CI/CD pipeline?" [shape=diamond];
    "Multiple targets\nwith different profiles?" [shape=diamond];
    "Team > 3 developers?" [shape=diamond];

    "Automatic Signing" [shape=box, label="Use Automatic Signing\nXcode manages everything"];
    "Manual + match" [shape=box, label="Use Manual Signing\n+ fastlane match"];
    "Manual Signing" [shape=box, label="Use Manual Signing\nspecify profiles explicitly"];
    "Automatic + overrides" [shape=box, label="Use Automatic Signing\nwith xcodebuild overrides\nfor CI"];

    "New project or\nsmall team?" -> "CI/CD pipeline?" [label="no, larger team"];
    "New project or\nsmall team?" -> "Automatic Signing" [label="yes, solo/2-3 devs"];
    "CI/CD pipeline?" -> "Team > 3 developers?" [label="yes, have CI"];
    "CI/CD pipeline?" -> "Multiple targets\nwith different profiles?" [label="no CI"];
    "Team > 3 developers?" -> "Manual + match" [label="yes"];
    "Team > 3 developers?" -> "Automatic + overrides" [label="no, small team + CI"];
    "Multiple targets\nwith different profiles?" -> "Manual Signing" [label="yes"];
    "Multiple targets\nwith different profiles?" -> "Automatic Signing" [label="no"];
}

Automatic Signing

Best for: Solo developers, small teams, projects without CI.

Xcode manages certificates and provisioning profiles automatically. You just select a team.

Xcode → Target → Signing & Capabilities → ✓ Automatically manage signing → Select Team

How it works:

  • Xcode creates/downloads certificates as needed
  • Generates provisioning profiles that match your capabilities
  • Regenerates profiles when you add/remove capabilities
  • Registers devices when you connect them

Limitations:

  • Only one developer's cert per machine (can conflict in teams)
  • CI requires xcodebuild overrides or Xcode Cloud
  • Can't share profiles across team members easily
  • May select unexpected profile if multiple are available

Manual Signing

Best for: Teams, CI/CD pipelines, apps with multiple targets/extensions.

You explicitly specify which certificate and profile to use.

Xcode → Target → Signing & Capabilities → ✗ Automatically manage signing
→ Select Provisioning Profile for each configuration (Debug/Release)

How it works:

  • You create certificates and profiles in Apple Developer Portal
  • Download and install profiles manually (or use match)
  • Specify exact profile in Xcode or xcodebuild
  • Full control over which cert/profile combination is used

Required build settings:

CODE_SIGN_STYLE = Manual
CODE_SIGN_IDENTITY = Apple Distribution: Company Name (TEAMID)
PROVISIONING_PROFILE_SPECIFIER = MyApp App Store Profile
DEVELOPMENT_TEAM = YOURTEAMID

Certificate Types and Lifecycle

Certificate Type Selection

ScenarioCertificate TypeNotes
Debug build on deviceApple DevelopmentAuto-created by Xcode
TestFlight / App StoreApple Distribution3 max per account
Ad Hoc distributionApple DistributionSame cert, different profile type
macOS outside App StoreDeveloper ID Application5-year validity

Certificate Renewal Workflow

Certificates expire after 1 year (5 years for Developer ID). When a cert expires:

  1. Don't revoke the expired cert — it's already expired; revoking removes it from the portal and invalidates any profiles still referencing it
  2. Create a new certificate in Apple Developer Portal
  3. Download and install the new certificate
  4. Edit ALL provisioning profiles that used the old cert → select the new cert → regenerate
  5. Download and install updated profiles
  6. Update CI with the new.p12 and profiles
  7. If using fastlane match: fastlane match nuke [type] then fastlane match [type]

Team coordination: Notify the team before regenerating. Distribution certs are shared — regenerating one affects everyone.

Provisioning Profile Patterns

Development Profile

For debug builds on registered devices:

  • Contains: Development certificate + registered device UDIDs + App ID + entitlements
  • Created: Automatically by Xcode (automatic signing) or manually in portal
  • Devices: Must be explicitly registered in portal (100 device limit per type per year)

Ad Hoc Profile

For testing on specific devices without TestFlight:

  • Contains: Distribution certificate + registered device UDIDs + App ID + entitlements
  • Use case: QA testing, client demos, beta testing without TestFlight
  • Limitation: Same 100-device annual limit as Development

App Store Profile

For TestFlight and App Store submission:

  • Contains: Distribution certificate + App ID + entitlements (NO device list)
  • No device limit — TestFlight supports up to 10,000 testers
  • Required for Xcode Organizer upload or xcodebuild -exportArchive

Enterprise Profile

For in-house distribution (Apple Developer Enterprise Program only):

  • Contains: Enterprise certificate + App ID + entitlements (NO device list)
  • Distribute internally without device registration
  • Cannot submit to App Store
  • Apple audits for compliance — misuse (distributing to public) results in program termination

Entitlements Configuration

Adding a New Capability

  1. Apple Developer Portal: App IDs → Select your App ID → Capabilities → Enable the capability
  2. Xcode: Target → Signing & Capabilities → + Capability → Select capability
  3. Regenerate profile: If using manual signing, edit the provisioning profile to include the new capability, then generate and download

If using automatic signing, Xcode handles steps 1 and 3 automatically.

Common Capability → Entitlement Mapping

CapabilityEntitlement KeyProfile Requirement
Push Notificationsaps-environmentMust be in profile
App Groupscom.apple.security.application-groupsMust be in profile
Associated Domainscom.apple.developer.associated-domainsMust be in profile
Sign in with Applecom.apple.developer.applesigninMust be in profile
HealthKitcom.apple.developer.healthkitMust be in profile
iCloudcom.apple.developer.icloud-*Must be in profile
In-App PurchaseAutomaticNo profile change needed
Background ModesUIBackgroundModes (Info.plist)No profile change needed
Keychain Sharingkeychain-access-groupsMust be in profile

Multi-Target Entitlements

Each target (app, widget, extension, etc.) needs its own:

  • App ID in the Developer Portal
  • Provisioning profile
  • .entitlements file

All targets must share the same Team ID. App Groups enable data sharing between targets.

com.example.app                  → MyApp.entitlements
com.example.app.widget           → Widget/Widget.entitlements
com.example.app.NotificationService → NotificationService/NotificationService.entitlements

CI/CD Signing Setup

Without fastlane (raw scripts)

See axiom-code-signing-ref for complete CI keychain scripts. The critical steps:

  1. Create temporary keychain
  2. Add to search list (include login.keychain-db) — do NOT use default-keychain -s as it breaks access to login keychain credentials
  3. Unlock keychain
  4. Import.p12 certificate
  5. Set partition list (prevents errSecInternalComponent)
  6. Install provisioning profile to ~/Library/MobileDevice/Provisioning Profiles/
  7. Build/archive with explicit signing settings
  8. Cleanup — delete temporary keychain (always, even on failure)

With fastlane match

fastlane match manages certificates and profiles in a shared git repo (or cloud storage), encrypted with a passphrase.

Initial setup (run once by a team admin):

fastlane match init              # Choose storage (git, google_cloud, s3)
fastlane match development       # Generate dev certs + profiles
fastlane match appstore          # Generate distribution certs + profiles

CI usage (readonly — never generate in CI):

# Fastfile
lane :release do
  setup_ci                        # Creates temporary keychain
  match(type: "appstore", readonly: true)
  build_app(scheme: "MyApp", export_method: "app-store")
end

Key rules:

  • CI must use readonly: true — never generate certificates from CI
  • Set MATCH_PASSWORD as a CI secret (encrypts/decrypts the cert repo)
  • Use setup_ci to create a temporary keychain (handles all keychain setup)
  • Each app target needs its own app_identifier in Matchfile

Xcode Cloud

Xcode Cloud handles signing automatically:

  • No certificate management needed — Apple manages signing infrastructure
  • Configure in Xcode → Product → Xcode Cloud → Manage Workflows
  • Use ci_post_clone.sh for custom setup (SPM auth, certificates from custom sources)
  • Distribution signing is handled during the "Archive" action

Anti-Patterns

Anti-Pattern 1: Sharing.p12 via Chat

Wrong:

Slack: "Hey, here's the distribution cert 📎 cert.p12, password is Company123"

Right: Use fastlane match (encrypted git repo) or Xcode's automatic signing with a shared team account.

Why it matters:.p12 files shared in chat create security risks (credentials in chat history), version confusion (which cert is current?), and single-point-of-failure (if the sender's cert expires or is revoked). Time cost: 1-2 hours per team member when the shared cert breaks.

Anti-Pattern 2: Committing Secrets to Git

Wrong:

git add certificates/distribution.p12
git add profiles/AppStore.mobileprovision
git commit -m "Add signing files"

Right: Use CI secrets management:

# GitHub Actions
echo "$P12_BASE64" | base64 --decode > certificate.p12   # From secrets
echo "$PROFILE_BASE64" | base64 --decode > profile.mobileprovision

Why it matters: Certificates and profiles are secrets — they allow anyone to sign apps as your team. Even in private repos, git history is permanent. Once committed, the credential is in every clone forever.

If already committed: Scrub history with git filter-repo --path path/to/cert.p12 --invert-paths, then rotate the compromised certificate (revoke in portal, create new, update CI secrets). Every existing clone still has the old cert — treat it as compromised.

Anti-Pattern 3: "Fix" Signing by Disabling It

Wrong:

CODE_SIGN_IDENTITY = ""
CODE_SIGNING_REQUIRED = NO
CODE_SIGNING_ALLOWED = NO

Right: Diagnose the actual signing error with the mandatory diagnostic steps.

Why it matters: Disabling code signing "works" for Simulator builds but fails for device builds, archives, and distribution. The problem is deferred to a point where it's harder to debug and closer to a deadline. Time cost: the original issue plus 30+ minutes of export/upload debugging.

Anti-Pattern 4: Using Personal Cert for Team/CI

Wrong:

# CI pipeline uses one developer's personal certificate
security import ~/charles-personal.p12 ...
CODE_SIGN_IDENTITY = "Apple Distribution: Charles Personal (ABC123)"

Right: Use a dedicated team certificate managed via fastlane match or a shared Apple Developer account:

match(type: "appstore", readonly: true)

Why it matters: When that developer leaves, changes machines, or their cert expires, CI and all team distribution breaks. One person's personal cert should never be a shared infrastructure dependency. Time cost: 2-4 hours of emergency cert rotation when the person is unavailable.

Pressure Scenarios

Scenario 1: "Just disable code signing so we can ship today"

Context: Build deadline approaching, code signing error blocking the archive.

Pressure: "We don't need signing for testing, just disable it and we'll fix it after release."

Reality: You can't submit to TestFlight or the App Store without valid code signing. Disabling it now defers a blocking issue to the most time-pressured moment — the actual submission. The diagnostic steps take 5-10 minutes and will identify the root cause.

Correct action: Run Steps 1-4 from Mandatory First Steps. Most signing issues are a single expired or mismatched component.

Push-back template: "We can't submit to TestFlight or the App Store without valid signing. The diagnostic takes 5 minutes and will tell us exactly what's wrong. Disabling it now means we'll hit the same blocker during submission with even less time."

Scenario 2: "Use my personal certificate for the team build"

Context: CI is broken because the distribution certificate expired. A team member offers their personal cert as a quick fix.

Pressure: "I have a working cert, just use mine for now."

Reality: Using a personal certificate creates a single point of failure. When that person is unavailable, on vacation, or leaves the company, signing breaks with no path to recovery without their cooperation. The proper fix (renewing the team cert) takes the same amount of time.

Correct action: Renew the team's distribution certificate in Apple Developer Portal. Update CI secrets. Regenerate provisioning profiles with the new cert.

Push-back template: "Your cert would work short-term, but it makes you a single point of failure for all builds. Renewing the team cert takes the same 10 minutes and doesn't create a dependency on one person."

Scenario 3: "Commit the.p12 to the repo so CI has it"

Context: Setting up CI/CD for the first time. Developer wants to commit the certificate to git for convenience.

Pressure: "It's a private repo, nobody else can see it."

Reality: Git history is permanent. Even in private repos, the.p12 (which contains the private key) lives in every clone, every fork, and every backup forever. If the repo is ever made public, open-sourced, or accessed by a contractor, the signing key is exposed. CI secrets management exists specifically for this.

Correct action: Base64-encode the.p12 and store as a CI secret (GitHub Secrets, GitLab CI Variables, etc.). Decode at build time.

Push-back template: "Git history is permanent — once committed, the certificate is in every clone forever. CI secrets management (GitHub Secrets) takes the same effort to set up and is designed for exactly this. Let me set it up properly."

Checklist

Before archiving for distribution:

Certificates:

  • Distribution certificate valid (not expired, not revoked)
  • security find-identity -v -p codesigning shows the expected identity
  • Certificate matches what provisioning profile expects

Provisioning Profiles:

  • Profile not expired
  • Profile type matches distribution method (App Store, Ad Hoc, Enterprise)
  • Profile contains the certificate being used for signing
  • Profile bundle ID matches target's bundle identifier

Entitlements:

  • All capabilities in Xcode match capabilities in profile
  • .entitlements file doesn't contain capabilities not in profile
  • App extensions have their own profiles with correct entitlements
  • App Groups consistent across main app and extensions

Build Settings:

  • CODE_SIGN_STYLE matches intent (Automatic or Manual)
  • CODE_SIGN_IDENTITY correct for build type (Development vs Distribution)
  • PROVISIONING_PROFILE_SPECIFIER set for manual signing
  • DEVELOPMENT_TEAM set to correct Team ID

CI/CD (if applicable):

  • Keychain created, unlocked, and partition list set
  • Certificate imported into CI keychain
  • Profile installed to ~/Library/MobileDevice/Provisioning Profiles/
  • Cleanup step runs on success and failure (if: always())

Resources

WWDC: 2021-10204, 2022-110353

Docs: /security, /bundleresources/entitlements, /xcode/distributing-your-app

Skills: axiom-code-signing-ref, axiom-code-signing-diag

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

32.84%
按下载量换算150

Claude

28.05%
按下载量换算128

Cursor

20.43%
按下载量换算93

Gemini CLI

9.24%
按下载量换算42

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills