AgentSkillsCN

arc-package-validator

依据 ARCKnowledge 中定义的 ARC Labs Studio 标准,对 Swift 包进行合规性验证。适用于检查包的合规性、审计其结构、在发布前进行审查,或验证 ARCDevTools 的集成效果。当收到诸如“验证包”、“检查 ARC 标准”、“此包是否已就绪”、“审计 ARCPackage”、“包合规性检查”、“审查包结构”等请求时,自动触发相应流程。

SKILL.md
--- frontmatter
name: arc-package-validator
description: Validate Swift Packages against ARC Labs Studio standards defined in ARCKnowledge. Use when checking package compliance, auditing structure, reviewing before release, or verifying ARCDevTools integration. Triggers on requests like "validate package", "check ARC standards", "is this package ready", "audit ARCPackage", "package compliance check", "review package structure".
allowed-tools: Read, Grep, Glob, Bash

ARC Package Validator

Validates Swift Packages against ARC Labs Studio standards defined in ARCKnowledge.

Quick Start

Validate current package:

bash
swift .claude/skills/arc-package-validator/scripts/validate.swift .

Validate with automatic fixes:

bash
swift .claude/skills/arc-package-validator/scripts/validate.swift . --fix

Validate specific package:

bash
swift .claude/skills/arc-package-validator/scripts/validate.swift /path/to/ARCPackageName

Or simply ask: "Validate this package against ARC standards" and I'll run the checks automatically.

Validation Categories

📁 Structure (from package-structure.md)

  • Package.swift with Swift 6.0 and iOS 17+
  • README.md following ARC Labs template
  • LICENSE (MIT)
  • CHANGELOG.md (Keep a Changelog format)
  • Sources/PackageName/ directory
  • Tests/PackageNameTests/ directory
  • Documentation.docc/ catalog

⚙️ Configuration (from arcdevtools.md)

  • ARCDevTools as git submodule
  • .swiftlint.yml present
  • .swiftformat present
  • .github/workflows/ with CI

📖 Documentation (from readme-standards.md)

  • Badges: Swift, Platforms, License, Version
  • Required sections: Overview, Requirements, Installation, Usage
  • DocC with package overview

🧹 Code Quality

  • SwiftLint passes without errors
  • SwiftFormat check passes
  • Swift 6 strict concurrency compliance

Severity Levels

LevelIconMeaningAction
Error🔴Blocks releaseMust fix before merge to main
Warning🟡Should fixFix before next release
Info🔵SuggestionOptional improvement

Fix Mode

The --fix flag applies safe automatic fixes:

Safe fixes (applied automatically):

  • Create missing directories (Documentation.docc/, .github/workflows/)
  • Copy template files from ARCDevTools
  • Create CHANGELOG.md template
  • Initialize empty DocC catalog

Manual fixes (reported only):

  • Package.swift modifications
  • README content changes
  • Existing file modifications

Output

The validator generates a Markdown report with:

  • Overall compliance score (percentage)
  • Status indicator (✅ Pass / ⚠️ Warnings / ❌ Errors)
  • Detailed list of passed checks
  • Failed checks with specific fix instructions
  • Commands to resolve each issue

Exit Codes

CodeMeaning
0All checks passed (or only warnings/info)
1Has blocking errors (🔴)

Reference

For detailed standards and checklist, see references/checklist.md.