CI/CD Pipeline Integration
FastSkill provides comprehensive CI/CD integration for automated skill packaging, versioning, and publishing. This guide covers setup, workflows, and best practices.Overview
FastSkill’s CI/CD integration enables:- Automatic Change Detection: Detect which skills have changed using git diff or file hashing
- Version Bumping: Automatically increment semantic versions (major, minor, patch)
- Artifact Creation: Package skills into ZIP files with metadata and checksums
- Blob Storage Publishing: Upload artifacts to S3 (supports S3-compatible services)
- Registry Index Management: Maintain a crates.io-like registry for skill distribution
Change Detection Strategies
Git-based Detection
Use git diff to detect changed skill directories. Ideal for CI/CD pipelines:- Fast and efficient
- Works well in CI/CD environments
- Can compare any two git references (commits, tags, branches)
- GitHub Actions workflows
- GitLab CI pipelines
- Any git-based CI/CD system
Hash-based Detection
Use file hashing to detect changes. Better for local development:- Works without git repository
- Detects any file changes
- Maintains build cache for efficiency
- Local development workflows
- Non-git version control systems
- Incremental builds
Version Bumping Strategies
Explicit Bump Type
Specify the bump type explicitly:Auto-detect Bump Type
Let FastSkill determine the bump type (currently defaults to patch):Complete Workflow Examples
Local Development Workflow
GitHub Actions Workflow
Create.github/workflows/publish-skills.yml:
GitLab CI Workflow
Create.gitlab-ci.yml:
Jenkins Pipeline
CreateJenkinsfile:
Configuration Best Practices
Environment Variables
Store sensitive credentials as environment variables or secrets:Configuration Files
Use.fastskill/publish.toml for non-sensitive configuration:
Build Cache
The build cache (.fastskill/build-cache.json) should be:
- Included in CI/CD: Persist cache between builds for efficiency
- Version Controlled: Commit cache to track build history
- Regularly Cleaned: Remove old entries to prevent cache bloat
Troubleshooting
No Skills Detected
If no skills are detected for packaging:- Check that skills directory exists and contains
SKILL.mdfiles - Verify git diff is working:
git diff HEAD~1 HEAD --name-only - Check build cache for stale entries
- Use
--forceto package all skills regardless of changes
Version Bumping Issues
If version bumping fails:- Ensure
skill-project.tomlexists or can be created - Check that version format is valid semver (e.g., “1.2.3”)
- Verify write permissions for
skill-project.toml
Blob Storage Upload Failures
If uploads fail:- Verify credentials are correct
- Check network connectivity to storage endpoint
- Ensure bucket/container exists and is accessible
- Verify IAM permissions for S3 buckets
Registry Index Issues
If registry index operations fail:- Ensure git repository is accessible
- Check git credentials and permissions
- Verify registry path exists and is writable
- Ensure blob base URL is correct