ctx-plan-import

Import Claude Code plan files into project specs. Use when plan files in ~/.claude/plans/ should become permanent project specs.

41 stars

Best use case

ctx-plan-import is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Import Claude Code plan files into project specs. Use when plan files in ~/.claude/plans/ should become permanent project specs.

Teams using ctx-plan-import should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/ctx-plan-import/SKILL.md --create-dirs "https://raw.githubusercontent.com/ActiveMemory/ctx/main/internal/assets/claude/skills/ctx-plan-import/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/ctx-plan-import/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How ctx-plan-import Compares

Feature / Agentctx-plan-importStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Import Claude Code plan files into project specs. Use when plan files in ~/.claude/plans/ should become permanent project specs.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

Import Claude Code plan files (`~/.claude/plans/*.md`) into the
project's `specs/` directory so they become part of project memory.

## When to Use

- User says "import plans", "save that plan", "keep the plan"
- User wants to preserve a Claude Code plan as a project spec
- After a planning session produced a plan worth keeping
- User asks to review or archive recent plans

## When NOT to Use

- User wants to create a new spec from scratch (use `/ctx-spec`)
- User wants to edit an existing spec directly
- No `~/.claude/plans/` directory or it's empty

## Process

### 1. Discover Plans

List plan files with modification dates:

```bash
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`:**
```bash
find ~/.claude/plans/ -name '*.md' -newermt "$(date +%Y-%m-%d)" -type f
```

**Filtering with `--since`:**
```bash
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:
   - Lowercase
   - Replace spaces and non-alphanumeric characters with hyphens
   - Collapse multiple hyphens
   - Trim leading/trailing hyphens
   - Example: `Add Authentication Middleware` → `add-authentication-middleware`
3. **Check for conflicts**: if `specs/{slug}.md` already exists, ask
   the user whether to overwrite or pick a different name
4. **Copy the file** to `specs/{slug}.md`
5. **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

- Plan filenames in `~/.claude/plans/` are typically UUIDs or hashes:
  always use the H1 heading for the spec filename, not the original name
- If a plan has no H1 heading, use the original filename (minus extension)
  as the slug
- Do not modify the original plan files: this is a copy, not a move
- The `specs/` directory must exist (it should already be present in
  the project root)

Related Skills

ctx-import-plans

41
from ActiveMemory/ctx

Import plan files into project specs directory. Use to convert external plans into project-tracked specs.

ctx-plan

41
from ActiveMemory/ctx

Stress-test a plan through adversarial interview. Find what's weak, missing, or unexamined before the user commits. Use when the user wants their plan scrutinized.

ctx-verify

41
from ActiveMemory/ctx

Verify before claiming completion. Use before saying work is done, tests pass, or builds succeed.

ctx-skill-creator

41
from ActiveMemory/ctx

Create, improve, test, and deploy skills. Full skill lifecycle from intent to working skill file.

ctx-sanitize-permissions

41
from ActiveMemory/ctx

Audit tool permissions for dangerous or overly broad entries. Use to ensure safe agent configuration.

ctx-recall

41
from ActiveMemory/ctx

Browse session history. Use when referencing past discussions or finding context from previous work.

ctx-prompt

41
from ActiveMemory/ctx

Apply, list, and manage saved prompt templates from .context/prompts/. Use when the user asks to apply, list, or create a reusable template like code-review or refactor.

ctx-journal-normalize

41
from ActiveMemory/ctx

Normalize journal source markdown for clean rendering. Use after journal site shows rendering issues: fence nesting, metadata formatting, broken lists.

ctx-compact

41
from ActiveMemory/ctx

Archive completed tasks and trim context. Use when context files are growing large.

ctx-check-links

41
from ActiveMemory/ctx

Audit docs for dead links. Use before releases, after restructuring docs, or when running a documentation audit.

ctx-add-task

41
from ActiveMemory/ctx

Add a task. Use when follow-up work is identified or when breaking down complex work into subtasks.

ctx-add-learning

41
from ActiveMemory/ctx

Record a learning. Use when discovering gotchas, bugs, or unexpected behavior that future sessions should know about.