forked from davila7/claude-code-templates
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgenerate_trending_data.py
More file actions
executable file
·776 lines (701 loc) · 28.9 KB
/
generate_trending_data.py
File metadata and controls
executable file
·776 lines (701 loc) · 28.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
#!/usr/bin/env python3
"""
Trending Data Generator Script
Fetches download data from Supabase and generates trending-data.json for the Claude Code Templates project.
"""
import json
import os
import requests
from datetime import datetime, timedelta, timezone
from collections import defaultdict, Counter
from dotenv import load_dotenv
# Load environment variables
load_dotenv()
def main():
"""Main function to generate trending data"""
print("🚀 Generating trending data from Supabase...")
# Get Supabase credentials
supabase_url = os.getenv("SUPABASE_URL")
supabase_api_key = os.getenv("SUPABASE_API_KEY")
if not supabase_url or not supabase_api_key:
print("❌ Error: Missing Supabase credentials in .env file")
return
try:
# Fetch all component downloads using REST API
print("📊 Fetching download data from Supabase...")
headers = {
'apikey': supabase_api_key,
'Authorization': f'Bearer {supabase_api_key}',
'Content-Type': 'application/json'
}
# Get total count first
count_url = f"{supabase_url}/rest/v1/component_downloads"
count_headers = {**headers, 'Prefer': 'count=exact'}
count_response = requests.head(count_url, headers=count_headers)
total_count = 0
if 'content-range' in count_response.headers:
total_count = int(count_response.headers['content-range'].split('/')[-1])
print(f"📊 Total records in database: {total_count}")
# Fetch all data using pagination to bypass 1000 record limit
all_downloads = []
page_size = 1000
offset = 0
while True:
# Add Range header to get specific page
paginated_headers = {
**headers,
'Range': f'{offset}-{offset + page_size - 1}'
}
# Order by created_at descending to get most recent records first
api_url = f"{supabase_url}/rest/v1/component_downloads?order=created_at.desc"
response = requests.get(api_url, headers=paginated_headers)
if response.status_code != 200 and response.status_code != 206:
print(f"❌ API Error: {response.status_code} - {response.text}")
break
page_data = response.json()
if not page_data:
break
all_downloads.extend(page_data)
print(f"📄 Fetched page {offset//page_size + 1}: {len(page_data)} records (Total: {len(all_downloads)})")
# Check if we got less than page_size, meaning we're done
if len(page_data) < page_size:
break
offset += page_size
# Safety break to prevent infinite loops - get all data for accurate totals
if len(all_downloads) >= 200000: # Increased to get all historical data
print("⚠️ Reached safety limit of 200,000 records")
break
if not all_downloads:
print("❌ No data fetched from Supabase")
print("📝 Generating fallback trending data...")
trending_data = generate_fallback_trending_data()
else:
print(f"✅ Successfully fetched {len(all_downloads)} total records")
# Process the real data
trending_data = process_downloads_data(all_downloads)
# Write to JSON file
output_file = "docs/trending-data.json"
with open(output_file, 'w', encoding='utf-8') as f:
json.dump(trending_data, f, indent=2, ensure_ascii=False)
print(f"✅ Successfully generated {output_file}")
print(f"📊 Statistics:")
for component_type, items in trending_data['trending'].items():
print(f" • {component_type}: {len(items)} items")
except Exception as e:
print(f"❌ Error: {str(e)}")
print("📝 Generating fallback trending data...")
trending_data = generate_fallback_trending_data()
# Write fallback data
output_file = "docs/trending-data.json"
with open(output_file, 'w', encoding='utf-8') as f:
json.dump(trending_data, f, indent=2, ensure_ascii=False)
print(f"✅ Generated fallback {output_file}")
def process_downloads_data(downloads):
"""Process raw download data and generate trending structure"""
# Calculate date ranges with timezone awareness
now = datetime.now(timezone.utc)
today_start = now.replace(hour=0, minute=0, second=0, microsecond=0)
week_start = today_start - timedelta(days=7)
month_start = today_start - timedelta(days=30)
# For charting - collect daily data for the last 30 days
chart_data = defaultdict(lambda: defaultdict(int)) # {date: {category: count}}
# Group downloads by component
component_stats = defaultdict(lambda: {
'total': 0,
'today': 0,
'week': 0,
'month': 0,
'component_type': '',
'category': '',
'name': ''
})
# Track unique countries
unique_countries = set()
# Track downloads by country
country_downloads = Counter()
# Debug: Show sample of downloads and date ranges
print(f"🔍 Processing {len(downloads)} downloads...")
print(f"📄 Sample download record: {downloads[0] if downloads else 'None'}")
print(f"📅 Date ranges being used:")
print(f" • now: {now}")
print(f" • today_start: {today_start}")
print(f" • week_start: {week_start}")
print(f" • month_start: {month_start}")
# Debug: Track downloads by period
today_count = 0
week_count = 0
month_count = 0
for download in downloads:
# Parse download timestamp with proper timezone handling
timestamp_str = download['download_timestamp']
if timestamp_str.endswith('Z'):
timestamp_str = timestamp_str.replace('Z', '+00:00')
elif '+' not in timestamp_str and '-' not in timestamp_str[-6:]:
# No timezone info, assume UTC
timestamp_str = timestamp_str + '+00:00'
try:
download_time = datetime.fromisoformat(timestamp_str)
# Convert to UTC if not already
if download_time.tzinfo is None:
download_time = download_time.replace(tzinfo=timezone.utc)
except:
# Fallback to current time if parsing fails
download_time = datetime.now(timezone.utc)
# Create key that matches generate_components_json.py structure
# The key should match format: component_type/category/name
category = download.get('category', 'general')
component_name = download['component_name']
component_type = download['component_type']
# Handle case where component_name already includes category (like "frontend/react-expert")
if '/' in component_name:
category = component_name.split('/')[0]
actual_name = component_name.split('/')[-1]
else:
actual_name = component_name
component_key = f"{component_type}-{actual_name}"
stats = component_stats[component_key]
# Set component info
stats['name'] = actual_name
stats['component_type'] = component_type
stats['category'] = category
# Count downloads by time period
stats['total'] += 1
# Track unique countries
country = download.get('country', 'Unknown')
if country and country != 'Unknown':
unique_countries.add(country)
country_downloads[country] += 1
if download_time >= today_start:
stats['today'] += 1
today_count += 1
if download_time >= week_start:
stats['week'] += 1
week_count += 1
if download_time >= month_start:
stats['month'] += 1
month_count += 1
# Collect daily data for chart (last 30 days only)
if download_time >= month_start:
download_date = download_time.strftime('%Y-%m-%d')
# Map component types to plural for consistency
type_mapping = {
'command': 'commands',
'agent': 'agents',
'setting': 'settings',
'hook': 'hooks',
'mcp': 'mcps',
'skill': 'skills',
'template': 'templates',
'plugin': 'plugins',
'sandbox': 'sandbox'
}
mapped_type = type_mapping.get(component_type, component_type + 's')
chart_data[download_date][mapped_type] += 1
# Debug: Print total counts by period
print(f"📊 Total downloads by period:")
print(f" • Today: {today_count}")
print(f" • Week: {week_count}")
print(f" • Month: {month_count}")
print(f" • Total processed: {len(downloads)}")
# Debug: Show oldest and newest records
if downloads:
print(f"📅 Date range in data:")
print(f" • Newest: {downloads[0]['download_timestamp']}")
print(f" • Oldest: {downloads[-1]['download_timestamp']}")
# Group by component type and create trending structure
trending_by_type = defaultdict(list)
for component_key, stats in component_stats.items():
component_type = stats['component_type']
trending_item = {
'id': component_key.lower().replace(' ', '-'),
'name': stats['name'],
'category': stats['category'],
'downloadsToday': stats['today'],
'downloadsWeek': stats['week'],
'downloadsMonth': stats['month'],
'downloadsTotal': stats['total']
}
trending_by_type[component_type].append(trending_item)
# Sort each type by weekly downloads (most trending)
for component_type in trending_by_type:
trending_by_type[component_type].sort(
key=lambda x: x['downloadsWeek'],
reverse=True
)
# Keep top 10 for each type
trending_by_type[component_type] = trending_by_type[component_type][:10]
# Process chart data for cumulative growth
chart_dates = []
chart_categories = ['commands', 'agents', 'settings', 'hooks', 'mcps', 'skills', 'templates']
chart_series = {category: [] for category in chart_categories}
# Generate the last 30 days
for i in range(29, -1, -1): # 29 days ago to today
date = (today_start - timedelta(days=i)).strftime('%Y-%m-%d')
chart_dates.append(date)
# Calculate cumulative data for each category
for category in chart_categories:
cumulative = 0
for date in chart_dates:
daily_count = chart_data.get(date, {}).get(category, 0)
cumulative += daily_count
chart_series[category].append(cumulative)
# Calculate global statistics from ALL components (before limiting to top 10)
total_components = len(component_stats)
total_all_downloads = sum(stats['total'] for stats in component_stats.values())
total_month_downloads = sum(stats['month'] for stats in component_stats.values())
total_week_downloads = sum(stats['week'] for stats in component_stats.values())
total_today_downloads = sum(stats['today'] for stats in component_stats.values())
print(f"📊 Global Statistics:")
print(f" • Total Components: {total_components}")
print(f" • Total Downloads: {total_all_downloads:,}")
print(f" • Monthly Downloads: {total_month_downloads:,}")
print(f" • Weekly Downloads: {total_week_downloads:,}")
print(f" • Today Downloads: {total_today_downloads:,}")
print(f" • Unique Countries: {len(unique_countries)}")
# Get top 5 countries by downloads
top_countries = country_downloads.most_common(5)
# Country code to name and flag mapping
country_info = {
'US': {'name': 'United States', 'flag': '🇺🇸'},
'GB': {'name': 'United Kingdom', 'flag': '🇬🇧'},
'IN': {'name': 'India', 'flag': '🇮🇳'},
'DE': {'name': 'Germany', 'flag': '🇩🇪'},
'CA': {'name': 'Canada', 'flag': '🇨🇦'},
'FR': {'name': 'France', 'flag': '🇫🇷'},
'AU': {'name': 'Australia', 'flag': '🇦🇺'},
'JP': {'name': 'Japan', 'flag': '🇯🇵'},
'BR': {'name': 'Brazil', 'flag': '🇧🇷'},
'ES': {'name': 'Spain', 'flag': '🇪🇸'},
'IT': {'name': 'Italy', 'flag': '🇮🇹'},
'NL': {'name': 'Netherlands', 'flag': '🇳🇱'},
'SE': {'name': 'Sweden', 'flag': '🇸🇪'},
'CH': {'name': 'Switzerland', 'flag': '🇨🇭'},
'PL': {'name': 'Poland', 'flag': '🇵🇱'},
'MX': {'name': 'Mexico', 'flag': '🇲🇽'},
'CN': {'name': 'China', 'flag': '🇨🇳'},
'KR': {'name': 'South Korea', 'flag': '🇰🇷'},
'SG': {'name': 'Singapore', 'flag': '🇸🇬'},
'IE': {'name': 'Ireland', 'flag': '🇮🇪'},
'NO': {'name': 'Norway', 'flag': '🇳🇴'},
'FI': {'name': 'Finland', 'flag': '🇫🇮'},
'DK': {'name': 'Denmark', 'flag': '🇩🇰'},
'BE': {'name': 'Belgium', 'flag': '🇧🇪'},
'AT': {'name': 'Austria', 'flag': '🇦🇹'},
'NZ': {'name': 'New Zealand', 'flag': '🇳🇿'},
'PT': {'name': 'Portugal', 'flag': '🇵🇹'},
'IL': {'name': 'Israel', 'flag': '🇮🇱'},
'AR': {'name': 'Argentina', 'flag': '🇦🇷'},
'CO': {'name': 'Colombia', 'flag': '🇨🇴'},
'CL': {'name': 'Chile', 'flag': '🇨🇱'},
'ZA': {'name': 'South Africa', 'flag': '🇿🇦'},
'RU': {'name': 'Russia', 'flag': '🇷🇺'},
'TR': {'name': 'Turkey', 'flag': '🇹🇷'},
'TH': {'name': 'Thailand', 'flag': '🇹🇭'},
'MY': {'name': 'Malaysia', 'flag': '🇲🇾'},
'ID': {'name': 'Indonesia', 'flag': '🇮🇩'},
'PH': {'name': 'Philippines', 'flag': '🇵🇭'},
'VN': {'name': 'Vietnam', 'flag': '🇻🇳'},
'PK': {'name': 'Pakistan', 'flag': '🇵🇰'},
'BD': {'name': 'Bangladesh', 'flag': '🇧🇩'},
'UA': {'name': 'Ukraine', 'flag': '🇺🇦'},
'RO': {'name': 'Romania', 'flag': '🇷🇴'},
'CZ': {'name': 'Czech Republic', 'flag': '🇨🇿'},
'GR': {'name': 'Greece', 'flag': '🇬🇷'},
'HU': {'name': 'Hungary', 'flag': '🇭🇺'}
}
# Format top countries data
top_countries_data = []
for country_code, downloads in top_countries:
country_data = country_info.get(country_code, {'name': country_code, 'flag': '🌍'})
percentage = (downloads / total_all_downloads * 100) if total_all_downloads > 0 else 0
top_countries_data.append({
'code': country_code,
'name': country_data['name'],
'flag': country_data['flag'],
'downloads': downloads,
'percentage': round(percentage, 1)
})
print(f"🌍 Top 5 Countries:")
for country in top_countries_data:
print(f" • {country['flag']} {country['name']}: {country['downloads']:,} ({country['percentage']}%)")
# Create final structure
trending_data = {
"lastUpdated": now.isoformat() + "Z",
"globalStats": {
"totalComponents": total_components,
"totalDownloads": total_all_downloads,
"monthlyDownloads": total_month_downloads,
"weeklyDownloads": total_week_downloads,
"todayDownloads": total_today_downloads,
"totalCountries": len(unique_countries)
},
"topCountries": top_countries_data,
"trending": {},
"chartData": {
"dates": chart_dates,
"series": chart_series
}
}
# Map component types to expected names
type_mapping = {
'command': 'commands',
'commands': 'commands',
'agent': 'agents',
'agents': 'agents',
'setting': 'settings',
'settings': 'settings',
'hook': 'hooks',
'hooks': 'hooks',
'mcp': 'mcps',
'mcps': 'mcps',
'skill': 'skills',
'skills': 'skills',
'template': 'templates',
'templates': 'templates',
'plugin': 'plugins',
'plugins': 'plugins',
'sandbox': 'sandbox'
}
# Debug: Print what component types we found
print(f"🔍 Component types found in data: {list(trending_by_type.keys())}")
# Populate trending data with real data or fallback
processed_types = set()
for db_type, json_type in type_mapping.items():
if json_type not in processed_types and db_type in trending_by_type:
trending_data['trending'][json_type] = trending_by_type[db_type]
processed_types.add(json_type)
print(f"✅ Using real data for {json_type}: {len(trending_by_type[db_type])} items")
# Add fallback data only for types that don't have real data
for json_type in ['commands', 'agents', 'settings', 'hooks', 'mcps', 'skills', 'templates']:
if json_type not in trending_data['trending']:
trending_data['trending'][json_type] = create_fallback_data(json_type)
print(f"⚠️ Using fallback data for {json_type}")
# Add "all" category with top 10 across all categories
all_items = []
for items in trending_by_type.values():
all_items.extend(items)
# Sort all items by weekly downloads and take top 10
all_items.sort(key=lambda x: x['downloadsWeek'], reverse=True)
trending_data['trending']['all'] = all_items[:10]
return trending_data
def create_fallback_data(component_type):
"""Create fallback data for component types with no real data"""
fallback_data = {
'commands': [
{
'id': 'react-component-generator',
'name': 'React Component Generator',
'category': 'frontend',
'downloadsToday': 45,
'downloadsWeek': 234,
'downloadsMonth': 567,
'downloadsTotal': 1248
},
{
'id': 'api-endpoint-generator',
'name': 'API Endpoint Generator',
'category': 'backend',
'downloadsToday': 32,
'downloadsWeek': 189,
'downloadsMonth': 445,
'downloadsTotal': 967
}
],
'agents': [
{
'id': 'react-expert',
'name': 'React Performance Expert',
'category': 'frontend',
'downloadsToday': 28,
'downloadsWeek': 156,
'downloadsMonth': 389,
'downloadsTotal': 834
},
{
'id': 'security-analyst',
'name': 'Security Code Analyst',
'category': 'security',
'downloadsToday': 35,
'downloadsWeek': 178,
'downloadsMonth': 423,
'downloadsTotal': 912
}
],
'settings': [
{
'id': 'vscode-theme',
'name': 'Optimized VSCode Settings',
'category': 'editor',
'downloadsToday': 67,
'downloadsWeek': 345,
'downloadsMonth': 892,
'downloadsTotal': 1876
}
],
'hooks': [
{
'id': 'pre-commit-tests',
'name': 'Pre-commit Test Runner',
'category': 'testing',
'downloadsToday': 23,
'downloadsWeek': 123,
'downloadsMonth': 298,
'downloadsTotal': 645
}
],
'mcps': [
{
'id': 'github-integration',
'name': 'GitHub API Integration',
'category': 'git',
'downloadsToday': 41,
'downloadsWeek': 198,
'downloadsMonth': 456,
'downloadsTotal': 1023
}
],
'templates': [
{
'id': 'nextjs-starter',
'name': 'Next.js Starter Template',
'category': 'frontend',
'downloadsToday': 52,
'downloadsWeek': 267,
'downloadsMonth': 634,
'downloadsTotal': 1387
}
],
'skills': [
{
'id': 'data-visualization',
'name': 'Data Visualization Expert',
'category': 'data-science',
'downloadsToday': 38,
'downloadsWeek': 201,
'downloadsMonth': 512,
'downloadsTotal': 1129
},
{
'id': 'api-documentation',
'name': 'API Documentation Generator',
'category': 'documentation',
'downloadsToday': 29,
'downloadsWeek': 167,
'downloadsMonth': 423,
'downloadsTotal': 934
}
]
}
return fallback_data.get(component_type, [])
def generate_fallback_trending_data():
"""Generate complete fallback trending data structure"""
return {
"lastUpdated": datetime.now().isoformat() + "Z",
"trending": {
"commands": [
{
'id': 'react-component-generator',
'name': 'React Component Generator',
'category': 'frontend',
'downloadsToday': 127,
'downloadsWeek': 892,
'downloadsMonth': 2847,
'downloadsTotal': 5634
},
{
'id': 'api-endpoint-generator',
'name': 'API Endpoint Generator',
'category': 'backend',
'downloadsToday': 74,
'downloadsWeek': 389,
'downloadsMonth': 1089,
'downloadsTotal': 2834
},
{
'id': 'database-migration-system',
'name': 'Database Migration System',
'category': 'database',
'downloadsToday': 45,
'downloadsWeek': 234,
'downloadsMonth': 567,
'downloadsTotal': 1432
},
{
'id': 'docker-setup-wizard',
'name': 'Docker Setup Wizard',
'category': 'devops',
'downloadsToday': 89,
'downloadsWeek': 445,
'downloadsMonth': 1234,
'downloadsTotal': 2967
},
{
'id': 'unit-test-generator',
'name': 'Unit Test Generator',
'category': 'testing',
'downloadsToday': 56,
'downloadsWeek': 298,
'downloadsMonth': 789,
'downloadsTotal': 1876
}
],
"agents": [
{
'id': 'react-expert',
'name': 'React Performance Expert',
'category': 'frontend',
'downloadsToday': 98,
'downloadsWeek': 567,
'downloadsMonth': 1456,
'downloadsTotal': 3245
},
{
'id': 'security-analyst',
'name': 'Security Code Analyst',
'category': 'security',
'downloadsToday': 112,
'downloadsWeek': 634,
'downloadsMonth': 1789,
'downloadsTotal': 4123
},
{
'id': 'api-architect',
'name': 'API Architecture Specialist',
'category': 'backend',
'downloadsToday': 67,
'downloadsWeek': 345,
'downloadsMonth': 923,
'downloadsTotal': 2456
},
{
'id': 'database-optimizer',
'name': 'Database Performance Optimizer',
'category': 'database',
'downloadsToday': 43,
'downloadsWeek': 198,
'downloadsMonth': 534,
'downloadsTotal': 1234
}
],
"settings": [
{
'id': 'vscode-theme',
'name': 'Optimized VSCode Settings',
'category': 'editor',
'downloadsToday': 234,
'downloadsWeek': 1234,
'downloadsMonth': 3456,
'downloadsTotal': 7891
},
{
'id': 'eslint-config',
'name': 'Strict ESLint Configuration',
'category': 'linting',
'downloadsToday': 156,
'downloadsWeek': 789,
'downloadsMonth': 2134,
'downloadsTotal': 4567
},
{
'id': 'prettier-setup',
'name': 'Team Prettier Standards',
'category': 'formatting',
'downloadsToday': 134,
'downloadsWeek': 678,
'downloadsMonth': 1876,
'downloadsTotal': 3892
}
],
"hooks": [
{
'id': 'pre-commit-tests',
'name': 'Pre-commit Test Runner',
'category': 'testing',
'downloadsToday': 87,
'downloadsWeek': 456,
'downloadsMonth': 1123,
'downloadsTotal': 2789
},
{
'id': 'code-formatter',
'name': 'Auto Code Formatter',
'category': 'formatting',
'downloadsToday': 76,
'downloadsWeek': 389,
'downloadsMonth': 934,
'downloadsTotal': 2134
}
],
"mcps": [
{
'id': 'github-integration',
'name': 'GitHub API Integration',
'category': 'git',
'downloadsToday': 145,
'downloadsWeek': 723,
'downloadsMonth': 1987,
'downloadsTotal': 4321
},
{
'id': 'slack-notifications',
'name': 'Slack Notification System',
'category': 'communication',
'downloadsToday': 98,
'downloadsWeek': 456,
'downloadsMonth': 1234,
'downloadsTotal': 2987
}
],
"templates": [
{
'id': 'nextjs-starter',
'name': 'Next.js Starter Template',
'category': 'frontend',
'downloadsToday': 189,
'downloadsWeek': 945,
'downloadsMonth': 2567,
'downloadsTotal': 5432
},
{
'id': 'express-api',
'name': 'Express API Template',
'category': 'backend',
'downloadsToday': 123,
'downloadsWeek': 612,
'downloadsMonth': 1678,
'downloadsTotal': 3456
}
],
"skills": [
{
'id': 'data-visualization',
'name': 'Data Visualization Expert',
'category': 'data-science',
'downloadsToday': 87,
'downloadsWeek': 478,
'downloadsMonth': 1289,
'downloadsTotal': 2834
},
{
'id': 'api-documentation',
'name': 'API Documentation Generator',
'category': 'documentation',
'downloadsToday': 64,
'downloadsWeek': 356,
'downloadsMonth': 923,
'downloadsTotal': 2145
},
{
'id': 'code-review',
'name': 'Intelligent Code Reviewer',
'category': 'quality-assurance',
'downloadsToday': 101,
'downloadsWeek': 534,
'downloadsMonth': 1456,
'downloadsTotal': 3127
}
]
}
}
if __name__ == "__main__":
main()