Plannotator 标志

Plannotator

社区热门
backnotprop
plannotator

Reference for using the Plannotator CLI: plan review, code review, annotating files, URLs, folders, and running local apps, annotating the last assistant message, browsing archived plan decisions, and exporting or sharing Guided Reviews. Invoke when asked to use Plannotator for anything not covered by a more specific plannotator-* skill.

概览

发布者backnotprop
代码仓库plannotator
技能名称plannotator
星标数
8.8K
复刻数
658
附带文件
1
许可协议Apache-2.0
链接
  • Markdown 格式的指令

    模型按需加载的 SKILL.md 文件,因此只有在请求确实匹配时才会消耗 Token。

  • 兼容任何大语言模型

    AI 技能采用纯 Markdown,而非特定提供商的代码,因此可搭配 GPT、Claude、Gemini、Grok 或本地模型使用。

  • 1 个随附文件

    模型执行任务时可读取的脚本、模板和参考资料。这些文件为只读文件,绝不会被执行。

  • 开源

    由 backnotprop 发布于 GitHub。请在安装前查看源内容。

安装

在 TypingMind 中安装 Plannotator AI 技能,即可搭配任意大语言模型使用;也可以将其放入其他支持读取 SKILL.md 的智能体中。

1

安装到 TypingMind

TypingMind 可直接从 GitHub 文件夹安装技能:读取 SKILL.md,打包资源文件,并将结果保存在本地。

  1. 打开应用,前往“插件 → 技能”。
  2. 选择“从 GitHub 安装”。
  3. 粘贴下方的技能文件夹 URL 并确认。
    https://github.com/backnotprop/plannotator/tree/main/apps/skills/core/plannotator
  4. 请在每个需要使用该技能的聊天中启用它。
依次选择“插件 → 技能 → 添加技能 → 从 GitHub URL 导入”,然后粘贴文件夹 URL 并点击“继续”。
2

安装到其他智能体

任何支持 Agent Skills 格式的智能体都可以使用此技能,只需将文件夹复制到该智能体的技能目录中。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/backnotprop/plannotator.git /tmp/plannotator
mkdir -p .claude/skills
cp -r /tmp/plannotator/apps/skills/core/plannotator .claude/skills/plannotator
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

在任意 TypingMind 聊天中启用 Plannotator,后续即可交由模型处理。技能的名称和描述会放在系统提示词中,一旦请求匹配,模型就会自动加载完整指令,无需您手动调用,且在实际使用前不会消耗 Token。

一旦请求与技能匹配,模型就会自动加载 Plannotator。

兼容任何 AI 模型

AI 技能是纯 Markdown 指令,而非特定提供商的代码,因此 Plannotator 不局限于最初适配的模型。只需在 TypingMind 中安装一次,即可搭配 GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 或您自行运行的本地模型使用,全程使用您自己的 API 密钥。

  • 仅在需要时加载

    系统提示词中仅包含技能名称和描述。首次遇到匹配的请求时才会获取指令,因此未使用的技能不会产生额外费用。

  • 在聊天中切换模型

    技能是指令而非代码,因此切换模型不会导致技能失效,新模型会读取同一个 SKILL.md。

技能指令

这是模型会加载的 SKILL.md 内容。请在安装前阅读,因为技能就是模型将遵循的指令。

Plannotator CLI Reference

Plannotator is a local, browser-based review layer for agent workflows: it opens plans, diffs, and documents in an annotation UI, the human marks them up, and the structured feedback comes back to you on stdout. It installs as a single plannotator binary plus per-host hooks, so plan review fires automatically when you exit plan mode; every other surface is launched explicitly from the CLI. A session runs on a random localhost port (fixed port 19432 in remote mode) and blocks until the reviewer submits feedback, approves, or closes the tab.

This skill is the knowledge layer. The plannotator-review, plannotator-annotate, and plannotator-last skills are thin launchers for the three most common actions; use this reference when you need to pick the right command or flags yourself.

