AgentSkillsCN

pack-validate

验证软件包是否完整、结构正确且易于导航。

SKILL.md
--- frontmatter
name: pack-validate
description: "Validates that a pack is complete, correctly structured, and navigable."
<!-- CONTENT_HASH: 88b9e58c965d51414dc6f300f7cf84ef02b0f91c341acb159dea97c4da4f05af -->

required_canon_version: >=3.0.0

Skill: pack-validate

Version: 0.1.0

Status: Active

Purpose

Validates that a pack is complete, correctly structured, and navigable.

Checks Performed

  1. Structure Validation

    • meta/ directory exists
    • repo/ directory exists
    • Required meta files present (PACK_INFO.json, REPO_STATE.json, FILE_INDEX.json)
  2. Manifest Integrity

    • All files in manifest exist in pack
    • File hashes match manifest
  3. Navigation Validation

    • START_HERE.md or ENTRYPOINTS.md accessible
    • Split files have correct naming (AGS-00_INDEX.md, etc.)
  4. Token Validation

    • CONTEXT.txt exists
    • Token warnings noted
  5. PRUNED Validation (if PRUNED/ exists)

    • PRUNED/PACK_MANIFEST_PRUNED.json exists and has valid schema
    • PRUNED/meta/PRUNED_RULES.json exists
    • Manifest entries include path, hash, and size
    • Hashes and sizes match actual files
    • Manifest entries are in canonical (lexicographic) order
    • No staging directories (.pruned_staging_*) or backup directories (PRUNED._old) present

Inputs

  • pack_path: Path to the pack directory to validate

Outputs

  • valid: Boolean - whether pack passes all checks
  • errors: List of validation errors
  • warnings: List of warnings (non-fatal)
  • stats: Pack statistics (file count, bytes, tokens)

required_canon_version: >=3.0.0