Add /tasks skill for Google Tasks
- New gtasks skill with thin wrapper around morning-report collector - Register /tasks command with /todo, /todos aliases - Design doc at docs/plans/2026-01-05-gtasks-skill-design.md 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
30
skills/gtasks/scripts/list.py
Executable file
30
skills/gtasks/scripts/list.py
Executable file
@@ -0,0 +1,30 @@
|
||||
#!/usr/bin/env python3
|
||||
"""List Google Tasks - thin wrapper around morning-report collector."""
|
||||
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
# Import from morning-report collector
|
||||
sys.path.insert(0, str(Path.home() / ".claude/skills/morning-report/scripts/collectors"))
|
||||
|
||||
from gtasks import fetch_tasks, format_tasks
|
||||
|
||||
|
||||
def main():
|
||||
max_display = int(sys.argv[1]) if len(sys.argv) > 1 else 10
|
||||
tasks = fetch_tasks(max_results=max_display + 5)
|
||||
|
||||
if not tasks:
|
||||
print("No pending tasks.")
|
||||
return
|
||||
|
||||
# Check for error response
|
||||
if len(tasks) == 1 and "error" in tasks[0]:
|
||||
print(f"Error: {tasks[0]['error']}")
|
||||
return
|
||||
|
||||
print(format_tasks(tasks, max_display))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user