Choose the command

The user wantsRun
Review a plan you producedNothing. Plan review opens automatically on plan exit via hooks. Never run bare plannotator yourself.
Review and explicitly approve a plan/spec saved as a fileplannotator annotate <file> --gate --json
Review current code changesplannotator review
Review a GitHub PR or GitLab MRplannotator review <PR_URL>
Annotate a markdown, text, config, or HTML fileplannotator annotate <file>
Annotate a web pageplannotator annotate <https-url>
Annotate a running local app (dev server)plannotator annotate <http://localhost:PORT/>
Pick a file to annotate from a folderplannotator annotate <folder/>
Annotate your latest assistant messageplannotator last
Browse past plan decisionsplannotator archive
Export or share a Guided Reviewplannotator guide export / plannotator guide share
Reopen or list live sessionsplannotator sessions

Session model

Every review or annotate command starts a local web server, opens the browser, and blocks until the human decides. That can take minutes. Launch it with a long (or no) command timeout, or in the background, then read stdout when the process exits. Do not kill the process to "finish" a review; a session that ends without a decision reads as no feedback.

Stdout is the interface, but its contract is command-specific. For annotate and its last-message variants:

  • Plaintext (default): empty output on close, The user approved. on approve, otherwise the feedback text. Address returned feedback in the same conversation.
  • --json: one JSON record with decision (approved, dismissed, or annotated) and optional raw feedback. An approval may still carry notes in feedback; treat those as guidance, not a change request.
  • --hook: hook-native output for real PostToolUse/Stop hook contexts only. Approve/close emits nothing (hook passes); annotations emit {"decision":"block","reason":"..."}. --hook implies the gate UI. Never use it for a normal interactive invocation.

plannotator <command> --help prints usage without launching anything. Bare plannotator is the hook entry point and expects hook JSON on stdin.

plannotator review

bash
plannotator review [--git | --gitbutler] [--base <ref>] [--diff-type <type>] [--local | --no-local] [--patch-file <path | ->] [--tailscale] [--json] [PR_URL]

Reviews local VCS changes, or a pull request when a URL is given. Default stdout stays plaintext: the existing close message, approval prompt, or feedback.

With --json, direct review emits one record: { decision: 'approved' | 'annotated' | 'dismissed', message: string }. message is the CLI-rendered text exactly as default plaintext would print it, without the final console newline. It includes customized prompts and non-blocking approval-with-notes framing; a denial suffix is included only when annotations.length > 0, including in PR mode, not for zero-annotation platform status.

