spotify-skill
Copilot instructions17 starsChanged 13 months agoApache-2.0View on GitHub
This project is an example of Claude Desktop Skills - specifically demonstrating how to create production-ready skills that extend Claude's capabilities. The Spotify API Skill serves as a comprehensive reference implementation for building API integration skills. This is a Complete Skill Development Toolkit that includes: Skills are modular, self-contained packages that extend Claude's capabilities by providing: Official Documentation: For up-to-date information on creating custom skills, see:
- Reads credentials
In this repositoryOne other file it gives its agents.
- spotify-apiSkill
The file
Show its rules and text
We split this copilot-instructions.md into the rules it gives an agent
56 rules. About 0 are common, 44 are distinctive, and 12 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈44
Distinctive · estimate
This author's own choices. Worth a look.
12
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 64
Single Source of Truth: - No duplicated information across files
- Distinctive: line 135
Document sizes and purposes
- Distinctive: line 157
Single Source of Truth: No duplication
- Distinctive: line 188
Document constraints (rate limits, auth, environment)
- Distinctive: line 303
Guide/ folder is the curriculum: Treat it as authoritative documentation
- Distinctive: line 312
Start with clear YAML frontmatter (name, description)
- Distinctive: line 316
Keep under 5,000 words (~500 lines)
- Distinctive: line 317
Use concise code examples over verbose explanations
- Distinctive: line 323
Write long prose when code examples suffice
- Very specific: line 460
Update SKILL.md: if APIs change
- Distinctive: line 461
Regenerate .skill package: if distributing
- Very specific: line 465
Follow the 6-Step Process from SKILL_CREATION_GUIDE.md:
- Very specific: line 469
Structure: Create SKILL.md outline
- Distinctive: line 470
Implement: Write scripts and references
- Very specific: line 474
Use SKILL_CREATION_WORKBOOK.md for step-by-step planning.
- Very specific: line 587
Structure: Create folder with SKILL.md
- Distinctive: line 588
Implement: Add scripts/references as needed
- Very specific: line 594
User-facing changes: Update SKILL.md first
- Very specific: line 595
API changes: Update references/api_reference.md
- Very specific: line 596
Setup changes: Update references/authentication_guide.md
- Very specific: line 597
New features: Add to SKILL.md workflows, update README
- Distinctive: line 605
App Registration: Create app at developer.spotify.com/dashboard
- Distinctive: line 642
Ensure you're running from correct directory
- Distinctive: line 643
Add scripts folder to Python path
- Distinctive: line 647
Verify credentials from Spotify dashboard
- Distinctive: line 648
Check environment variables are set
- Very specific: line 652
Call refresh_access_token() with refresh token
- Distinctive: line 659
Use batch operations (up to 100 items)
- Distinctive: line 729
Use Spotify skill as concrete API integration example
- Distinctive: line 742
Use Spotify as API integration template
- Distinctive: line 751
Update both implementation and documentation
- Distinctive: line 752
Keep Guide/ and examples/ content in sync
- Distinctive: line 803
Lesson: Always verify all required API scopes before implementing features
- Distinctive: line 833
Must repackage skill WITHOUT credentials before GitHub release
- Very specific: line 835
Best Practice: Document credential setup steps in QUICK_START.md and authentication_guide.md
- Distinctive: line 892
When adding major features, integrate as tools within existing skill rather than creating separate skills
- Distinctive: line 897
Create execution guides specifically for AI systems
- Distinctive: line 900
Document edge cases and error recovery strategies
- Distinctive: line 903
Test features with actual use cases (e.g., long playlist titles)
- Distinctive: line 905
Document lessons learned in troubleshooting guides
- Distinctive: line 908
Always review package contents before distribution
- Distinctive: line 909
Never include credentials, tokens, or personal data
- Distinctive: line 910
Document credential setup process clearly
- Very specific: line 911
Use .gitignore and validation checks
- Distinctive: line 996
Keep Spotify API scope list updated as API evolves
- Distinctive: line 998
Update LLM guide as Claude's capabilities evolve
- Distinctive: line 1102
Use it effectively rather than trying to replace it
- Distinctive: line 1116
When space is limited, prioritize:
- Distinctive: line 1126
Never confuse these boundaries
- Distinctive: line 1127
Document explicitly in multiple places
- Distinctive: line 1179
Don't try to replace what already works
- Distinctive: line 1184
Don't defend the system, redesign it
- Distinctive: line 1193
A: Search first (genre/mood) → get audio features → filter in Python (125-130 BPM example)
- Distinctive: line 1219
Search query templates for common use cases
- Distinctive: line 1232
When working with this project:
- Distinctive: line 1242
Recent Focus (October 2025): Search-driven workflow optimization demonstrating the principle of trusting platform intelligence over custom …
≈ “Common” is an estimate: at least 1 in 5 of the 1,644 Copilot instructions files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Copilot Instructions - Spotify Skill Project
Project Overview
This project is an example of Claude Desktop Skills - specifically demonstrating how to create production-ready skills that extend Claude's capabilities. The Spotify API Skill serves as a comprehensive reference implementation for building API integration skills.
What This Project Is
- Primary Purpose: Educational example and template for creating Claude Desktop Skills
- Secondary Purpose: Production-ready Spotify API integration skill
- Audience: Developers learning to create custom Claude skills
- Status: Complete, production-ready, fully documented
Project Type
This is a Complete Skill Development Toolkit that includes:
- A complete working skill (Spotify API integration)
- Automated development tools (init, validate, package) - NEW!
- Official specifications (Agent Skills Spec v1.0) - NEW!
- Comprehensive guides for creating any type of skill
- Interactive workbooks and templates
- Advanced patterns and examples
- Best practices and troubleshooting
What Are Claude Desktop Skills?
Definition
Skills are modular, self-contained packages that extend Claude's capabilities by providing:
- Specialized workflows for specific domains
- Tool integrations (APIs, file formats, services)
- Domain expertise and procedural knowledge
- Bundled resources (scripts, references, assets)
Official Documentation: For up-to-date information on creating custom skills, see:
Skill Architecture
skill-name/
├── SKILL.md # Required: Main documentation with YAML frontmatter
├── scripts/ # Optional: Executable Python/JS code
│ ├── main_script.py
│ └── helper_script.py
├── references/ # Optional: Reference documentation
│ ├── api_reference.md
│ └── authentication_guide.md
└── assets/ # Optional: Templates, images, etc.
└── template.docxCore Principles of Skill Creation
- Concise is Key - Context window is shared; only include what Claude doesn't know
- Set Appropriate Degrees of Freedom - Match specificity to task complexity
- Progressive Disclosure - Load content as needed (metadata → SKILL.md → resources)
- Single Source of Truth - No duplicated information across files
Project Structure
Main Components
Spotify-Skill/
├── README.md # Main repository documentation
├── SPOTIFY_SKILL_README.md # Complete project overview
├── USER_GUIDE.md # Complete usage guide
├── QUICK_START.md # 5-minute setup guide
├── agent_skills_spec.md # Official Agent Skills Spec v1.0
├── spotify-api.skill # Packaged skill (git ignored)
│
├── .github/ # Repository assets
│ ├── copilot-instructions.md # AI assistant instructions
│ ├── banner-dark.svg # Dark theme banner
│ └── banner-light.svg # Light theme banner
│
├── tools/ # Skill development utilities
│ ├── init_skill.py # Create new skills from template
│ ├── validate_skill.py # Validate skill structure
│ ├── package_skill.py # Package skills for distribution
│ └── README.md # Tool documentation
│
├── examples/ # Curated skill examples
│ ├── README.md # Pattern comparison and selection guide
│ └── EXAMPLES_REFERENCE.md # Detailed analysis of 6 example patterns
│
├── spotify-api/ # Skill source files
│ ├── SKILL.md # Main skill documentation (REQUIRED)
│ ├── .env # Spotify credentials (git ignored)
│ ├── scripts/
│ │ ├── spotify_client.py # Core API wrapper (40+ methods)
│ │ └── playlist_creator.py # High-level playlist utilities
│ └── references/
│ ├── api_reference.md # Spotify API reference
│ └── authentication_guide.md # OAuth 2.0 setup
│
└── Guide/ # Skill creation education
├── 00_START_HERE.md # Entry point for learning
├── INDEX.md # Navigation guide
├── SKILL_CREATION_GUIDE.md # Complete skill creation guide
├── SKILL_CREATION_WORKBOOK.md # Interactive planning templates
├── ADVANCED_SKILL_EXAMPLES.md # Patterns and examples
└── SPOTIFY_CREDENTIALS_SETUP.md # Credential setup guideGuide Folder Knowledge
The Guide/ folder contains the complete educational curriculum for skill creation:
1. Navigation Documents
00_START_HERE.md - Primary entry point
- Explains what's in the package
- Provides learning paths based on goals
- Recommends reading order
- Estimated time commitments
INDEX.md - Comprehensive navigation
- Quick reference table for all documents
- Goal-based navigation ("I want to...")
- Learning paths (Beginner → Intermediate → Advanced)
- Document sizes and purposes
2. Core Educational Content
SKILL_CREATION_GUIDE.md (~15 KB, 1116 lines) - THE MAIN GUIDE
Complete education on skill creation including:
Section 1: What Are Skills?
- Definition and purpose
- Types of skills (API, document processing, code generation, etc.)
- What skills provide vs. what Claude already knows
Section 2: Core Principles (CRITICAL)
- Concise is Key - Challenge every sentence, share context window
- Set Appropriate Degrees of Freedom:
- High freedom: Text-based guidance (blog posts, creative work)
- Medium freedom: Pseudocode with parameters (data processing)
- Low freedom: Exact scripts (fragile operations)
- Context Window Efficiency: Progressive disclosure (metadata → SKILL.md → resources)
- Single Source of Truth: No duplication
Section 3: Skill Architecture
- Directory structure requirements
- SKILL.md with YAML frontmatter (required)
- Scripts folder (optional, for reusable code)
- References folder (optional, for detailed docs)
- Assets folder (optional, for templates/images)
Section 4: 6-Step Creation Process
- Define scope and purpose
- Identify required resources
- Create SKILL.md structure
- Implement scripts/resources
- Package the skill
- Test and iterate
Section 5-10: Planning, implementation, best practices, real examples, patterns, troubleshooting
3. Interactive Planning
SKILL_CREATION_WORKBOOK.md (~12 KB, 709 lines)
Fill-in-the-blank templates for planning YOUR skill:
Phase 1: Discovery
- Define the problem and solution
- Identify use cases (triggers, goals, requirements)
- Document constraints (rate limits, auth, environment)
Phase 2: Planning
- Resource inventory (scripts, docs, assets)
- Feature matrix (scope, complexity, priority)
- Documentation structure outline
- Decision trees for common choices
Phase 3-7: Development checklist, validation, packaging, testing
4. Advanced Patterns
ADVANCED_SKILL_EXAMPLES.md (~18 KB, 872 lines)
Five complete skill patterns with code:
API Wrapper Skills (like Spotify)
- Client class pattern
- Token management
- Error handling and retries
- Rate limiting awareness
Document Processing Skills
- Template-based generation
- Asset management
- Format conversion
Multi-Domain Skills
- Organizing complex capabilities
- Cross-referencing sections
- Navigation strategies
Code Generation Skills
- Boilerplate and scaffolding
- Parameter substitution
- Framework-specific patterns
Learning/Reference Skills
- Structured educational content
- Progressive curriculum design
- Interactive elements
Each example includes:
- Complete directory structure
- SKILL.md template
- Script patterns
- Best practices
- Common pitfalls
The Spotify Skill Example
What It Does
A production-ready skill that enables Claude to:
- Create intelligent playlists (5 methods):
- By artist/band name
- By theme/mood keywords
- By lyrical content
- From specific song lists
- From AI recommendations
- Manage playlists (CRUD operations)
- Search music (tracks, artists, albums, playlists)
- Control playback (play, pause, skip, volume, shuffle)
- Access user data (profile, top items, listening history)
Technical Implementation
spotify_client.py (570 lines, 20 KB)
- 40+ methods covering Spotify Web API
- OAuth 2.0 authentication with auto-refresh
- Comprehensive error handling
- Rate limiting awareness
- Token lifecycle management
playlist_creator.py (332 lines, 12 KB)
- High-level intelligent playlist creation
- Deduplication and batch processing
- Five creation strategies
- Analytics and statistics
SKILL.md (240 lines, 7 KB)
- YAML frontmatter with name and description
- Quick start examples
- Four complete workflows
- References to detailed guides
References/ (31 KB total)
authentication_guide.md- Complete OAuth setup (10 KB)api_reference.md- Endpoints and error handling (9 KB)
Key Patterns Demonstrated
- Progressive Disclosure: Metadata → Quick start → Deep documentation
- Single Source of Truth: API details in reference, not duplicated
- Appropriate Freedom: High-level methods (medium freedom) + exact scripts (low freedom)
- Context Efficiency: Concise SKILL.md, detailed references on-demand
Key Learnings for AI Assistants
When Working on This Project
- This is an educational project: The primary goal is teaching skill creation, not just building a Spotify integration
- The Spotify skill is the example: It demonstrates best practices, not an end in itself
- Guide/ folder is the curriculum: Treat it as authoritative documentation
- Patterns are transferable: The Spotify patterns apply to ANY API integration skill
Skill Creation Best Practices (from Guide)
Writing SKILL.md
✅ DO:
- Start with clear YAML frontmatter (name, description)
- Provide immediate quick start code
- Show 3-5 common workflows with examples
- Link to detailed references, don't duplicate
- Keep under 5,000 words (~500 lines)
- Use concise code examples over verbose explanations
❌ DON'T:
- Explain what Claude already knows
- Duplicate information across files
- Write long prose when code examples suffice
- Include every edge case in main doc
- Exceed context window budget
Scripts Strategy
Include scripts when:
- Code is written repeatedly (boilerplate elimination)
- Operations are fragile or must be consistent
- Performance matters (avoid re-generation)
- Complex multi-step procedures
Keep as instructions when:
- Multiple valid approaches exist
- Customization is expected
- Code is simple/obvious
- Token cost > benefit
Resource Organization
SKILL.md (Essential)
├─ Quick overview and navigation
├─ Common patterns (3-5 examples)
└─ Links to deeper resources
scripts/ (Reusable code)
├─ Main client/wrapper
└─ Utility functions
references/ (Detailed docs)
├─ API reference (load on-demand)
└─ Setup/configuration guides
assets/ (Templates/images)
└─ Output templates, logos, etc.Common Skill Types
From ADVANCED_SKILL_EXAMPLES.md:
- API Wrapper Skills (Spotify example) - External service integration
- Document Processing - DOCX, PDF, XLSX manipulation
- Code Generation - Framework boilerplate and scaffolding
- Business Logic - Company processes and workflows
- Data Analysis - Database schemas and query templates
- Specialized Tools - Domain-specific utilities
- Brand Guidelines - Templates and style standards
- Learning Materials - Educational content and tutorials
Development Tools (NEW!)
The project includes automated utilities from the Anthropic Skills repository for skill development:
Available Tools
tools/init_skill.py- Skill Initializer- Creates new skill directories with proper structure
- Generates SKILL.md with YAML frontmatter template
- Creates example scripts/, references/, assets/ directories
- Provides TODO markers and guidance comments
- Usage:
python tools/init_skill.py <skill-name> --path <output-path>
tools/validate_skill.py- Skill Validator- Validates SKILL.md format and content
- Checks YAML frontmatter (name, description required)
- Verifies naming conventions (hyphen-case)
- Ensures skill name matches directory name
- Detects incomplete TODO placeholders
- Usage:
python tools/validate_skill.py <skill-directory>
tools/package_skill.py- Skill Packager- Creates distributable .zip packages
- Automatically validates before packaging
- Excludes system files and cache directories
- Maintains proper directory structure
- Usage:
python tools/package_skill.py <skill-directory> [output-dir]
Tool Usage Workflow
# 1. Create a new skill
python tools/init_skill.py my-new-skill --path ./
# 2. Edit the generated SKILL.md and add your code
# (Replace TODOs, add scripts, references, assets)
# 3. Validate before distribution
python tools/validate_skill.py ./my-new-skill
# 4. Package for sharing
python tools/package_skill.py ./my-new-skill ./distIntegration Details
- Source: Anthropic Claude Skills repository (skill-creator skill)
- License: Apache 2.0
- Documentation: See
tools/README.mdfor complete guide - Integration Summary: See
INTEGRATION_SUMMARY.mdfor full details - Official Spec: See
agent_skills_spec.mdfor format requirements
Development Workflow
Using the Development Tools
Create New Skills:
python tools/init_skill.py my-api-skill --path ./
# Edit generated files, then validate and packageValidate Existing Skills:
python tools/validate_skill.py ./spotify-apiPackage for Distribution:
python tools/package_skill.py ./spotify-api ./distFor Modifying the Spotify Skill
- Edit source files in
spotify-api/folder - Test scripts directly with Python
- Update SKILL.md if APIs change
- Regenerate .skill package if distributing
For Creating New Skills
Follow the 6-Step Process from SKILL_CREATION_GUIDE.md:
- Define: Scope, purpose, use cases
- Identify: Required resources (scripts, docs, assets)
- Structure: Create SKILL.md outline
- Implement: Write scripts and references
- Package: Bundle into .skill file
- Test: Validate with real use cases
Use SKILL_CREATION_WORKBOOK.md for step-by-step planning.
For Helping Users Learn
Beginner Path (2-3 hours):
- Read
SKILL_CREATION_GUIDE.mdsections 1-3 - Review
SPOTIFY_SKILL_README.md - Skim
ADVANCED_SKILL_EXAMPLES.md(Example 1)
Intermediate Path (4-6 hours):
- Complete full
SKILL_CREATION_GUIDE.md - Study
ADVANCED_SKILL_EXAMPLES.mdpatterns - Work through
SKILL_CREATION_WORKBOOK.md
Advanced Path (2-3 hours):
- Deep dive into specific patterns
- Study error handling strategies
- Implement complex multi-domain skills
Technology Stack
Spotify Skill Implementation
- Language: Python 3.x
- API: Spotify Web API (REST)
- Authentication: OAuth 2.0 Authorization Code Flow
- Dependencies:
requests(HTTP),base64,json - Key Libraries: None (pure Python + requests)
Skill Format
- Package Format: ZIP archive with
.skillextension - Required File:
SKILL.mdwith YAML frontmatter - Optional Folders:
scripts/,references/,assets/ - Encoding: UTF-8 text files
File Relationships
Documentation Hierarchy
Entry Points:
├─ README.md ──→ "Repository landing page"
├─ SPOTIFY_SKILL_README.md ──→ "Complete project overview"
├─ USER_GUIDE.md ──→ "Complete usage guide"
├─ QUICK_START.md ──→ "5-minute setup"
├─ Guide/00_START_HERE.md ──→ "New to skills? Start here"
└─ Guide/INDEX.md ──→ "Need navigation? Go here"
Main Educational Content:
├─ Guide/SKILL_CREATION_GUIDE.md ──→ Complete textbook
├─ Guide/SKILL_CREATION_WORKBOOK.md ──→ Interactive planning
└─ Guide/ADVANCED_SKILL_EXAMPLES.md ──→ Pattern library
Example Skills:
├─ examples/README.md ──→ Pattern comparison and selection
└─ examples/EXAMPLES_REFERENCE.md ──→ Detailed analysis of 6 patterns
Spotify Skill Documentation:
├─ spotify-api/SKILL.md ──→ Main skill doc (loaded by Claude)
├─ spotify-api/references/authentication_guide.md ──→ OAuth setup
└─ spotify-api/references/api_reference.md ──→ API detailsCode Relationships
spotify_client.py (Base client)
├─ Handles authentication
├─ Provides 40+ API methods
├─ Token management
└─ Error handling
playlist_creator.py (High-level utilities)
├─ Uses spotify_client.py
├─ Implements 5 creation strategies
└─ Adds convenience features
SKILL.md (Orchestration)
├─ References both scripts
├─ Shows usage patterns
└─ Links to detailed guidesCommon Tasks
Testing the Spotify Skill Locally
# Set environment variables
$env:SPOTIFY_CLIENT_ID = "your_client_id"
$env:SPOTIFY_CLIENT_SECRET = "your_client_secret"
$env:SPOTIFY_REDIRECT_URI = "http://localhost:8888/callback"
# Run OAuth flow (one-time setup)
python spotify-api/scripts/spotify_client.py
# Test playlist creation
python -c "from playlist_creator import PlaylistCreator; from spotify_client import SpotifyClient; ..."Creating a New Skill (Quick Reference)
- Plan: Fill out
SKILL_CREATION_WORKBOOK.mdPhase 1-2 - Structure: Create folder with
SKILL.md - Implement: Add scripts/references as needed
- Test: Validate use cases
- Package: ZIP with
.skillextension
Updating Documentation
- User-facing changes: Update
SKILL.mdfirst - API changes: Update
references/api_reference.md - Setup changes: Update
references/authentication_guide.md - New features: Add to
SKILL.mdworkflows, update README
Authentication & Security Notes
Spotify OAuth 2.0 Flow
- App Registration: Create app at developer.spotify.com/dashboard
- Authorization: User visits authorization URL, grants permissions
- Token Exchange: Exchange auth code for access + refresh tokens
- Token Refresh: Access tokens expire in 1 hour, refresh automatically
- Storage: Store refresh token securely (environment variables recommended)
Required Scopes
playlist-modify-public # Create/edit public playlists
playlist-modify-private # Create/edit private playlists
user-library-read # Access saved tracks
user-library-modify # Save/remove tracks
user-read-private # Read user profile
user-read-email # Read user email
user-top-read # Read top artists/tracks
user-read-currently-playing # Read current playback
user-modify-playback-state # Control playback
user-read-playback-state # Read playback stateSecurity Best Practices
- ✅ Store credentials in environment variables
- ✅ Use HTTPS redirect URIs in production
- ✅ Never commit tokens to version control
- ✅ Implement token refresh before expiry
- ✅ Handle authorization errors gracefully
Troubleshooting
Common Issues
"No module named 'spotify_client'"
- Ensure you're running from correct directory
- Add scripts folder to Python path
"Invalid client_id/client_secret"
- Verify credentials from Spotify dashboard
- Check environment variables are set
"Token expired"
- Call
refresh_access_token()with refresh token - Implement automatic refresh in long-running processes
"Rate limit exceeded"
- Implement exponential backoff
- Reduce request frequency
- Use batch operations (up to 100 items)
Learning Path Issues
"Don't know where to start"
→ Read Guide/00_START_HERE.md, follow your goal's path
"Overwhelmed by content"
→ Start with SKILL_CREATION_GUIDE.md sections 1-3 only
"Need a specific pattern"
→ Search ADVANCED_SKILL_EXAMPLES.md for your skill type
Additional Context
Official Documentation
For the most current and official guidance on creating Claude Desktop Skills, always refer to:
- Official Guide: https://support.claude.com/en/articles/12512198-how-to-create-custom-skills
- Official Examples Repository: https://github.com/anthropics/skills
This project's Guide folder provides in-depth educational content that complements the official documentation with detailed patterns, examples, and best practices.
Project History
This project serves as:
- Reference implementation of skill creation best practices
- Educational resource for developers learning skill creation
- Production example showing real-world complexity
- Template for API integration skills
Design Decisions
Why Spotify?
- Popular, well-documented API
- Complex enough to demonstrate real patterns
- Simple enough to remain understandable
- Multiple interaction styles (search, CRUD, playback)
Why This Structure?
- Separates learning (Guide/) from implementation (spotify-api/)
- Demonstrates progressive disclosure
- Shows single source of truth
- Balances completeness with conciseness
Why Include Full Guides?
- Makes project self-contained
- Provides context for design decisions
- Enables learning without external resources
- Documents the "why" behind patterns
When Assisting Users
If They Want to Learn Skill Creation:
- Direct them to the official Claude documentation for current specifications
- Point them to the official skills examples repository for more examples
- Direct them to
examples/for curated example patterns - Guide them to
Guide/00_START_HERE.mdfor in-depth learning - Recommend the appropriate learning path based on experience
- Reference specific sections from
SKILL_CREATION_GUIDE.md - Use Spotify skill as concrete API integration example
If They Want to Use the Spotify Skill:
- Direct them to
QUICK_START.md - Help with OAuth setup from
authentication_guide.md - Show examples from
SKILL.md - Reference API details from
api_reference.md
If They Want to Create Similar Skills:
- Help them choose a pattern from
examples/README.md - Study detailed analysis in
examples/EXAMPLES_REFERENCE.md - Use Spotify as API integration template
- Apply patterns from
ADVANCED_SKILL_EXAMPLES.md - Work through
SKILL_CREATION_WORKBOOK.md - Reference core principles from
SKILL_CREATION_GUIDE.md
If They Want to Modify This Project:
- Understand the educational purpose
- Maintain the skill creation patterns
- Update both implementation and documentation
- Keep Guide/ and examples/ content in sync
Recent Development History & Lessons Learned
Version 0.9.0 Development Journey
This section documents key learnings from the v0.9.0 development cycle, including feature development, packaging considerations, and release preparation.
Cover Art Generation Feature (Major Addition)
Development Context:
- Added comprehensive cover art generation capability to the Spotify skill
- Integrated as a tool within the main skill (not a separate skill)
- Required new dependencies:
cairosvgandPillow
Key Technical Learnings:
- Text Wrapping for Long Titles
- Challenge: Long playlist titles (e.g., "My Ultimate Workout Power Hour") were being cut off or squished
- Solution: Implemented automatic text wrapping at word boundaries with max 20 characters per line
- Implementation:
def wrap_text(text, max_chars=20): words = text.split() lines = [] current_line = [] current_length = 0 for word in words: if current_length + len(word) + len(current_line) > max_chars: if current_line: lines.append(' '.join(current_line)) current_line = [word] current_length = len(word) else: current_line.append(word) current_length += len(word) if current_line: lines.append(' '.join(current_line)) return lines - Typography Specs: Font sizes 60-96px, line height 110%, text width 80% of canvas
- Missing Spotify Scope Discovery
- Issue: 401 Unauthorized errors when uploading cover art
- Root Cause: Missing
ugc-image-uploadscope in OAuth token - Fix Required: Users must re-run
get_refresh_token.pyto get new token with proper scopes - Documentation Updated:
authentication_guide.md,COVER_ART_LLM_GUIDE.md, andCOVER_ART_TROUBLESHOOTING.md - Lesson: Always verify all required API scopes before implementing features
- Comprehensive LLM Execution Guide
- Purpose: Enable Claude to generate cover art despite not having native image generation capabilities
- Created:
COVER_ART_LLM_GUIDE.md(835 lines) - Key Sections:
- Step-by-step execution process
- Handling vague user requests
- 20+ themes, 15+ genres, 10+ artist moods
- Edge case handling (long titles, special characters)
- Accessibility considerations (WCAG 2.1 AA compliance)
- Quality assurance checklists
- Lesson: Detailed execution guides are critical for complex multi-step AI operations
- Design Specifications Evolution
- Initial: Basic text rendering
- Enhanced: Larger typography (60-96px), 80% width text, proper spacing
- Final: Multi-line text wrapping, dynamic font scaling, theme variety
- Lesson: Iterative design improvements based on real-world testing
Repository Health & Best Practices
Packaging & Distribution Considerations:
- Credentials in Package Files
- Critical Issue:
.envfile with user credentials accidentally included inspotify-api.skillpackage - Security Risk: Personal OAuth tokens and client secrets would be distributed publicly
- Solution:
.envfiles already in.gitignore(lines 2-4).skillpackages already in.gitignore(line 64)- Must repackage skill WITHOUT credentials before GitHub release
- Lesson: NEVER include credentials in packaged distributions
- Best Practice: Document credential setup steps in
QUICK_START.mdandauthentication_guide.md
- Critical Issue:
- Repository Visibility & Health
- Initial State: Repository was private, missing key community files
- Actions Taken:
- Made repository public via
gh repo edit - Added Apache 2.0 LICENSE
- Created CONTRIBUTING.md with guidelines
- Added issue templates (bug_report.yml, feature_request.yml)
- Enabled GitHub Discussions
- Added 12 relevant topics/tags
- Made repository public via
- Result: Professional, discoverable, community-ready repository
- Lesson: Repository health matters for open source adoption
- Professional Branding
- Challenge: Project needed a clear, professional name
- Analysis: Considered "Spotify Claude Skill", "Claude Spotify Integration", etc.
- Decision: "Spotify Skills for Claude"
- Clear it's for Claude Desktop
- "Skills" plural reflects both the Spotify skill AND the toolkit
- Professional and searchable
- Works well in all contexts
- Updated: SVG banners, all documentation, repository description
- Lesson: Project naming impacts discoverability and perception
Release Preparation Best Practices
v0.9.0 Release Checklist:
- Version Documentation
- ✅ Added
version: 0.9.0toSKILL.mdYAML frontmatter - ✅ Created
CHANGELOG.mdfollowing Keep a Changelog format - ✅ Created comprehensive
RELEASE_NOTES.md(1,500+ lines) - ✅ Updated all badges in README with v0.9.0
- ✅ Added release links to documentation
- ✅ Added
- Documentation Consistency
- ✅ Unified project name across all files
- ✅ Fixed broken emojis (� → 🎨, 🎵)
- ✅ Updated feature lists with cover art capabilities
- ✅ Cross-referenced new documentation files
- Package Validation
- ✅ Ran
python tools/validate_skill.py ./spotify-api - ✅ All validation checks passed
- ⚠️ Must repackage WITHOUT .env before release
- ✅ Package size: ~50KB (without credentials)
- ✅ Ran
- Git Hygiene
- ✅ All changes committed with descriptive messages
- ✅ Clean working directory
- ✅ All commits pushed to GitHub
- ✅ Ready for tag creation:
git tag -a v0.9.0 -m "Release v0.9.0"
Key Development Patterns Discovered
1. Feature Integration Strategy
- When adding major features, integrate as tools within existing skill rather than creating separate skills
- Maintain single cohesive package for related functionality
- Example: Cover art generation integrated into spotify-api skill, not separate spotify-cover-art skill
2. LLM-Friendly Documentation
- Create execution guides specifically for AI systems
- Include step-by-step processes, not just reference information
- Provide concrete examples for vague user requests
- Document edge cases and error recovery strategies
3. Iterative Design with Real Testing
- Test features with actual use cases (e.g., long playlist titles)
- Iterate based on real-world failures
- Document lessons learned in troubleshooting guides
4. Security-First Packaging
- Always review package contents before distribution
- Never include credentials, tokens, or personal data
- Document credential setup process clearly
- Use
.gitignoreand validation checks
5. Professional Open Source Standards
- LICENSE file (Apache 2.0 for compatibility)
- CONTRIBUTING.md with clear guidelines
- Issue templates for consistent reporting
- CHANGELOG.md for version history
- Comprehensive README with badges
- GitHub Discussions for community
Common Pitfalls to Avoid
- Including Credentials in Packages
- ❌ Don't package
.envfiles with OAuth tokens - ❌ Don't commit credentials to git
- ✅ Document setup process instead
- ✅ Use environment variables
- ❌ Don't package
- Incomplete OAuth Scopes
- ❌ Don't assume basic scopes are sufficient
- ✅ Test all features to identify required scopes
- ✅ Document all scopes in authentication guide
- ✅ Provide clear error messages for missing scopes
- Text Rendering Without Wrapping
- ❌ Don't assume titles will fit on one line
- ✅ Implement automatic text wrapping
- ✅ Test with real-world long titles
- ✅ Use word boundary breaks, not character breaks
- Publishing Without Health Checks
- ❌ Don't release without LICENSE
- ❌ Don't skip validation checks
- ✅ Run repository health assessment (
gh repo view) - ✅ Add all necessary community files
- Inconsistent Documentation
- ❌ Don't update one file and forget others
- ✅ Search for all occurrences when changing names
- ✅ Update banners, badges, and metadata
- ✅ Cross-reference new features across docs
Files Created/Modified in v0.9.0
New Core Files:
spotify-api/scripts/cover_art_generator.py(565 lines) - SVG generation with text wrappingspotify-api/references/COVER_ART_LLM_GUIDE.md(835 lines) - AI execution guidespotify-api/COVER_ART_TROUBLESHOOTING.md- 401 error solutionsspotify-api/requirements.txt- Added cairosvg, pillow dependencies
New Repository Health Files:
LICENSE- Apache 2.0 full textCONTRIBUTING.md- Contribution guidelinesCHANGELOG.md- Version historyRELEASE_NOTES.md- Comprehensive v0.9.0 documentation.github/ISSUE_TEMPLATE/bug_report.yml- Bug reporting template.github/ISSUE_TEMPLATE/feature_request.yml- Feature request template.github/ISSUE_TEMPLATE/config.yml- Issue template configuration
Updated Files:
README.md- Rebranded, v0.9.0 badges, cover art featuresUSER_GUIDE.md- Cover art generation sectionGETTING_STARTED.md- Updated branding and examplesspotify-api/SKILL.md- Version 0.9.0, fixed emojis, cover art workflowsspotify-api/references/authentication_guide.md- Added ugc-image-upload scope.github/banner-dark.svg- Updated project name.github/banner-light.svg- Updated project nameget_refresh_token.py- Added ugc-image-upload scope
Package Status:
spotify-api.skill- 51.5KB with credentials (DO NOT DISTRIBUTE)- Need to repackage without
.envbefore GitHub release - Target size: ~50KB without credentials
Technical Debt & Future Considerations
For v1.0.0:
- Automated credential validation tool
- Cover art template library expansion
- Batch playlist operations
- Performance optimizations for large libraries
- Additional example skills in different domains
- Video tutorial for skill creation
Maintenance Notes:
- Keep Spotify API scope list updated as API evolves
- Monitor Python dependency versions (cairosvg, Pillow)
- Update LLM guide as Claude's capabilities evolve
- Track community feedback via GitHub Discussions
Post-v0.9.0: Search-Driven Optimization (October 2025)
This section documents the transformation from complex manual curation to search-driven workflows, along with comprehensive search feature documentation.
Core Transformation: From Manual to Search-Driven
User Pain Point: "The workflow still is painful with too many interactions"
Response: Complete paradigm shift in playlist creation philosophy.
Before (Complex Manual Curation):
- Two-mode system (Search-Based vs Curated)
- Track-by-track selection with reasoning
- Emotional narrative journey planning
- 20+ API calls per playlist
- 2-3 minutes per playlist
- Philosophy: "Be smart about music curation"
After (Search-Driven Approach):
- Single search-driven workflow
- 3-5 focused searches → combine results → batch add
- Trust Spotify's algorithm (billions of data points)
- 5-7 API calls per playlist
- 10-15 seconds per playlist
- Philosophy: "Trust Spotify's search - it's better than you think"
Impact:
- 4x fewer interactions (20+ → 5-7 API calls)
- 12x faster execution (2-3 minutes → 10-15 seconds)
- Equal or better quality (leverages Spotify's proven algorithm)
Key Insight:
"Sometimes the most sophisticated solution is to trust the platform's intelligence rather than over-engineer our own."
Search Feature Documentation Completeness
Discovery: Documentation drift had removed important capabilities. Only 4 operators documented when 8+ were available.
Comprehensive Documentation Added:
Field Filters (8 total):
artist:name- Specific artistalbum:name- Specific albumtrack:name- Specific track titlegenre:genre- Genre filteryear:YYYYoryear:YYYY-YYYY- Release year/rangetag:new- Recent releasestag:hipster- Less mainstream tracksisrc:code,upc:code- Catalog codes
Operators (3 types):
-termorNOT term- Exclude resultsterm1 OR term2- Either termterm1 term2- Both terms (AND implicit)
Audio Features (11 available):
tempo- BPM (50-200)energy- 0.0-1.0 (calm to energetic)danceability- 0.0-1.0valence- 0.0-1.0 (sad to happy)acousticness- 0.0-1.0instrumentalness- 0.0-1.0speechiness- 0.0-1.0liveness- 0.0-1.0loudness- dB (-60 to 0)key- 0-11 (musical key)mode- 0 (minor) or 1 (major)
The Two-Step Tempo/BPM Filtering Pattern
Discovery: Spotify doesn't support direct BPM filtering in search queries.
Solution Pattern:
Step 1: Search (broad net)
- Use genre/mood keywords
- Example: "running electronic energy" (limit=20)
Step 2: Filter (precise net)
- Get audio features for results (getMultipleAudioFeatures, max 100)
- Filter in Python by tempo, energy, danceability, etc.
- Example: 125 <= tempo <= 130 and energy > 0.7Why It Works:
- Search: Excellent semantic matching and relevance
- Audio Features: Precise numerical data
- Python: Complex filtering logic
- Combined power > either alone
Real-World Examples:
- Running playlist: "running electronic" → filter 125-130 BPM + high energy
- Happy upbeat: "dance party" → filter 140 BPM + high valence
- Chill focus: "ambient study" → filter 90-100 BPM + high instrumentalness
Key Learnings from Optimization Session
1. Trust Platform Intelligence
- Spotify's search represents years of refinement and billions of user interactions
- Use it effectively rather than trying to replace it
- Multiple focused searches provide natural variety
2. Documentation Drift Prevention
- Regular audits of documentation against actual API capabilities
- As we optimize/condense, capabilities can be accidentally removed
- Validate completeness periodically
3. Concrete Examples Beat Abstract Capabilities
- "125-130 BPM running playlist" > "you can filter by tempo"
- Specific numbers and real use cases stick in memory
- Provide actionable examples with expected results
4. Character Budget Management
- When space is limited, prioritize:
- Examples over explanations
- "How" over "why"
- Action over description
- Specifics over generalities
- Result: 6857/8000 chars in INSTRUCTIONS.md (14% headroom)
5. Clear API + Code Interpreter Separation
- GPT makes API calls (has OAuth tokens)
- Python processes results (complex logic, no auth)
- Never confuse these boundaries
- Document explicitly in multiple places
6. Progressive Disclosure Architecture
- INSTRUCTIONS.md: Quick reference (6857 chars)
- PLAYLIST_CURATION_STRATEGIES.md: Detailed workflows
- CODE_INTERPRETER_REFERENCE.md: Complete code samples
- Each level serves different needs without overwhelming
Files Modified in Optimization Session
Updated Files (3 total):
CustomGPT/spotify-playlist-action.json- Added comprehensive search operator documentation to OpenAPI specCustomGPT/INSTRUCTIONS.md- Expanded Discovery Methods, added tempo filtering workflow (6857 chars)CustomGPT/PLAYLIST_CURATION_STRATEGIES.md- Added "Advanced Search Filters" and "Tempo/BPM Filtering" sections with examples
New Documentation:
SESSION_LEARNINGS.md- Comprehensive reflection on search-driven transformation (246 lines)
Commit History Pattern:
Optimize → Fix → Clarify → Simplify → Educate → Transform → Complete8 Commits Total:
- 5a9b052 - Optimize INSTRUCTIONS.md (7940→4139 chars)
- 2b9f71f - Add re-authorization commands
- 7aaa8fd - Document audio features 403 errors
- 50d6c26 - Remove cover art upload API (simplify)
- fa3f17c - Clarify Python/API separation
- 653adf2 - Fix OpenAPI description lengths
- 9a542fb - Refine curation to search-driven (major shift)
- cf8f350 - Add comprehensive search filters
- 896a282 - Add SESSION_LEARNINGS.md
Design Patterns Validated
1. Search-First Workflow
1. Create playlist (save playlist_id)
2. Make 3-5 focused searches with operators
- "workout genre:electronic year:2020s -remix"
- "gym motivation pop"
- "running upbeat 2020s"
3. Optional: Get audio features → filter by tempo/energy
4. Combine results, deduplicate
5. Batch add (max 100 per request)
6. Done in 10-15 seconds2. API Integration Essence
- Know what the platform does well (search, recommendations)
- Know what you do well (combining results, filtering, user context)
- Don't try to replace what already works
- Focus on the gaps and the glue
3. User Pain Points as Gold
- "Too many interactions" → Complete workflow redesign
- Don't defend the system, redesign it
- User complaints show where friction exists
Memory Anchors for AI Assistants
Q: How should playlists be created? A: Make 3-5 focused searches with smart operators → combine results → batch add → done in seconds
Q: How to filter by tempo/BPM? A: Search first (genre/mood) → get audio features → filter in Python (125-130 BPM example)
Q: What can Spotify search do? A: 8 field filters + 3 operators + 11 audio features, all documented with examples
Q: Why search-driven vs manual curation? A: Spotify's algorithm has billions of data points. Trust it. Use it well. 4x fewer interactions, 12x faster.
Anti-Patterns Avoided
❌ Building complex manual curation when excellent search already exists
❌ Trying to outsmart Spotify's billion-data-point algorithm
❌ Documentation without examples (abstract capabilities don't stick)
❌ Assuming completeness without API audits (documentation drift)
❌ Mixing API and processing concerns (GPT auth vs Python logic)
Future Monitoring
Watch For:
- New Spotify search operators or audio features
- User feedback on search quality vs manual curation
- Edge cases where search-driven approach struggles
- Character budget in INSTRUCTIONS.md (currently 14% headroom)
- Documentation drift (schedule regular API audits)
Potential Enhancements:
- Search query templates for common use cases
- Audio feature presets (high energy = energy > 0.7, danceability > 0.6)
- Smart search combinations (automatic keyword variation)
- Performance metrics tracking (actual interaction counts)
Summary for AI Assistants
This project is a teaching tool first, Spotify integration second.
The Spotify API Skill is the flagship example demonstrating how to create professional Claude Desktop Skills. The Guide/ folder contains a complete curriculum teaching skill creation principles, patterns, and best practices.
When working with this project:
- Respect the educational purpose - changes should maintain instructional value
- Follow the documented patterns - they're intentional teaching examples
- Reference the guides - they contain the "why" behind decisions
- Maintain consistency - between implementation and documentation
- Think transferability - patterns should work for other skill types
The goal is helping developers create their own high-quality skills using this as a reference.
Recent Focus (October 2025): Search-driven workflow optimization demonstrating the principle of trusting platform intelligence over custom complexity.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

