# Setting Up Tasks

> Guides initial setup of the Agentic Tasks plugin — detects or configures MCP connections and runs provider-specific database initialization. Triggers on: "setup agentic tasks", "initialize task management", "configure notion tasks", "configure data source", "タスク管理セットアップ", "タスク管理初期化".

- Skill: `kazukinagata/setting-up-tasks` (Agent Skill)
- Install (CLI): `npx skillmds@latest add kazukinagata/setting-up-tasks`
- Raw SKILL.md: https://api.skillmd.com/api/skills/kazukinagata/setting-up-tasks/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: kazukinagata (https://skillmd.com/u/kazukinagata)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/kazukinagata/setting-up-tasks

---


# Agentic Tasks — Setup Guide

You are guiding the user through the initial setup of the Agentic Tasks plugin.

## Step 1: Check for Existing MCP Configuration

Inspect available MCP tools to detect any already-configured providers:
- `notion-*` tools present → Notion MCP is already configured
- `mcp__airtable__*` tools present → Airtable MCP is already configured
- SQLite/database tools present → SQLite is already configured

### If a single provider MCP is already present
Use AskUserQuestion to confirm:
> "I detected an existing [provider] MCP connection. Would you like to set up Agentic Tasks using [provider]?"

If yes, skip to Step 3 with that provider.

### If multiple provider MCPs are present
Use AskUserQuestion to ask which one to use:
> "I detected multiple data source MCPs: [list providers]. Which one should I set up Agentic Tasks for?"

Then skip to Step 3 with the selected provider.

### If no provider MCP is present
Continue to Step 2 to guide the user through MCP setup.

## Step 2: Choose a Data Source and Configure MCP

Use AskUserQuestion to ask which data source the user wants to use:
> "Which data source would you like to use for Agentic Tasks?
> - **Notion** — recommended for teams, rich UI, free tier available
> - Other providers coming soon (SQLite, Airtable, etc.)"

Then guide MCP setup based on the environment:

### Determining the Environment

- **Claude Code**: `~/.claude/settings.json` exists or `CLAUDE_PLUGIN_ROOT` is set
- **Cowork**: Global Instructions / CLAUDE.md is accessible from the current context

### Claude Code — MCP Setup Instructions

Add the following to `~/.claude/settings.json` under `"mcpServers"`:

**Notion:**
```json
"notion": {
  "type": "http",
  "url": "https://mcp.notion.com/mcp"
}
```

After adding, authenticate by visiting `https://mcp.notion.com/mcp` in a browser and following the OAuth flow. Then restart Claude Code and run the setup skill again.

### Cowork — MCP Setup Instructions

**Notion:**
Open Cowork settings → MCP Servers → Add Server → Enter `https://mcp.notion.com/mcp`.
Authenticate with your Notion account when prompted. Then run the setup skill again.

## Step 3: Run Provider-Specific Setup

Once the active provider is confirmed, load and follow:

```
${CLAUDE_PLUGIN_ROOT}/skills/providers/{active_provider}/setup.md
```

This file contains all provider-specific database creation, schema initialization, and verification steps.

## Step 4: Daily Routine Scheduled Task Registration (Cowork only)

After provider-specific setup completes, check the execution environment.

### Environment Check

Determine the environment:
1. If environment variable `CLAUDE_CODE_IS_COWORK` is `1` → Cowork
2. Otherwise → Claude Code (skip this step entirely)

### Prompt User

Use AskUserQuestion:
> "Would you like to register a daily routine that ingests messages into tasks and guides you through task refinement and execution every morning?"

If the user declines, skip this step.

### Ask Preferred Time

If yes, use AskUserQuestion:
> "What time should the daily routine run? (default: 09:00)"

Accept the user's answer or default to 09:00.

### Ask Custom Routine Options

Use AskUserQuestion (multiSelect) to ask:
> "Would you like to add any of the following to your daily routine?"
> - "Ingest from additional messaging tools (e.g., Google Chat, Discord)"
> - "Check a spreadsheet for new tasks"
> - "Run a custom step before/after message intake"

#### If the user selects nothing

Use the default prompt: `Run the running-daily-tasks skill`

#### If the user selects one or more options

Ask follow-up questions for each selected option using AskUserQuestion:

- **Additional messaging tools** → "Which messaging tools should be checked? (e.g., Google Chat, Discord)"
- **Spreadsheet** → "Which spreadsheet should be scanned? (provide a name or URL)"
- **Custom step** → "Describe the custom step you'd like to add (free-text):"

Then build the prompt by appending additional instructions to the base prompt:

```
Run the running-daily-tasks skill.

Additional instructions for this daily routine:
- <instruction derived from each selected option>
```

Example with two options selected:
```
Run the running-daily-tasks skill.

Additional instructions for this daily routine:
- After message intake, also check Google Chat DMs for the past 24 hours and create tasks from actionable messages.
- Before task refinement, scan the "Sprint Tracker" spreadsheet for new rows and create corresponding Backlog tasks.
```

### Create Scheduled Task

Call `mcp__scheduled-tasks__create_scheduled_task`:
- `taskId`: `daily-tasks-<current_user_name_slug>` (see Slug Generation Rules below)
- `prompt`: The constructed prompt string from the previous step
- `description`: `Agentic Tasks: Daily routine for <user_name>`
- `cronExpression`: `0 <HH> * * *` (based on user's chosen time, e.g. `0 9 * * *` for 09:00)

### Slug Generation Rules

To generate `<current_user_name_slug>` from the user's display name:

1. Lowercase the text
2. Replace non-alphanumeric characters with hyphens
3. Collapse consecutive hyphens
4. Trim leading/trailing hyphens
5. Truncate to 30 characters (break at hyphen boundary if possible)

Example: "Taro Yamada" → `taro-yamada`

### Report

```
Daily routine registered: runs every day at <HH:MM>.
Scheduled Task ID: daily-tasks-<user_name_slug>
To modify: Cowork → Scheduled Tasks
```

## Language

Always communicate with the user in the language they are using.

