Skip to content
Development
Skill

/import

Import external plans. Validates context, detects conflicts, generates PLAN.md.

From plugin
plan-build-run
1747 skills18 agents70 commands
Install
$ npx -y skills add SienkLogic/plan-build-run --skill import --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/import

Context preview

The summary Claude sees to decide when to auto-load this skill.

Import external plans. Validates context, detects conflicts, generates PLAN.md.

SKILL.md

import.SKILL.md
name: import
description: "Import external plans. Validates context, detects conflicts, generates PLAN.md."
allowed-tools: Read, Write, Bash, Glob, Grep, Task, AskUserQuestion
argument-hint: "<phase-number> [--from <filepath>] [--skip-checker] | --prd <filepath>"

**STOP — DO NOT READ THIS FILE. You are already reading it. This prompt was injected into your context by Claude Code's plugin system. Using the Read tool on this SKILL.md file wastes ~7,600 tokens. Begin executing Step 1 immediately.**

Step 0 — Immediate Output

**Before ANY tool calls**, display this banner:

╔══════════════════════════════════════════════════════════════╗
║  PLAN-BUILD-RUN ► IMPORTING PLAN                             ║
╚══════════════════════════════════════════════════════════════╝

Then proceed to Step 1.

/pbr:import — Plan Import

You are the orchestrator for `/pbr:import`. This skill imports an external plan document (design doc, RFC, AI-generated plan, etc.) into the Plan-Build-Run planning format. It validates the imported document against project context, detects conflicts with locked decisions and existing architecture, and generates properly formatted PLAN.md files. Your job is to stay lean, do conflict detection inline, and delegate only the plan checker to a Task() subagent.

References

  • `references/ui-brand.md` — Status symbols, banners, checkpoint boxes for import display output
  • `references/questioning.md` — Questioning patterns for gap-fill prompts during PRD import

Context Budget

Reference: `skills/shared/context-budget.md` for the universal orchestrator rules. Reference: `skills/shared/agent-type-resolution.md` for agent type fallback when spawning Task() subagents.

Additionally for this skill:

  • **Minimize** reading subagent output — read only verdicts, not full reports

Prerequisites

  • `.planning/config.json` exists (run `/pbr:new-project` first)
  • `.planning/ROADMAP.md` exists with at least one phase
  • `.planning/REQUIREMENTS.md` exists (optional — if absent, skip requirement ID cross-referencing and warn the user: "No REQUIREMENTS.md found. Skipping REQ-ID validation.")

---

Orchestration Flow

Execute these steps in order.

---

Step 1: Parse and Validate (inline)

Reference: `skills/shared/config-loading.md` for the tooling shortcut and config field reference.

1. Parse `$ARGUMENTS` for phase number 2. Parse optional `--from <filepath>` flag (path to the external document to import) 3. Parse optional `--skip-checker` flag (skip plan validation step) 3b. Parse optional `--prd <filepath>` flag.

  • If `--prd` is present: **branch into PRD Import Flow (Steps A–G below)** immediately after writing `.active-skill`.
  • Do NOT proceed to Step 2 (standard import flow). The --prd branch is a completely separate execution path.
  • If both `--prd` and `--from` are present: treat `--prd` as the primary flag; `--from` is ignored with an [INFO] note.
  • If `--prd` is present but no filepath follows: display error "Missing filepath for --prd flag." and stop.

4. **CRITICAL: Write .active-skill NOW.** Write the text "import" to `.planning/.active-skill` using the Write tool.

**→ If --prd flag was set: jump to PRD Import Flow (Step A). Do not continue to Step 2.**

5. Validate:

  • Phase exists in ROADMAP.md
  • Phase directory exists at `.planning/phases/{NN}-{slug}/`

6. If no phase number given, read current phase from `.planning/STATE.md` 7. Check for existing plans in the phase directory (glob for `*-PLAN.md`)

  • If plans exist: ask user via AskUserQuestion: "Phase {N} already has plans. Replace them with imported plans?"
  • If yes: note that existing plans will be overwritten in Step 7
  • If no: stop

---

PRD Import Flow

> **Entered when `--prd <filepath>` is present in $ARGUMENTS. Steps A–G replace Steps 2–11 entirely for this path.**

---

Step A: Read and Validate PRD File

1. Read the file at the `--prd <filepath>` path. 2. If the file does not exist: display the "Import file not found" error from the Error Handling section and stop. 3. If the file is empty or < 100 characters: display error "PRD file appears empty or too short to extract meaningful content." and stop. 4. Store the full PRD content for use in Steps B–E.

---

Step B: Gap Detection — Identify Missing Sections (inline)

Analyze the PRD content for the presence of these six required sections:

| Section | What to look for | |---------|-----------------| | Project name / title | A clear product name or title | | Problem statement | What problem the product solves, who it's for | | Goals / success criteria | Measurable outcomes, KPIs, or acceptance tests | | Functional requirements | Feature list, user stories, or capabilities | | Non-functional requirements | Performance, security, reliability constraints | | Out of scope / deferred | Explicitly excluded features |

For each section that is **absent or ambiguous**, record it as a gap.

**If 1–3 gaps found:** Batch all gaps into ≤ 3 AskUserQuestion calls (max 4 options each). Ask the user to supply the missing info:

  • If 1 gap: one AskUserQuestion with a freeform prompt.
  • If 2–3 gaps: group into 2 AskUserQuestion calls of related topics (e.g., "Requirements" and "Constraints/Scope").
  • If > 3 gaps: group all into exactly 3 AskUserQuestion calls. Do NOT exceed 3 calls.

Example AskUserQuestion for missing requirements:

Use AskUserQuestion:
  question: "The PRD doesn't clearly specify functional requirements. Please describe the main features or capabilities this product must have."
  header: "Fill Gap"
  options: []   ← freeform (no options means free text input)
  multiSelect: false

**If 0 gaps:** proceed directly to Step C with no prompts.

Incorporate user answers into the extraction context used in Step C.

---

Step C: Extract Project Files Inline (PROJECT.md with Context, REQUIREMENTS.md)

Using the PRD content (plus any gap-fill answers from Step B), generate the content for two fil

Read more
Ships withplan-build-run

Plan it. Build it. Run it. A Claude Code plugin for structured development with context-engineered agents.

Get the whole plugin

Other skills on plan-build-run.