@tank/tank-package-publisher
1.2.0Package lifecycle specialist for Tank directory publishing. Covers dry-run-first workflow, manifest validation (skills.json), version bumping (semver), permission auditing, .tankignore patterns, CI/CD pipelines, and error remediation. Sources: Tank CLI docs. Triggers: tank publish, publish skill, dry run, skills.json, version bump, manifest, package, release, Tank directory, publish error, version exists, tank login, tank info, tank verify.
name: "@tank/tank-package-publisher" description: Package lifecycle specialist for Tank directory publishing. Use when users ask to publish a skill to Tank, run tank publish, fix publish failures, validate skills.json, bump versions, or verify releases. Handles dry-run-first workflow, manifest validation, and publish error remediation.
Tank Package Publisher
Manage, validate, and publish skills to the Tank directory using the tank CLI with a dry-run-first workflow.
Trigger Phrases
- "publish this skill to Tank"
- "run tank publish"
- "tank publish --dry-run"
- "version already exists"
- "fix tank publish error"
- "prepare this skill for release"
- "validate skills.json before publishing"
- "release checklist for tankpkg"
Critical Workflow
Do not skip steps. Always run in order.
-
Preflight
- Ensure
tankis installed:tank --version - Ensure auth is valid:
tank whoami(or runtank login) - Ensure target directory contains both required files:
skills.jsonSKILL.md
- Ensure
-
Manifest and Package Validation
- Validate
skills.jsonparseability and required fields. - Confirm package name is valid (lowercase, optional
@org/name, max length 214). - Confirm semver version format.
- Ensure package stays within Tank packer limits:
- max compressed package size: 50MB
- max file count: 1000
- Validate
-
Dry Run First
- Run:
tank publish --dry-run - Do not publish if dry-run fails.
- Review dry-run output for name/version/size/file count.
- Run:
-
Publish
- Run:
tank publish - If publish fails, classify error and apply the matching fix from the Failure Map.
- Run:
-
Post-Publish Verification
- Confirm package appears in directory:
tank info <package-name>tank search <keyword>
- Optionally run
tank verifyandtank audit <package-name>.
- Confirm package appears in directory:
Manifest Rules
Recommended skills.json baseline:
{
"name": "@tank/your-skill-name",
"version": "1.0.0",
"description": "One-sentence trigger-oriented description.",
"permissions": {
"network": { "outbound": [] },
"filesystem": { "read": [], "write": [] },
"subprocess": false
},
"repository": "https://github.com/tankpkg/skills"
}
Use least-privilege permissions unless the workflow requires broader access.
Package Hygiene
- Keep release payload small and focused.
- Exclude unnecessary files with
.tankignore. - Tank automatically excludes
node_modulesand.git. - Avoid symlinks and path tricks; Tank packer rejects unsafe paths.
Failure Map
- Not logged in (
Not logged in. Run: tank login)- Run
tank login, then retry.
- Run
- No skills.json found
- Run
tank initin target directory, then populate metadata and retry.
- Run
- Invalid skills.json / parse error
- Fix JSON syntax and schema shape, rerun dry-run.
- 401 Authentication failed
- Re-authenticate with
tank login; verify token withtank whoami.
- Re-authenticate with
- 403 permission error
- Confirm org ownership or publish rights for package scope.
- 409 version already exists
- Bump
skills.json.versionto next semver and republish.
- Bump
- Upload/confirm failed
- Retry once, then inspect network/auth state and rerun dry-run.
Safe Defaults
- Default to
tank publish --dry-runbefore every real publish. - Never mutate unrelated files during release prep.
- For bugfix releases, keep changes minimal and version bump explicit.
- Always report exact command outputs that matter (name/version, dry-run pass/fail, final publish status).
Output Contract
When completing a publish task, return:
- Package name and target version.
- Preflight results (auth, required files, manifest validity).
- Dry-run status and key metrics.
- Publish result (success/failure) and exact remediation if failed.
- Post-publish verification commands and their outcomes.
Resources
Additional documentation and tools for Tank publishing:
References
- references/MANIFEST_SCHEMA.md — Complete
skills.jsonschema with field constraints and examples - references/ERROR_CODES.md — Full error catalog with remediation steps
- references/CI_PUBLISHING.md — CI/CD automation workflows for GitHub Actions, GitLab CI
Scripts
Executable helpers for common tasks:
scripts/preflight-check.sh <dir>— Validate auth, required files, and package limitsscripts/validate-manifest.sh <dir>— Checkskills.jsonsyntax and schemascripts/version-bump.sh <dir> <major|minor|patch>— Bump version in manifest and SKILL.md
Assets
- assets/skills.json.template — Starter manifest with all fields
- assets/.tankignore.template — Common ignore patterns