Classify the outcome only by decision, never by message text. Notes on an approved review are guidance, not a blocking change request. This rendered message contract is separate from the raw feedback JSON used by annotate and the unchanged opencode-review integration. --hook is annotate-only.

  • VCS is auto-detected (JJ, GitButler, Git, and P4 where supported). --git forces plain Git; --gitbutler forces GitButler (requires the but CLI 0.21.0+). Running from a non-VCS parent folder that contains nested repos produces a combined workspace diff.
  • The default diff is "everything a PR would show now": merge-base of the trunk vs the working tree plus untracked files. --base <ref> opens the session against a different compare target (branch, origin/<branch>, tag, or commit) and --diff-type <type> opens it in a different mode (since-base, merge-base, branch, uncommitted, staged, unstaged, last-commit, local-vs-remote, all). Both are session-only: the reviewer can change either in the UI, and neither writes the user's saved defaults.
  • Reviewing one layer of a stacked branch? Pass --base <the branch below yours> — plannotator review --base feature/part-1 shows only what this layer adds, instead of everything since main.
  • Both flags are git-only: they error on jj, GitButler, Perforce, multi-repo workspace reviews, and PR URLs (a PR's base comes from the pull request). A --base ref that does not resolve is a startup error naming near-match branches, never a silently wrong diff.
  • --patch-file <path> reviews a static caller-supplied unified diff with no repository at all (use - to read it from stdin): the session serves the patch as-is with no file-system affordances that need a worktree. It cannot be combined with a PR/MR URL, --base, --diff-type, --git/--gitbutler, or --local/--no-local. Every working-tree affordance is off in that session (staging, hunk-context expansion, open-in-editor, code navigation, diff-type/base switching), and the endpoints behind them answer 400.
  • PR review (plannotator review https://github.com/owner/repo/pull/123, GitLab MR URLs too) needs an authenticated gh or glab CLI. --local (the default) builds a local checkout of the PR head in the background for full file access; --no-local skips it and reviews the platform diff only.
  • --tailscale publishes the loopback session over the user's tailnet via tailscale serve (HTTPS, never public) and prints the URL with a QR code. A publish failure exits nonzero instead of leaving the server hanging.

plannotator annotate

bash
plannotator annotate <target> [--markdown] [--no-jina] [--app | --static] [--render-html] [--tailscale] [--gate] [--json] [--hook]

Opens one document, page, or app in the annotation UI and returns the human's annotations on stdout.

Plain annotate is feedback-only: it shows Close but no Approve button. When the user asks to review, approve, accept, or gate a generated plan/spec/document saved as a file, always add --gate --json. Do not tell the user they can approve a plain annotate session. If the plan is being handed off through the host agent's native plan flow, do not launch annotate; let the plan-exit hook open the approval UI automatically.

Targets:

  • Markdown and text files: .md, .mdx, .txt.
  • Plain-text config and data files, rendered as text: .yaml, .yml, .json, .jsonc, .json5, .toml, .ini, .cfg, .conf, .properties, .csv, .tsv, .log, .xml, .env.example. .env itself is deliberately refused (it commonly holds secrets, and annotate history copies file contents). Source-code files belong to plannotator review, not annotate.
  • HTML files (.html, .htm): rendered as the raw page by default; --markdown converts to markdown instead. --render-html is accepted for compatibility; raw rendering is already the default.
  • URLs (https://...): fetched and converted via Jina Reader by default; --no-jina uses plain fetch plus Turndown instead.
  • Running local apps: a loopback http://localhost:PORT/ URL whose probe returns HTML opens in live-app mode (annotate the real running page). --app forces live mode and fails loudly when it cannot apply; --static forces the classic conversion pipeline. Non-loopback URLs always use the conversion pipeline.
  • Folders: plannotator annotate docs/ opens a file browser over the folder's supported files.

Single files are capped at 2MB. Files are read from disk at stable project paths; keep the reviewed source where it lives.

Argument tolerance: extra words are fine (plannotator annotate look at notes.md please opens notes.md), but two resolvable targets is an error naming both, and an unrecognized dashed token disables the tolerance so flag typos fail loudly. When nothing resolves in a plain multi-word invocation, the CLI prints an agent-addressed handoff on stdout and exits 0: read it, work out the concrete target, and re-run with that exact path or URL.

Strict gates and exit codes

For a machine-checkable approval gate, add --gate --json plus one or both strict flags:

bash
plannotator annotate report.md --gate --json --require-approval --result-file /tmp/decision.json
  • --require-approval: exit code reports the human outcome.
  • --result-file <path>: the stdout decision JSON is also published atomically to <path>. The parent directory must exist and the file must not; results resolve from the invocation cwd.

Exit codes under a strict flag (grep convention):

ExitMeaning
0Approved. The only success.
1The reviewer did not approve (annotated or dismissed); the decision record was still published.
2The gate itself failed: bad flag combination, startup failure (missing file, unreachable URL, oversized file), or the result file could not be published. Never treat as a reviewer outcome.
128+nKilled by signal n.

Without strict flags, startup failures exit 1 and the exit code carries no decision; parse the output instead. Both strict flags require --gate --json and reject --hook.

plannotator annotate-last

bash
plannotator annotate-last [--stdin] [--tailscale] [--gate] [--json] [--hook]
plannotator last

Opens the latest rendered assistant message from the current agent session in the annotation UI (last is an alias). The session log is discovered per host automatically; --stdin reads the content from stdin instead.

Do not print a commentary or status message immediately before running it: the command targets the latest rendered assistant message, so a preamble becomes the thing being annotated.

plannotator copilot-last

bash
plannotator copilot-last [--gate] [--json] [--hook]

The annotate-last variant for live GitHub Copilot CLI sessions (reads Copilot's session-state events). Normally invoked by the Copilot plugin's /plannotator-last command; use it only inside a Copilot CLI session.

plannotator archive

bash
plannotator archive

Opens a read-only browser over saved plan decisions (approved/denied badges) from the Plannotator data directory. No feedback comes back; the session ends when the user clicks Done.

plannotator guide

bash
plannotator guide list
plannotator guide export --id <savedGuideId> [--out <file.html>]
plannotator guide export --guide <guide.json> --patch <diff.patch> [--out <file.html>]
plannotator guide export --snapshot <snapshot.json> [--out <file.html>]
plannotator guide share --id <savedGuideId> [--public] [--ttl <7d|24h|30m|3600>] [--json]
plannotator guide unshare <id> --token <deleteToken>

Guided Reviews are AI-generated walkthroughs of a diff, produced inside the code review UI. The CLI works with saved ones:

  • list shows guides Plannotator has persisted for the current repo.
  • export writes one portable, self-contained HTML file (the viewer loads from guides.show). --guide + --patch exports a guide you authored yourself against a unified diff (--patch - reads stdin; validation is strict and names any file the guide references that the patch lacks). --out - writes to stdout. --viewer-url overrides the pinned viewer base.
  • share uploads the guide and prints a link. Encrypted by default: the key lives only in the URL fragment and the host stores ciphertext. --public stores it unencrypted so chat apps can unfurl a preview. --ttl sets an expiry; otherwise the link stays until unshare. A saved guide records its link, and a second share --id refuses rather than orphaning the first link's delete token.
  • unshare <id> --token <t> removes a link using the delete token printed at share time.

plannotator sessions

bash
plannotator sessions [--open [N]] [--clean]

Lists active Plannotator server sessions. --open reopens session N (default 1) in the browser, useful when a tab was closed mid-review. --clean drops stale entries.

Other subcommands

bash
plannotator setup-goal <interview|facts> <bundle.json | -> [--json]
plannotator uninstall [--purge] [--yes] [--dry-run]
plannotator improve-context
  • setup-goal opens the interview or facts-acceptance UI for /goal workflows; it is driven by the plannotator-setup-goal skill and takes a bundle JSON (- reads stdin). Do not hand-build bundles.
  • uninstall removes Plannotator-installed components (--purge also deletes local data; --yes is required without a TTY; --dry-run previews).
  • improve-context and install-runtime are internal integration commands (hook plumbing and managed runtime install). Never run improve-context directly; plannotator install-runtime agent-terminal exists for reinstalling the optional annotate-terminal runtime and is normally run by the installer.
  • Additional host-internal subcommands (the opencode-* and copilot-plan family) are invoked by their plugins, not by you.

Environment variables that change behavior

VariableUse
PLANNOTATOR_REMOTE=1Force remote mode (fixed port 19432, wide bind) for SSH/devcontainer sessions; 0 forces local. Unset means SSH auto-detection.
PLANNOTATOR_PORTFix the port instead of a random one.
PLANNOTATOR_ORIGINOverride agent-origin detection (claude-code, codex, opencode, pi, oh-my-pi, amp, droid, copilot-cli, gemini-cli, kiro-cli). Set it when launching Plannotator from a wrapper the detection cannot see through.
PLANNOTATOR_AI=disabledDisable Ask AI and agent-launched review surfaces in the UI.
PLANNOTATOR_SHARE=disabledDisable URL sharing, including guide share links.
PLANNOTATOR_DATA_DIRMove the data directory (default ~/.plannotator): plans, history, drafts, config.
PLANNOTATOR_BROWSEROpen sessions in a specific browser.

Posting annotations into a live session

A running plan-review session exposes a small HTTP API on its base URL for external annotations: POST /api/external-annotations adds inline annotations the reviewer sees immediately, with PATCH/DELETE for updates and an SSE stream at /api/external-annotations/stream. The UI's "copy agent instructions" action puts the full API contract for the current session, with the correct base URL, on the clipboard for handing to an agent or script. If the user pastes such instructions, follow them; do not invent endpoints beyond that contract.

Do not

  • Do not parse or scrape the browser UI's HTML; the CLI's stdout (and the documented HTTP API above) is the whole contract.
  • Do not use --hook outside a real hook context; use --json when you need structured output.
  • Do not run bare plannotator interactively; it is the hook entry point.
  • Do not guess flags. Run plannotator <command> --help when unsure; unknown dashed tokens make annotate fail on purpose.
  • Do not point plannotator annotate at source-code files or .env files; code goes through plannotator review, and .env is refused.
  • Do not start a strict gate (--require-approval) unless a human is actually there to review; the session blocks until they act.

附带文件

技能加载后,模型会按需读取这些文件。它们仅作为可读文件提供,绝不会被执行。

常见问题

Plannotator AI 技能有什么作用?

Reference for using the Plannotator CLI: plan review, code review, annotating files, URLs, folders, and running local apps, annotating the last assistant message, browsing archived plan decisions, and exporting or sharing Guided Reviews. Invoke when asked to use Plannotator for anything not covered by a more specific plannotator-* skill.

为什么在 TypingMind 中使用 Plannotator?

因为您只需安装一次,就能搭配任何模型使用。Plannotator 采用纯 Markdown 格式,而非特定提供商专用的代码,因此同一技能可用于 GPT-5、Claude、Gemini、Grok 或本地模型,甚至可以在聊天中途切换模型,而不会影响技能正常使用。TypingMind 使用您自己的 API 密钥,因此您直接向提供商付费,而不是按席位订阅;您的技能和聊天记录也都保留在您自己的存储空间中。

如何在 TypingMind 中安装 Plannotator?

在 TypingMind 中打开“插件 → 技能 → 从 GitHub 安装”,然后粘贴 https://github.com/backnotprop/plannotator/tree/main/apps/skills/core/plannotator。TypingMind 会读取其中的 SKILL.md,打包相关文件,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 Plannotator?

您在 TypingMind 中连接的任何模型都可以。AI 技能采用纯 Markdown 指令,而非特定提供商专用的代码,因此 GPT、Claude、Gemini、Grok 和本地模型都能在请求匹配时加载此技能。

Plannotator 可以搭配多少个 AI 模型使用?

数量不限。只要模型支持技能,您就可以搭配 Plannotator 使用,包括 GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 等,都可在 TypingMind 中使用您自己的 API 密钥接入。

Plannotator AI 技能免费吗?

是的。该技能源自 backnotprop 在 GitHub 上以 Apache-2.0 许可证发布的项目。您只需向自己的 AI 提供商支付所用 Token 的费用。

什么是 AI 技能?

AI 技能是一组可复用的指令,用于教会 AI 模型完成某项特定任务。它遵循开放的 Agent Skills 格式:包含名称和描述的 SKILL.md 文件,以及模型可能需要的脚本、模板或参考文件。模型仅在您的请求与技能匹配时才会读取这些指令,因此已安装的技能在使用前不会产生任何费用。

AI 技能与插件或 MCP 服务器有何不同?

插件或 MCP 服务器为模型提供可调用的新工具,也就是在某处运行并返回结果的代码。AI 技能则为模型提供知识和流程:如何处理任务、遵循哪些步骤,以及怎样的输出才算优质。技能采用纯 Markdown 格式,因此不需要服务器、API 密钥或运行时环境,并且适用于任何模型。

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