Agent Skillsgmickel/flow-next › flow-next-export-context

flow-next-export-context

GitHub

将代码仓库的审查上下文(计划或实现)导出为Markdown文件,以便在外部LLM中进行高质量代码审查。

plugins/flow-next/skills/flow-next-export-context/SKILL.md gmickel/flow-next

Trigger Scenarios

export context export for external review export plan for ChatGPT export impl review context review with an external model export review context

Install

npx skills add gmickel/flow-next --skill flow-next-export-context -g -y
More Options

Non-standard path

npx skills add https://github.com/gmickel/flow-next/tree/main/plugins/flow-next/skills/flow-next-export-context -g -y

Use without installing

npx skills use gmickel/flow-next@flow-next-export-context

指定 Agent (Claude Code)

npx skills add gmickel/flow-next --skill flow-next-export-context -a claude-code -g -y

安装 repo 全部 skill

npx skills add gmickel/flow-next --all -g -y

预览 repo 内 skill

npx skills add gmickel/flow-next --list

SKILL.md

Frontmatter
{
    "name": "flow-next-export-context",
    "description": "Export RepoPrompt context to a markdown file for review with an external LLM (ChatGPT, Claude web, etc.). Use when you want Carmack-level review but prefer an external model. Triggers on \"export context\", \"export for external review\", \"export plan for ChatGPT\", \"export impl review context\", \"review with an external model\", \"export review context\"."
}

Export Context Mode

Build RepoPrompt context and export to a markdown file for use with external LLMs (ChatGPT Pro, Claude web, etc.).

Use case: When you want Carmack-level review but prefer to use an external model.

Preamble

CRITICAL: flowctl is BUNDLED — NOT installed globally. which flowctl will fail (expected). Define once; subsequent blocks use $FLOWCTL:

FLOWCTL="${DROID_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}/scripts/flowctl"
[ -x "$FLOWCTL" ] || FLOWCTL="<plugin-root>/scripts/flowctl"   # <plugin-root> = the directory two levels above this skill's SKILL.md file (the harness gave you that file's absolute path when the skill loaded); substitute it literally
[ -x "$FLOWCTL" ] || FLOWCTL=".flow/bin/flowctl"

Input

Arguments: $ARGUMENTS Format: <type> <target> [focus areas]

Types:

  • plan <spec-id> - Export plan review context
  • impl - Export implementation review context (current branch)

This skill is phrase-triggered (no slash command) — invoke it by asking in natural language; the host agent parses <type> <target> [focus areas] from the request.

Examples:

  • "export context for plan fn-1, focus on security"
  • "export impl review context, focus on the auth changes"

Setup

REPO_ROOT="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"

Workflow

Step 1: Determine Type

Parse arguments to determine if this is a plan or impl export.

Step 2: Gather Content

For plan export:

$FLOWCTL show <spec-id> --json
$FLOWCTL cat <spec-id>

For impl export:

git branch --show-current
git log main..HEAD --oneline 2>/dev/null || git log master..HEAD --oneline
git diff main..HEAD --name-only 2>/dev/null || git diff master..HEAD --name-only

Step 3: Setup RepoPrompt

eval "$($FLOWCTL rp setup-review --repo-root "$REPO_ROOT" --summary "<summary based on type>" --create)"

Step 4: Augment Selection

$FLOWCTL rp select-get --window "$W" --tab "$T"

# Add relevant files
$FLOWCTL rp select-add --window "$W" --tab "$T" <files>

Step 5: Build Review Prompt (file composition — no content re-typing)

Path-persistence rule: bash vars do not survive across tool calls. The prompt path is composed once as a literal and typed verbatim in every block that touches it${TMPDIR:-/tmp}/flow-export-prompt-<target>-<agent-chosen 4-char suffix>.md. A run that carries the path in a shell variable across tool calls has broken this: the later block writes to an empty path.

Build the prompt by deterministic composition — the handoff is captured via redirection, never pasted into a heredoc; only the static review criteria (same criteria as plan-review or impl-review) are typed, once, in the quoted heredoc:

PROMPT_FILE="${TMPDIR:-/tmp}/flow-export-prompt-<target>-<suffix>.md"   # literal path

# 1. Builder handoff — captured via redirection, never re-typed
$FLOWCTL rp prompt-get --window "$W" --tab "$T" > "$PROMPT_FILE"

# 2. Review criteria (static, quoted heredoc — same criteria block as
#    plan-review or impl-review, per the export type)
cat >> "$PROMPT_FILE" << 'EOF'
<review criteria — static block>
EOF

$FLOWCTL rp prompt-set --window "$W" --tab "$T" --message-file "$PROMPT_FILE"

Done when

  • $PROMPT_FILE names the same literal path in all three commands above.
  • The builder handoff reached the file by redirection from flowctl rp prompt-get. A run that reconstructs that content inside a heredoc has broken this.
  • The only typed content is the static review criteria block for this export type, appended once via the quoted heredoc.

