List all configured event sources (Instagram, Facebook, web aggregators)
This skill inherits all available tools. When active, it can use any tool Claude has access to.
<essential_principles>
All sources are stored in ~/.config/local-media-tools/sources.yaml.
| Type | Filter Keyword | Description |
|---|---|---|
instagram, ig | @handle accounts | |
facebook, fb | Pages, groups, and locations | |
| Web | web | Event aggregator websites |
Sources are displayed in grouped tables with relevant metadata for each type. </essential_principles>
<intake> What sources do you want to list?Options:
all or blank - Show all configured sourcesinstagram - Only Instagram accountsfacebook - Only Facebook pages, groups, locationsweb - Only web aggregatorsProvide filter (or press Enter for all): </intake>
<process> ## Step 1: Parse FilterCheck if user provided a filter keyword:
filter_input = user_input.strip().lower()
# Normalize filter aliases
filter_map = {
"": "all",
"all": "all",
"instagram": "instagram",
"ig": "instagram",
"facebook": "facebook",
"fb": "facebook",
"web": "web",
}
selected_filter = filter_map.get(filter_input, "all")
from pathlib import Path
import yaml
config_path = Path.home() / ".config" / "local-media-tools" / "sources.yaml"
if not config_path.exists():
print("ERROR: sources.yaml not found. Run /newsletter-events:setup first.")
# STOP HERE
with open(config_path) as f:
config = yaml.safe_load(f)
sources = config.get("sources", {})
instagram_accounts = sources.get("instagram", {}).get("accounts", [])
facebook_pages = sources.get("facebook", {}).get("pages", [])
facebook_groups = sources.get("facebook", {}).get("groups", [])
facebook_locations = sources.get("facebook", {}).get("locations", [])
web_sources = sources.get("web_aggregators", {}).get("sources", [])
total_sources = (
len(instagram_accounts) +
len(facebook_pages) +
len(facebook_groups) +
len(facebook_locations) +
len(web_sources)
)
if total_sources == 0:
print("No sources configured.")
print("")
print("To add sources: /newsletter-events:add-source @handle")
# STOP HERE
Display each category with appropriate columns:
Instagram Accounts:
| Handle | Name | Type | Location |
|---|---|---|---|
| @localvenue | Local Venue | music_venue | Kingston, NY |
| @themusicbar | The Music Bar | bar | - |
Facebook Pages:
| URL | Name |
|---|---|
| facebook.com/thevenue/events | The Venue |
Facebook Groups:
| URL | Name |
|---|---|
| facebook.com/groups/localmusic | Local Music |
Facebook Locations:
| Location ID | Name | Filter | Max Events |
|---|---|---|---|
| 123456 | Kingston, NY | THIS_WEEK | 100 |
Web Aggregators:
| URL | Name | Type | Max Pages |
|---|---|---|---|
| https://hvmag.com/events | HV Magazine | listing | 50 |
Total: N sources configured
- Instagram: X accounts
- Facebook: Y pages, Z groups, W locations
- Web: V aggregators
To add sources: /newsletter-events:add-source @handle
To remove sources: /newsletter-events:remove-source @handle
If a filter was applied but that category is empty:
No instagram sources found.
You have:
- 3 Facebook pages
- 1 web aggregator
To add Instagram accounts: /newsletter-events:add-source @handle
</process>
<success_criteria>