Creates timestamped configuration files for sports poetry multi-agent workflows...
Create timestamped configuration files for the sports poetry multi-agent workflow using interactive conversation and pre-built utility functions.
Use this skill when the user:
User: "Create a config for basketball, soccer, and tennis"
You: I'll create a configuration for you.
[Use skill_helpers.py utilities to create both files]
ā Created output/configs/config_20251115_120000.json
ā Created output/configs/generate_config_20251115_120000.py
Ready to run: python3 orchestrator.py --config output/configs/config_20251115_120000.json
This skill uses pre-built functions from skill_helpers.py. Import and USE these directly rather than reimplementing:
from skill_helpers import (
check_api_key, # Check env vars + .claude/claude.local.md
create_generator_script, # Generate executable Python script
get_setup_instructions # Get API key setup help
)
Key principle: Use these utilities to save tokens and ensure consistency. Don't reimplement their logic.
Collect sports (3-5 required)
config_builder.with_sports()Ask for generation mode (template or llm)
template (fast, no API key needed)Check API key (LLM mode only)
check_api_key(provider) from skill_helpersget_setup_instructions(provider) and offer to switch to template modeConfirm LLM settings (LLM mode only)
meta-llama/Llama-3.3-70B-Instruct-Turbo-Freemeta-llama/Meta-Llama-3-8B-InstructAsk about retry behavior (optional)
true (recommended)Show configuration summary
Create BOTH files (CRITICAL - see below)
output/configs/config_{timestamp}.jsonoutput/configs/generate_config_{timestamp}.pychmod +xEvery successful skill execution MUST create TWO files:
File 1: Configuration JSON
output/configs/config_{timestamp}.json
Created by: config_builder.save(config_path)
File 2: Generator Script
output/configs/generate_config_{timestamp}.py
Created by: create_generator_script() from skill_helpers
Made executable with: chmod +x
Failure to create BOTH files is incomplete execution of this skill.
The generator script provides:
This example shows both template mode (fast, no API key) and LLM mode (requires API key):
from skill_helpers import check_api_key, get_setup_instructions, create_generator_script
from config_builder import ConfigBuilder
from pathlib import Path
from datetime import datetime
import os, stat
# Configuration
sports_list = ["basketball", "soccer", "tennis"]
use_llm_mode = False # Set to True for LLM-generated poems
provider = "together"
model = "meta-llama/Llama-3.3-70B-Instruct-Turbo-Free"
# Initialize builder
builder = ConfigBuilder.load_default()
builder.with_sports(sports_list)
# Configure mode-specific settings
if use_llm_mode:
# Check for API key
api_key = check_api_key(provider)
if not api_key:
print(get_setup_instructions(provider))
print("\nFalling back to template mode...")
use_llm_mode = False
else:
builder.with_generation_mode("llm")
builder.with_llm_provider(provider)
builder.with_llm_model(model)
# Create timestamped config file
timestamp = datetime.now().strftime("%Y%m%d_%H%M%S")
config_path = Path(f"output/configs/config_{timestamp}.json")
config_path.parent.mkdir(parents=True, exist_ok=True)
builder.save(str(config_path))
# Create generator script (required for reproducibility)
mode = "llm" if use_llm_mode else "template"
script = create_generator_script(
sports=sports_list,
mode=mode,
provider=provider,
model=model,
retry=True,
timestamp=timestamp
)
script_path = Path(f"output/configs/generate_config_{timestamp}.py")
script_path.write_text(script)
os.chmod(script_path, os.stat(script_path).st_mode | stat.S_IEXEC)
print(f"ā Created {config_path}")
print(f"ā Created {script_path}")
print(f"\nNext: python3 orchestrator.py --config {config_path}")
config_builder.py handles all validation automatically:
with_sports()You don't need to duplicate validation logic. Just call the builder methods and let them validate.
Error message example:
ConfigValidationError: Must specify at least 3 sports (got 2)
These messages are already helpful - just pass them to the user.
When config_builder raises a sports count error, provide friendly suggestions:
You provided 2 sports, but we need 3-5.
Suggestions: tennis, volleyball, baseball, hockey, swimming
For LLM mode API key problems, use check_api_key(provider) and get_setup_instructions(provider) from skill_helpers (see Pattern 2 example), or offer to switch to template mode.
.claude/skills/create_config/
āāā SKILL.md # This file
āāā skill_helpers.py # Pre-built utility functions
After using this skill, verify:
ā Both files exist:
output/configs/config_{timestamp}.jsonoutput/configs/generate_config_{timestamp}.pyā Config is valid JSON with required fields
ā Generator script is executable:
ls -l output/configs/generate_config_*.py
# Should show -rwxr-xr-x (executable)
ā Generator script can be run:
./output/configs/generate_config_{timestamp}.py
# Should create new config with new timestamp
This skill has been validated across all Claude models:
All models successfully execute the skill with consistent behavior across template and LLM modes.
config_builder.py - Configuration builder with validationskill_helpers.py - Utility functions for this skill