Merge pull request #150 from zinzied/main - Enhanced User Experience
Features integrated: - Stars Feature: Community-driven skill discovery with upvotes - Auto-Update: Automatic skill updates via START_APP.bat (Git + PowerShell fallback) - Interactive Prompt Builder: Context-aware prompt construction - Date Tracking: Added date_added field to all skills - Auto-Categorization: Smart category assignment based on keywords - Enhanced UI: Risk level badges, date display, category stats Conflicts resolved: - START_APP.bat: Merged enhanced auto-update logic - README.md: Kept v6.4.1 with new feature documentation - Home.jsx: Combined fuzzy search + pagination + stars - SkillDetail.jsx: Merged syntax highlighting + stars + date badges All 950+ skills updated with date tracking and proper categorization. Made-with: Cursor
This commit is contained in:
@@ -56,6 +56,7 @@ def validate_skills(skills_dir, strict_mode=False):
|
||||
security_disclaimer_pattern = re.compile(r"AUTHORIZED USE ONLY", re.IGNORECASE)
|
||||
|
||||
valid_risk_levels = ["none", "safe", "critical", "offensive", "unknown"]
|
||||
date_pattern = re.compile(r'^\d{4}-\d{2}-\d{2}$') # YYYY-MM-DD format
|
||||
|
||||
for root, dirs, files in os.walk(skills_dir):
|
||||
# Skip .disabled or hidden directories
|
||||
@@ -110,6 +111,15 @@ def validate_skills(skills_dir, strict_mode=False):
|
||||
if strict_mode: errors.append(msg.replace("⚠️", "❌"))
|
||||
else: warnings.append(msg)
|
||||
|
||||
# Date Added Validation (optional field)
|
||||
if "date_added" in metadata:
|
||||
if not date_pattern.match(metadata["date_added"]):
|
||||
errors.append(f"❌ {rel_path}: Invalid 'date_added' format. Must be YYYY-MM-DD (e.g., '2024-01-15'), got '{metadata['date_added']}'")
|
||||
else:
|
||||
msg = f"ℹ️ {rel_path}: Missing 'date_added' field (optional, but recommended)"
|
||||
if strict_mode: warnings.append(msg)
|
||||
# In normal mode, we just silently skip this
|
||||
|
||||
# 3. Content Checks (Triggers)
|
||||
if not has_when_to_use_section(content):
|
||||
msg = f"⚠️ {rel_path}: Missing '## When to Use' section"
|
||||
|
||||
Reference in New Issue
Block a user