Step 6: Export

OUTPUT_FILE=~/Desktop/review-export-$(date +%Y%m%d-%H%M%S).md
$FLOWCTL rp prompt-export --window "$W" --tab "$T" --out "$OUTPUT_FILE"
open "$OUTPUT_FILE"

Step 7: Inform User

Exported review context to: $OUTPUT_FILE

The file contains:
- Full file tree with selected files marked
- Code maps (signatures/structure)
- Complete file contents
- Review prompt with Carmack-level criteria

Paste into ChatGPT Pro, Claude web, or your preferred LLM.
After receiving feedback, return here to implement fixes.

Note

This skill is manual-only. It produces no receipts and no status updates, so an autonomous Ralph invocation is declined rather than served — a run that reports success to a Ralph caller has broken this.

Done when

  • The run ended with flowctl rp prompt-export to a timestamped output file, and told the user that exact path plus what the file contains.

Version History

  • 8baa538 Current 2026-08-20 07:59

Same Skill Collection

optimization/audit/baseline/SKILL.md
optimization/interview/baseline/SKILL.md
optimization/make-pr/baseline/SKILL.md
optimization/plan/baseline/SKILL.md
optimization/prospect/baseline/SKILL.md
plugins/flow-next/codex/skills/flow-next-audit/SKILL.md
plugins/flow-next/codex/skills/flow-next-capture/SKILL.md
plugins/flow-next/codex/skills/flow-next-chart/SKILL.md
plugins/flow-next/codex/skills/flow-next-deps/SKILL.md
plugins/flow-next/codex/skills/flow-next-export-context/SKILL.md
plugins/flow-next/codex/skills/flow-next-guide/SKILL.md
plugins/flow-next/codex/skills/flow-next-impl-review/SKILL.md
plugins/flow-next/codex/skills/flow-next-interview/SKILL.md
plugins/flow-next/codex/skills/flow-next-land/SKILL.md
plugins/flow-next/codex/skills/flow-next-make-pr/SKILL.md
plugins/flow-next/codex/skills/flow-next-map/SKILL.md
plugins/flow-next/codex/skills/flow-next-memory-migrate/SKILL.md
plugins/flow-next/codex/skills/flow-next-pilot/SKILL.md
plugins/flow-next/codex/skills/flow-next-plan-review/SKILL.md
plugins/flow-next/codex/skills/flow-next-plan/SKILL.md
plugins/flow-next/codex/skills/flow-next-prime/SKILL.md
plugins/flow-next/codex/skills/flow-next-prospect/SKILL.md
plugins/flow-next/codex/skills/flow-next-qa/SKILL.md
plugins/flow-next/codex/skills/flow-next-ralph-init/SKILL.md
plugins/flow-next/codex/skills/flow-next-resolve-pr/SKILL.md
plugins/flow-next/codex/skills/flow-next-setup/SKILL.md
plugins/flow-next/codex/skills/flow-next-spec-completion-review/SKILL.md
plugins/flow-next/codex/skills/flow-next-strategy/SKILL.md
plugins/flow-next/codex/skills/flow-next-sync/SKILL.md
plugins/flow-next/codex/skills/flow-next-tracker-sync/SKILL.md
plugins/flow-next/codex/skills/flow-next-visual/SKILL.md
plugins/flow-next/codex/skills/flow-next-work/SKILL.md
plugins/flow-next/codex/skills/flow-next-worktree-kit/SKILL.md
plugins/flow-next/codex/skills/flow-next/SKILL.md
plugins/flow-next/skills/flow-next-chart/SKILL.md
plugins/flow-next/skills/flow-next-deps/SKILL.md
plugins/flow-next/skills/flow-next-guide/SKILL.md
plugins/flow-next/skills/flow-next-impl-review/SKILL.md
plugins/flow-next/skills/flow-next-interview/SKILL.md
plugins/flow-next/skills/flow-next-make-pr/SKILL.md
plugins/flow-next/skills/flow-next-map/SKILL.md
plugins/flow-next/skills/flow-next-pilot/SKILL.md
plugins/flow-next/skills/flow-next-plan-review/SKILL.md
plugins/flow-next/skills/flow-next-plan/SKILL.md
plugins/flow-next/skills/flow-next-prime/SKILL.md
plugins/flow-next/skills/flow-next-prospect/SKILL.md
plugins/flow-next/skills/flow-next-ralph-init/SKILL.md
plugins/flow-next/skills/flow-next-resolve-pr/SKILL.md
plugins/flow-next/skills/flow-next-setup/SKILL.md

Metadata

Files
0
Version
8baa538
Hash
0d10bbfc
Indexed
2026-08-20 07:59

- 위키
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-25 09:23
浙ICP备14020137号-1 $방문자$