Ctx plan import

From ActiveMemory/ctx · View interactive version

Ctx plan import is an AI agent skill from the GitHub repository ActiveMemory/ctx. Import Claude Code plan files into project specs. Use when plan files in ~/.claude/plans/ should become permanent project specs.

How to use this skill

Skill file

Import Claude Code plan files (~/.claude/plans/*.md) into the

project's specs/ directory so they become part of project memory.

When to Use

When NOT to Use

Process

1. Discover Plans

List plan files with modification dates:

ls -lt ~/.claude/plans/*.md 2>/dev/null

If no files are found, tell the user and stop.

2. Filter by Arguments

The user may pass arguments to narrow the selection:

| Argument | Behavior |

|----------------------|--------------------------------------------------------|

| --today | Only plans modified today |

| --since YYYY-MM-DD | Only plans modified on or after the given date |

| --all | Import all plans without prompting |

| (none) | Interactive: present the list and ask the user to pick |

Filtering with --today:

find ~/.claude/plans/ -name '*.md' -newermt "$(date +%Y-%m-%d)" -type f

Filtering with --since:

find ~/.claude/plans/ -name '*.md' -newermt "YYYY-MM-DD" -type f

3. Present for Selection (Interactive Mode)

For each plan file, extract the first H1 heading and show it with

the modification date:

1. 2026-02-28  Add authentication middleware
2. 2026-02-27  Refactor database connection pool
3. 2026-02-25  Import plans skill

Ask the user which plans to import (comma-separated numbers, or "all").

4. Import Each Selected Plan

For each selected plan:

  1. Read the file to extract the H1 heading (first # line)
  2. Slugify the heading for the filename:
  1. Check for conflicts: if specs/{slug}.md already exists, ask

the user whether to overwrite or pick a different name

  1. Copy the file to specs/{slug}.md
  2. Optionally add a task: ask the user if they want a task in

TASKS.md referencing the imported spec (use /ctx-task-add if yes)

5. Report

After importing, summarize what was done:

Imported 2 plan(s):
  ~/.claude/plans/abc123.md → specs/add-authentication-middleware.md
  ~/.claude/plans/def456.md → specs/refactor-database-pool.md

Important Notes

always use the H1 heading for the spec filename, not the original name

as the slug

the project root)

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.