Agent skill
tasks-sync
This skill should be used when syncing current session tasks to a project directory. It exports all tasks from the current Claude Code session to JSON files in the project's tasks directory, enabling persistence across sessions.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/tasks-sync-codyswanngt-lisa
SKILL.md
Sync Tasks to Project
Sync all tasks from the current session to projects/$ARGUMENTS/tasks/{session-id}/.
This skill is for manual syncing when work started without setting an active project. Once synced, the automatic hook handles future task updates.
Process
Step 1: Validate Project
Check if the project directory exists:
ls -d projects/$ARGUMENTS 2>/dev/null
If the project doesn't exist, ask: "Project '$ARGUMENTS' doesn't exist. Create it?"
If yes, create the project structure:
mkdir -p projects/$ARGUMENTS/tasks
Step 2: Determine Session ID
Find the current session by looking for the most recently modified task directory:
ls -dt ~/.claude/tasks/*/ 2>/dev/null | head -1 | xargs basename
If no session found, use a timestamp-based identifier:
echo "manual-$(date +%Y%m%d-%H%M%S)"
Store the session ID for use in subsequent steps.
Step 3: Set Active Project
Create/update the active project marker:
echo "$ARGUMENTS" > .claude-active-project
Step 4: Get Current Tasks
Use TaskList to get all tasks in the current session.
Step 5: Sync Each Task
For each task from TaskList:
- Use TaskGet to get full task details
- Create the session directory:
mkdir -p projects/$ARGUMENTS/tasks/{session-id}
- Create a JSON file with the task data:
{
"id": "<task-id>",
"subject": "<subject>",
"description": "<description>",
"activeForm": "<activeForm>",
"status": "<status>",
"blocks": [],
"blockedBy": []
}
- Write to
projects/$ARGUMENTS/tasks/{session-id}/<id>.json
Step 6: Stage for Git
git add projects/$ARGUMENTS/tasks/{session-id}/*.json
Step 7: Report
Synced X tasks to projects/$ARGUMENTS/tasks/{session-id}/
- Pending: Y
- In Progress: Z
- Completed: W
Files staged for commit. Run /git-commit when ready.
Notes
- This skill manually syncs all current tasks to a project
- Use this when work started without a project context
- After syncing, the active project is set so future tasks auto-sync via the hook
- Each sync creates a new session directory to preserve history
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?