# Import Track

Moves track markdown files to the correct album location.

- Repository: https://github.com/bitwize-music-studio/claude-ai-music-skills (615 stars)
- Category: Engineering
- License: CC0-1.0
- Last updated: 2026-10-28
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add bitwize-music-studio/claude-ai-music-skills --skill import-track -g -a claude-code -y`
Codex: `npx skills add bitwize-music-studio/claude-ai-music-skills --skill import-track -g -a codex -y`
Cursor: `npx skills add bitwize-music-studio/claude-ai-music-skills --skill import-track -g -a cursor -y`
Gemini CLI: `npx skills add bitwize-music-studio/claude-ai-music-skills --skill import-track -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add bitwize-music-studio/claude-ai-music-skills`

## Description

Moves track markdown files to the correct album location. Use when the user has track files in Downloads or other locations that need to be placed in an album.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

## Your Task

**Input**: $ARGUMENTS

Import a track markdown file (.md) to the correct album location based on config.

---

# Import Track Skill

You move track markdown files to the correct location in the user's content directory.

## Step 1: Parse Arguments

Expected format: `<file-path> <album-name> [track-number]`

Examples:
- `~/Downloads/track.md sample-album 03`
- `~/Downloads/t-day-beach.md sample-album 03`
- `~/Downloads/03-t-day-beach.md sample-album` (number already in filename)

If arguments are missing, ask:
```
Usage: /import-track <file-path> <album-name> [track-number]

Example: /import-track ~/Downloads/track.md sample-album 03
```

## Step 2: Find Album and Resolve Path via MCP

1. Call `find_album(album_name)`, fuzzy match by name, slug, or partial. Returns album metadata including genre.
2. Call `resolve_path("tracks", album_slug)`, returns the full tracks directory path

If album not found, MCP returns available albums:
```
Error: Album "{album-name}" not found.

Available albums:
[list from MCP response]

Create album first with: /new-album {album-name} <genre>
```

## Step 4: Construct Target Path

The target path is **ALWAYS**:

```
{content_root}/artists/{artist}/albums/{genre}/{album}/tracks/{XX}-{track-name}.md
```

Example with:
- `content_root: ~/bitwize-music`
- `artist: bitwize`
- `genre: electronic` (found from album location)
- `album: sample-album`
- `track-number: 03`
- `track-name: t-day-beach`

Result:
```
~/bitwize-music/artists/bitwize/albums/electronic/sample-album/tracks/03-t-day-beach.md
```

**Track numbering**:
- If track number provided, use it (zero-padded: `03`)
- If filename already has number prefix (e.g., `03-name.md`), preserve it
- If neither, ask user for track number

## Step 5: Move File

```bash
mv "{source_file}" "{target_path}"
```

## Step 6: Confirm

Report:
```
Moved: {source_file}
   To: {target_path}
```

## Error Handling

**Source file doesn't exist:**
```
Error: File not found: {source_file}
```

The rest: https://github.com/bitwize-music-studio/claude-ai-music-skills/blob/HEAD/skills/import-track/SKILL.md
