360 Secure SkillHub
360 安全技能中心

Andrew Google Tasks

封装 Google Tasks API 的 Python 脚本,使用 OAuth 2.0 认证,可列出任务、创建待办、修改内容与截止时间、标记完成、删除任务,并复用 google-calendar、google-sheets 的共享凭据文件。需自行准备 OAuth 客户端凭据,首次运行需浏览器授权。

ibluewind
ibluewind
热度 40.48
最近更新 2026-05-11 17:46:05
分类:自动化依赖:代码执行 / 第三方 API / 读写文件应用场景:任务管理 / 日程安排

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add andrew-google-tasks
Metadata
name
andrew-google-tasks
description
Google Tasks API ì°ëì¼ë¡ ìì (Task) ê´ë¦¬. OAuth 2.0 ì¸ì¦ ì¬ì©. ì¬ì©ìì í  ì¼ ëª©ë¡ì ì¡°í, ìì±, ìì , ìë£ ì²ë¦¬í  ë ì¬ì©.

Google Tasks

Overview

Google Tasks API 를 íµí´ ì¬ì©ìì í  ì¼ (Tasks) ì ì¡°í, ìì±, ìì , ìë£ ì²ë¦¬í  ì ìë ì¤í¬ìëë¤. OAuth 2.0 ì¸ì¦ì ì¬ì©íì¬ ìì íê² Tasks ì ì ê·¼í©ëë¤.

Setup

1. OAuth í´ë¼ì´ì¸í¸ í¤ ì¤ì 

ì´ë¯¸ êµ¬ê¸ ìºë¦°ë, ìí¸ ì¤í¬ê³¼ ëì¼í í¤ íì¼ì ì¬ì©í©ëë¤:

# í¤ íì¼ì´ ì´ë¯¸ ì¤ë¹ëì´ ìë¤ë©´ ìëµ
ls ~/.google-credentials.json

2. ìì¡´ì± ì¤ì¹

pip install google-api-python-client google-auth-httplib2 google-auth-oauthlib

3. ì¸ì¦ íì¤í¸

cd /Users/andrew/.openclaw/workspace/google-tasks
python3 scripts/tasks_ops.py

첫 ì¤íì ë¸ë¼ì°ì ê° ì´ë¦¬ê³  Google ê³ì ì¼ë¡ ë¡ê·¸ì¸ í ê¶íì ë¶ì¬í´ì¼ í©ëë¤.

Capabilities

ìì ëª©ë¡ ì¡°í

ì¬ì©ìì ìì ëª©ë¡ íì¸:

"ë´ í  ì¼ ëª©ë¡ ë³´ì¬ì¤"
"íì¬ ì§í ì¤ì¸ ìì ëë ìì´?"

ì ìì ìì±

ì í  ì¼ ì¶ê°:

"ë´ì¼ 미í ì¤ë¹í  ì¼ ì¶ê°í´ì¤, ë§ê°ì ë´ì¼ ì¤í 2 ì"
"íë¡ì í¸ ë³´ê³ ì를 ìì±í´ì¼ í´, ë©ëª¨: 5 íì´ì§ ë¶ë"

ìì ìë£ ì²ë¦¬

ìì ìë£:

"ë´ì¼ 미í ì¤ë¹ ìë£ë¡ íìí´ì¤"

ìì ìì 

ìì ë´ì© ë³ê²½:

"íë¡ì í¸ ë³´ê³ ì ë§ê°ì¼ì ë¤ì 주 ììì¼ë¡ ë°ê¿ì¤"

ìì ìì 

ìì ì·¨ì:

"ë¶íìí ìì ìì í´ì¤"

Usage Examples

ìì 1: ìì ëª©ë¡ ì¡°í

from scripts.tasks_ops import list_tasks, format_task

# 기본 목ë¡ì ìì ì¡°í
tasks = list_tasks('@default')
for task in tasks:
    print(format_task(task))

ìì 2: ì ìì ìì±

from scripts.tasks_ops import create_task

# ì ìì ìì±
task = create_task(
    tasklist_id='@default',
    title='íë¡ì í¸ ë³´ê³ ì ìì±',
    notes='5 íì´ì§ ë¶ë, ê¸ìì¼ê¹ì§',
    due='2026-04-20T17:00:00+09:00'
)
print(f"ìì ìì± ìë£: {task['title']}")

ìì 3: ìì ìë£ ì²ë¦¬

from scripts.tasks_ops import complete_task

# ìì ìë£
task_id = 'ìì_ID_ì¬ê¸°ì'
complete_task('@default', task_id)
print("ìì ìë£ ì²ë¦¬ë¨!")

ìì 4: ìì ëª©ë¡ ëª©ë¡ ì¡°í

from scripts.tasks_ops import list_tasklists

tasklists = list_tasklists()
for tl in tasklists:
    print(f"{tl['title']} - {tl['id']}")

Files Structure

google-tasks/
âââ SKILL.md
âââ scripts/
    âââ tasks_ops.py      # Tasks API ì°ì° í¨ìë¤

Security Notes

  • OAuth í í°ì ~/.google-tasks-token.pickle ì ì ì¥ë©ëë¤
  • í´ë¼ì´ì¸í¸ í¤ë ~/.google-credentials.json ì ì ì¥ë©ëë¤ (ìºë¦°ë, ìí¸ ì¤í¬ê³¼ ê³µì )
  • ì´ íì¼ë¤ì .gitignore ì ì¶ê°ëì´ì¼ í©ëë¤
  • ê¶í ë²ì: https://www.googleapis.com/auth/tasks (Tasks ì ì²´ ì ê·¼)

Troubleshooting

"OAuth í´ë¼ì´ì¸í¸ í¤ íì¼ì´ ììµëë¤" ì¤ë¥:

  • ~/.google-credentials.json íì¼ì´ ìëì§ íì¸
  • êµ¬ê¸ ìºë¦°ë ì¤í¬ ì¤ì  ì ì´ë¯¸ ìì±í í¤ íì¼ìëë¤

ì¸ì¦ ì¤í¨:

  • í í° íì¼ì ìì íê³  ì¬ì¸ì¦: rm ~/.google-tasks-token.pickle

ê¶í ì¤ë¥:

  • ì¤í í° ìì  í ì¬ì¸ì¦: rm ~/.google-tasks-token.pickle && python3 scripts/tasks_ops.py

Integration with Other Google Skills

Same OAuth credentials (~/.google-credentials.json) are shared with google-calendar and google-sheets skills, so you only need to authenticate once!