Skip to content

@tank/tank-project-setup

1.1.0
Skill

Description

Auto-detect project stack and integrate Tank skills with CI/CD. Scans for framework indicators, recommends skills, creates skills.json, runs tank install, sets up GitHub Actions/GitLab CI.

Triggered by

set up tanktank init projecttank cicddetect project typeadd tank to ciinstall tank skills
Download
Review Recommended
tank install @tank/tank-project-setup

Tank Project Setup

Detect project stack, install relevant Tank skills, and wire up CI/CD so every clone gets skills automatically via tank install.

Core Workflow

Execute steps in order. Do not skip.

Step 1: Detect Project Stack

Run scripts/detect-project.sh in the project root, or manually scan for:

FileStack Signal
package.jsonNode.js (inspect dependencies for framework)
tsconfig.jsonTypeScript
next.config.*Next.js
angular.jsonAngular
tailwind.config.*Tailwind CSS
pyproject.toml / requirements.txtPython
.github/GitHub-hosted (CI target)
docker-compose.ymlDocker/infrastructure
prisma/ / drizzle.config.*Database ORM
playwright.config.* / cypress.config.*E2E testing
figma-plugin/manifest.jsonFigma plugin

Present detected stack to user for confirmation before proceeding.

Step 2: Map Stack to Skills

Use the mapping table in references/SKILL_CATALOG.md to select skills. Always include @tank/clean-code unless user opts out.

Step 3: Create or Update skills.json

If skills.json exists at project root, merge new skills into the skills field. If not, create one:

{
  "skills": {
    "@tank/clean-code": "^3.0.0",
    "@tank/react": "^2.0.0"
  }
}

Project-level skills.json only needs the skills field — it is NOT a skill manifest (no name, version, or permissions required).

Step 4: Install Skills

tank install

This reads skills.json, resolves versions, downloads packages to the local .tank/ cache, and creates skills.lock with SHA-512 integrity hashes.

After install, verify:

tank doctor
tank permissions

Step 5: Set Up CI/CD

Detect CI platform and add tank install step:

  • GitHub Actions: See assets/github-action-tank-install.yml
  • GitLab CI: See references/CICD_INTEGRATION.md

Key requirements for CI:

  1. Install Tank CLI: npm install -g @tankpkg/cli
  2. Run tank install (reads lockfile for deterministic installs)
  3. Run tank verify to confirm integrity

No authentication needed for tank install — only tank publish requires auth.

Step 6: Update .gitignore

Add Tank artifacts that should not be committed:

# Tank skills (installed via tank install)
.tank/

Ensure skills.json and skills.lock ARE committed (like package.json and package-lock.json).

Decision Tree: When to Use Global vs Local

ScenarioInstall TypeCommand
Skills shared across all projectsGlobaltank install -g @org/skill
Skills specific to this projectLocaltank install @org/skill
CI/CD pipelineLocal (from lockfile)tank install
Developer onboardingLocal (from lockfile)tank install

Quick Reference: Tank Consumer Commands

tank install                     # Install all from lockfile
tank install @org/skill          # Add specific skill
tank install -g @org/skill       # Install globally
tank update                      # Update all within ranges
tank update @org/skill           # Update specific skill
tank remove @org/skill           # Remove skill
tank verify                      # Verify lockfile integrity
tank permissions                 # Show permission summary
tank doctor                      # Health check
tank search "query"              # Find skills in registry
tank info @org/skill             # Show skill metadata

Failure Map

ProblemFix
tank: command not foundnpm install -g @tankpkg/cli
No skills.json foundCreate one with skills field or run tank init
Version not foundCheck available versions: tank info @org/skill
Integrity check failedDelete skills.lock and .tank/, re-run tank install
Permission denied in CINo auth needed for install; check file permissions

Resources

References

Scripts

  • scripts/detect-project.sh <dir> — Scan project directory and output detected stack as JSON

Assets

Command Palette

Search packages, docs, and navigate Tank