Skill: projectsnowwork/track (version 1.0.0)

--- name: track description: Habit, goal, and progress tracking system with visual progress and accountability. Use when user mentions tracking habits, goals, progress, streaks, or accountability. Tracks daily habits, monitors goal progress, maintains streaks, visualizes trends, and provides accountability reminders. Builds sustainable tracking systems that actually stick. --- # Track Progress tracking system. Build habits, achieve goals, see progress. ## Critical Privacy & Safety ### Data Storage (CRITICAL) - **All tracking data stored locally only**: `memory/track/` - **No external tracking apps** connected - **No data sharing** with fitness or productivity platforms - **Personal goals and habits** stay private - User controls all data retention and deletion ### Data Structure Tracking data stored locally: - `memory/track/habits.json` - Habit tracking data - `memory/track/goals.json` - Goal definitions and progress - `memory/track/streaks.json` - Streak records - `memory/track/metrics.json` - Key metrics over time ## Core Workflows ### Track Habit ``` User: "I meditated for 20 minutes today" → Use scripts/track_habit.py --habit "meditation" --value 20 --unit minutes → Log completion, update streak, show progress ``` ### Update Goal ``` User: "Update my savings goal progress" → Use scripts/update_goal.py --goal "emergency-fund" --current 5000 → Track progress, show percentage, estimate completion ``` ### View Trends ``` User: "Show my exercise trends this month" → Use scripts/view_trends.py --habit "exercise" --period month → Visualize patterns, identify trends, highlight improvements ``` ### Check Streaks ``` User: "What are my current streaks?" → Use scripts/check_streaks.py → Show active streaks, at-risk habits, milestone achievements ``` ## Module Reference - **Habit Tracking**: See [references/habits.md](references/habits.md) - **Goal Setting**: See [references/goals.md](references/goals.md) - **Progress Visualization**: See [references/visualization.md](references/visualization.md) - **Accountability Systems**: See [references/accountability.md](references/accountability.md) - **Streak Psychology**: See [references/streaks.md](references/streaks.md) ## Scripts Reference | Script | Purpose | |--------|---------| | `track_habit.py` | Log habit completion | | `update_goal.py` | Update goal progress | | `view_trends.py` | View progress trends | | `check_streaks.py` | Check current streaks | | `create_habit.py` | Create new habit tracker | | `set_goal.py` | Define new goal | | `export_data.py` | Export tracking data |

path: scripts/track_habit.py
content: #!/usr/bin/env python3
"""Track habit completion."""
import json
import os
import uuid
import argparse
from datetime import datetime

TRACK_DIR = os.path.expanduser("~/.openclaw/workspace/memory/track")

def ensure_dir():
    os.makedirs(TRACK_DIR, exist_ok=True)

def main():
    parser = argparse.ArgumentParser(description='Track habit')
    parser.add_argument('--habit', required=True, help='Habit name')
    parser.add_argument('--value', type=float, help='Tracked value')
    parser.add_argument('--unit', default='', help='Unit (minutes, count, etc)')
    
    args = parser.parse_args()
    
    entry_id = f"HABIT-{str(uuid.uuid4())[:6].upper()}"
    
    entry = {
        "id": entry_id,
        "habit": args.habit,
        "value": args.value,
        "unit": args.unit,
        "date": datetime.now().strftime('%Y-%m-%d'),
        "timestamp": datetime.now().isoformat()
    }
    
    habits_file = os.path.join(TRACK_DIR, "habits.json")
    data = {"entries": []}
    if os.path.exists(habits_file):
        with open(habits_file, 'r') as f:
            data = json.load(f)
    
    data['entries'].append(entry)
    
    ensure_dir()
    with open(habits_file, 'w') as f:
        json.dump(data, f, indent=2)
    
    print(f"✓ Habit tracked: {args.habit}")
    if args.value:
        print(f"  Value: {args.value} {args.unit}")
    print(f"  Date: {entry['date']}")

if __name__ == '__main__':
    main()


Security scan verdicts — ClawScan: clean | static analysis: clean | VirusTotal: clean | SkillSpector: suspicious (MEDIUM)