Skip to main content

Overview

The fastskill init command creates a skill-project.toml file for skill authors. This command extracts metadata from an existing SKILL.md file (if present) and interactively prompts for any missing information to create a properly configured skill project.
This command is for skill authors who want to create a new skill project. It generates the skill-project.toml manifest file that defines your skill’s metadata, dependencies, and configuration. For general FastSkill setup, see the Installation Guide.
Context Detection: fastskill init automatically detects whether you’re working in a skill directory or project root:
  • Skill-level: If run in a directory containing SKILL.md, creates skill-project.toml with [metadata] section (for skill authors)
  • Project-level: If run at project root, can create skill-project.toml with [dependencies] section (for skill consumers)
See Skill Commands for details on skill-level initialization.

What It Does

When you run fastskill init, it performs the following steps:
  1. Checks for Existing Files: Validates if skill-project.toml already exists
  2. Reads SKILL.md: Extracts metadata from frontmatter (name, description, version, etc.)
  3. Interactive Prompts: Asks for missing information or uses provided CLI arguments
  4. Creates skill-project.toml: Generates the manifest file with proper structure
  5. Validates Configuration: Ensures all required fields are present and valid

Usage

This will prompt you for each configuration option:

Non-Interactive Setup

Command Options

Note: The --embedding-model option is not yet available. To configure embedding model, edit the .fastskill/config.yaml file after initialization.

Files Created

.fastskill/config.yaml

Service-level configuration file with your embedding settings:
Note: Service-level configuration (embedding settings) is stored in .fastskill/config.yaml. Project-level configuration (skill dependencies and repositories) is stored in skill-project.toml at your project root.

.skills/ Directory Structure

Example Skill

Creates a basic skill at .skills/examples/hello-world/SKILL.md:

Configuration Options

Embedding Models

Skills Directory

  • Default: .skills (recommended)
  • Custom: Any directory path you specify
  • Existing: Will be created if it doesn’t exist

Environment Variables

OPENAI_API_KEY

The init command will use this environment variable if set:
If not set, you’ll be prompted to enter it interactively.

Troubleshooting

”API key should start with ‘sk-’”

Cause: The provided API key doesn’t match OpenAI’s format Solution: Check that you’re using a valid OpenAI API key

”API key appears to be too short”

Cause: The API key is incomplete Solution: Ensure you’re copying the complete API key from OpenAI

”FastSkill is already initialized”

Cause: Configuration files already exist Solution: Use --force to reinitialize, or remove existing files first

Permission Denied

Cause: Cannot write to the current directory Solution: Check file permissions or run in a directory where you have write access

Integration with CI/CD

For automated setups in CI/CD pipelines:

Best Practices

Project Structure

Keep FastSkill configuration at the project root:

API Key Management

  • Development: Use environment variables
  • Production: Use secure secret management
  • CI/CD: Store in encrypted secrets

Version Control

Consider what to commit:

Next Steps After Init

  1. Add Your Skills: Create skill directories under .skills/
  2. Index Skills: Run fastskill reindex to build the search index
  3. Test Search: Try fastskill search "your query"
  4. Integration: Connect to your AI agent or application
The init command gets you started quickly with a properly configured FastSkill environment. All the complexity of configuration files and directory structure is handled automatically.