foryourhealth111-pixel/Vibe-Skills / bundled/skills/digital-brain
digital-brain
VerifiedThis skill should be used when the user asks to "write a post", "check my voice", "look up contact", "prepare for meeting", "weekly review", "track goals", or mentions personal brand, content creation, network management, or voice consistency.
agents/scripts/weekly_review.py
View on GitHub#!/usr/bin/env python3
"""
Weekly Review Generator
Compiles data from Digital Brain into a weekly review document.
"""
import json
import os
from datetime import datetime, timedelta
from pathlib import Path
# Get the digital brain root (parent of agents/)
BRAIN_ROOT = Path(__file__).parent.parent.parent
def load_jsonl(filepath):
"""Load JSONL file, skipping schema lines."""
items = []
if not filepath.exists():
return items
with open(filepath, 'r') as f:
for line in f:
line = line.strip()
if not line:
continue
try:
data = json.loads(line)
# Skip schema definition lines
if '_schema' not in data:
items.append(data)
except json.JSONDecodeError:
continue
return items
def get_week_range():
"""Get the start and end of the current week."""
today = datetime.now()
start = today - timedelta(days=today.weekday())
end = start + timedelta(days=6)
return start.strftime('%Y-%m-%d'), end.strftime('%Y-%m-%d')
def analyze_content(week_start):
"""Analyze content published this week."""
posts = load_jsonl(BRAIN_ROOT / 'content' / 'posts.jsonl')
ideas = load_jsonl(BRAIN_ROOT / 'content' / 'ideas.jsonl')
week_posts = [p for p in posts if p.get('published', '') >= week_start]
new_ideas = [i for i in ideas if i.get('created', '') >= week_start]
return {
'posts_published': len(week_posts),
'new_ideas': len(new_ideas),
'posts': week_posts
}
def analyze_network(week_start):
"""Analyze network activity this week."""
interactions = load_jsonl(BRAIN_ROOT / 'network' / 'interactions.jsonl')
week_interactions = [i for i in interactions if i.get('date', '') >= week_start]
return {
'interactions': len(week_interactions),
'details': week_interactions
}
def analyze_metrics():
"""Get latest metrics if available."""
metrics = load_jsonl(BRAIN_ROOT / 'operations' / 'metrics.jsonl')
if metrics:
return metrics[-1] # Most recent
return {}
def generate_review():
"""Generate the weekly review output."""
week_start, week_end = get_week_range()
content = analyze_content(week_start)
network = analyze_network(week_start)
metrics = analyze_metrics()
review = f"""
# Weekly Review: {week_start} to {week_end}
Generated: {datetime.now().isoformat()}
## Summary
### Content
- Posts published: {content['posts_published']}
- New ideas captured: {content['new_ideas']}
### Network
- Interactions logged: {network['interactions']}
### Latest Metrics
"""
if metrics:
audience = metrics.get('audience', {})
for key, value in audience.items():
review += f"- {key}: {value}\n"
else:
review += "- No metrics recorded yet\n"
review += """
## Action Items
1. [ ] Review content performance
2. [ ] Plan next week's content
3. [ ] Follow up on pending introductions
4. [ ] Update goals progress
5. [ ] Schedule key meetings
## Notes
[Add your reflections here]
"""
return review
if __name__ == '__main__':
print(generate_review())
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |