publish Command
Publish skill packages to a registry API or local folder. This command supports API-based publishing with authentication and local folder publishing for development/testing.Usage
Options
| Option | Description | Default |
|---|---|---|
| Option | Description | Default |
| -------- | ------------- | --------- |
--artifacts <PATH> | Package file or directory containing ZIP artifacts | ./artifacts |
--target <TARGET> | API URL (e.g., https://registry.example.com) or local folder path | FASTSKILL_API_URL or http://localhost:8080 |
--wait | Wait for validation to complete | true |
--no-wait | Don’t wait for validation (overrides —wait) | false |
--max-wait <SECONDS> | Maximum wait time in seconds | 300 |
fastskill auth login. The server extracts scope from your JWT token - you don’t need to specify it manually.
Examples
Publish to Registry API
Publish packages to a registry API (default mode):Publish Single Package File
Publish a single ZIP file:Publish to Local Folder
Publish packages to a local folder (for testing):Wait for Validation
By default, the command waits for validation to complete. To skip waiting:Authentication
Getting a JWT Token
For local development, generate a token from the registry API:token field that you can use with --token or FASTSKILL_API_TOKEN.
Required Permissions
- REGISTRY_PUBLISH: Manager or Admin role required
- REGISTRY_PUBLISH_STATUS: User role or higher required
Scope Handling and Authentication Flow
The publish command handles scope management automatically through JWT token authentication. Here’s how it works:Authentication Flow
- Login: Use
fastskill auth loginto authenticate with the registry - Token Storage: JWT token is stored in your local config (
.fastskill/config.yaml) - Scope Extraction: Server extracts scope from JWT token’s
claims.subfield - Automatic ID Construction: Final skill ID is
{scope}/{package-name}
Scope Determination Logic
The server automatically determines scope from your authenticated user account:- Organization users:
"org/user"→ scope ="org" - Individual users:
"user"→ scope ="user" - Multi-level organizations:
"company/team/user"→ scope ="company"
Package Name Requirements
The package name comes from yourSKILL.md frontmatter and must:
- Be lowercase only
- Contain no uppercase letters
- Be unique within the scope
- Follow URL-safe naming conventions
Complete Authentication Workflow
Scope Override Scenarios
For Organizations:- All team members publishing to the same scope
- Consistent skill naming across the organization
- Centralized skill governance
- Personal skill development and sharing
- Testing and prototyping
- Private skill collections
- Package names must be unique within each scope
- Different organizations can have same package names
- Cross-scope skill discovery works automatically
Troubleshooting Scope Issues
“Insufficient permissions for scope”- Verify your JWT token includes the correct scope
- Check that your account has publish permissions for the target scope
- Choose a different package name
- Coordinate with your team for naming conventions
- Check existing skills in your scope with
fastskill registry list-skills --scope your-scope
- Scopes cannot start with dots or underscores
- Use only lowercase letters, numbers, hyphens, and underscores
Package Naming Guidelines
When choosing a name for your package, choose a name that:- Is unique: Package names must be unique within each scope
- Is descriptive: Choose names that clearly describe what the package does
- Meets FastSkill policy guidelines: Do not give your package an offensive name, and do not use someone else’s trademarked name or violate trademark policy
- Does not contain uppercase letters: Package names must be lowercase only
Scope Naming
Scopes follow the same rules as package names:- URL-safe characters: Scopes can contain lowercase letters, numbers, hyphens (
-), and underscores (_) - No leading dots or underscores: Scopes cannot start with a dot (
.) or underscore (_) - Grouping mechanism: Scopes are a way of grouping related packages together
- Format: When used in package names, scopes are preceded by an
@symbol and followed by a slash:@<scope>/somepackagename
@acme/web-scraper- Packageweb-scraperin theacmescope@personal-tools/json-utils- Packagejson-utilsin thepersonal-toolsscope
Target Detection
The command auto-detects the target type:- URL: If
--targetis a valid URL (e.g.,https://registry.example.com), uses API mode - Local Path: If
--targetis a local path (e.g.,./local-registry), uses file copy mode
--target is not specified, the command uses:
FASTSKILL_API_URLenvironment variable- Defaults to
http://localhost:8080
Artifacts Parameter
The--artifacts parameter accepts:
- Single ZIP file: Path to a single package file
- Directory: Path to a directory containing ZIP files (all ZIP files will be published)
API Mode Workflow
When publishing to an API:- Upload: Package is uploaded via multipart form data
- Staging: Package is stored in staging area with metadata
- Validation: Package is queued for validation (async)
- Status: Use
--waitto wait for validation or check status via API
Checking Publish Status
status: Current status (pending,validating,accepted,rejected)publishedToBlobStorage: Whether package was published to S3 (only foracceptedstatus)publishedToRegistryIndex: Whether package was added to registry index (only foracceptedstatus)blobStorageUrl: URL to the published package in blob storage (if published)message: Descriptive message about the current status
Local Folder Mode
When publishing to a local folder:- Packages are copied directly to the target directory
- No validation is performed
- Useful for local development and testing
- Target directory is created if it doesn’t exist
Environment Variables
| Variable | Description | Default |
|---|---|---|
FASTSKILL_API_URL | Registry API base URL | http://localhost:8080 |
fastskill auth login and stored in the config file. You don’t need to set FASTSKILL_API_TOKEN manually.
Output
API Mode
Example output when publishing to API:--wait (default):
--no-wait:
Local Folder Mode
Example output when publishing to local folder:CI/CD Integration
GitHub Actions
GitLab CI
Error Handling
Common errors and solutions:- “No authentication token found”: Run
fastskill auth loginto authenticate - “Insufficient permissions”: Ensure your token has Manager or Admin role
- “Package was rejected”: Check validation errors in the status response
- “Timeout waiting for package validation”: The command will show the current status and continue. Increase
--max-waitif you need more time, or check the validation queue