home / skills / codyswanngt / lisa / tasks-load

tasks-load skill

/.claude/skills/tasks-load

This skill loads tasks from a project's tasks directory into the current Claude Code session, recreating tasks and setting the active project.

npx playbooks add skill codyswanngt/lisa --skill tasks-load

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
2.2 KB
---
name: tasks-load
description: This skill should be used when loading tasks from a project directory into the current Claude Code session. It reads task JSON files from session subdirectories, recreates them in the current session, and sets the active project marker.
allowed-tools: ["Read", "Bash", "TaskCreate", "TaskUpdate", "TaskList"]
---

# Load Project Tasks

Load tasks from `projects/$ARGUMENTS/tasks/` into the current Claude Code session.

Tasks are stored in session subdirectories to preserve history across `/clear` commands:
```
projects/$ARGUMENTS/tasks/
├── {session-1-uuid}/
│   ├── 1.json
│   └── 2.json
└── {session-2-uuid}/
    ├── 1.json
    └── 2.json
```

## Process

### Step 1: Validate Project

Check if the project exists and has task files:

```bash
find projects/$ARGUMENTS/tasks -name "*.json" 2>/dev/null | head -5
```

If no task files exist, report: "No tasks found in projects/$ARGUMENTS/tasks/"

List available sessions:

```bash
ls -dt projects/$ARGUMENTS/tasks/*/ 2>/dev/null | head -10
```

### Step 2: Set Active Project

Create the active project marker:

```bash
echo "$ARGUMENTS" > .claude-active-project
```

This ensures any new tasks created will sync back to this project.

### Step 3: Load Tasks

Find and load all task JSON files from ALL session directories:

```bash
find projects/$ARGUMENTS/tasks -name "*.json" -type f
```

For each JSON file found:

1. Read the task JSON file
2. Use TaskCreate to recreate the task with:
   - subject from JSON
   - description from JSON
   - activeForm from JSON
   - metadata: `{ "project": "$ARGUMENTS" }`
3. If the task was already completed (status: "completed"), use TaskUpdate to mark it completed

### Step 4: Report

After loading all tasks, report:

```
Loaded X tasks from projects/$ARGUMENTS/tasks/
- Sessions found: N
- Pending: Y
- Completed: Z

Active project set to: $ARGUMENTS
New tasks will automatically sync to this project.
```

## Notes

- Tasks are recreated with new IDs in the current session
- The original task IDs from the project are not preserved
- Tasks from ALL sessions are loaded (full history)
- Task dependencies (blocks/blockedBy) are NOT currently preserved across load/sync cycles
- Use TaskList to see the loaded tasks

Overview

This skill loads tasks from a project directory into the current Claude Code session and sets the active project marker. It reads task JSON files stored under projects/<project>/tasks/<session>/, recreates tasks in the session, and reports load statistics. Use it to restore or import historical tasks while preserving session history across clears.

How this skill works

The skill validates that the project tasks directory contains .json files and lists available session subdirectories. It writes the active project name to .claude-active-project so new tasks sync back to the source project. Then it locates all task JSON files across every session folder, recreates each task via TaskCreate using subject, description, activeForm and metadata {"project": "<project>"}, and marks tasks completed with TaskUpdate when the JSON indicates status: "completed". Finally it summarizes counts and sessions found.

When to use it

  • Importing a project's historical tasks into the current session after a /clear or when switching projects
  • Restoring tasks from a project directory for review, editing, or continuation
  • Onboarding an existing project into the current Claude Code workspace for active work and syncing
  • Migrating tasks across environments while preserving per-session history
  • Verifying and auditing task load results after automated export processes

Best practices

  • Confirm projects/<project>/tasks/ contains .json files before running the loader to avoid empty imports
  • Set the correct project name argument so .claude-active-project points to the intended project
  • Run TaskList after loading to inspect recreated tasks and verify metadata and statuses
  • Be aware that task IDs will change and dependencies (blocks/blockedBy) are not preserved
  • Keep backups of the original JSON files if you need original IDs or dependency restoration later

Example use cases

  • Load all historical tasks for project "alpha" into a fresh session to continue work after a reset
  • Aggregate tasks from multiple session folders to perform reporting on pending vs completed items
  • Switch active project marker to a new project before creating tasks that should sync to it
  • Recover completed task records into the current workspace for compliance or audit traces
  • Quickly import tasks from a project directory when cloning or duplicating a workspace

FAQ

Will original task IDs be preserved?

No. Tasks are recreated with new IDs in the current session; original IDs in the JSON are not preserved.

Are task dependencies restored?

No. blocks/blockedBy relationships are not preserved during load and will need manual reconstruction.