Agent Skills › gmickel/flow-next › flow-next-map

flow-next-map

GitHub

封装 clawpatch map 命令,为仓库生成语义特征索引。自动处理安装检测、初始化及映射调用,支持启发式或 LLM 源模式,输出标准化 JSON 供后续模块读取。

plugins/flow-next/skills/flow-next-map/SKILL.md gmickel/flow-next

触发场景

需要分析代码库结构时 执行 /flow-next:map 指令时

安装

npx skills add gmickel/flow-next --skill flow-next-map -g -y
更多选项

非标准路径

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

不安装直接使用

npx skills use gmickel/flow-next@flow-next-map

指定 Agent (Claude Code)

npx skills add gmickel/flow-next --skill flow-next-map -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-map",
    "description": "Wrap `clawpatch map` to produce a semantic feature index of the repo (~20 languages, persisted at `.clawpatch\/features\/*.json`). Detects install, runs `clawpatch init` when `.clawpatch\/` absent, invokes provider-free `clawpatch map --source heuristic` by default; `--source auto|agent` flows through as passthrough. Opt-in enrichment — scouts and prime read the resulting index, but flowctl never depends on clawpatch.",
    "allowed-tools": "Read, Bash, Grep, Glob, Write, Edit",
    "user-invocable": false
}

/flow-next:map — wrap clawpatch map for a semantic feature index

Read workflow.md for the bundled-script invocation and summary.

Wrap the upstream clawpatch CLI's map subcommand. Default invocation is provider-free (--source heuristic) — zero LLM calls, zero API spend, deterministic mapper. Output lands at .clawpatch/features/*.json (Zod-validated upstream, schemaVersion: 1). Scout enrichment and the /flow-next:prime DE7 nudge read the resulting index; this skill is the install/init/invoke surface.

Role: thin shell-out wrapper. flowctl never imports or requires clawpatch; the skill is the only flow-next surface that touches it.

Preamble

CRITICAL: flowctl is BUNDLED — NOT installed globally. which flowctl will fail (expected). Define once; subsequent blocks (here and in workflow.md) 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"

Inline skill (no context: fork) — the map skill is fully non-interactive: install detection, version-range guard, clawpatch init, .clawpatch/.gitignore skeleton, and clawpatch map invocation all proceed without prompting the user. No blocking-question tool is required or used.

Input

Arguments: $ARGUMENTS

Format: [--source <heuristic|auto|agent>] [-- <extra clawpatch args>]

  • Default (no args) → clawpatch map --source heuristic (provider-free, deterministic). Heuristic targets conventional app/framework layouts; unconventional repos (CLI tools, plugins, markdown/docs-heavy, non-standard monorepos) may map to 0 features — The summary surfaces a --source=auto|agent suggestion when that happens.
  • --source auto|agent → passthrough to clawpatch; user must have CLAWPATCH_PROVIDER configured for these paths (clawpatch's own concern, not ours).
  • -- → terminator; tokens after flow to clawpatch map (e.g. --since-ref origin/main, --paths src/).

Passthrough boundary. The slash-command host delivers $ARGUMENTS as a single string; the skill word-splits on whitespace. Passthrough is therefore token-level (whitespace-separated), not full shell-verbatim — tokens containing literal spaces or shell metacharacters that require shell quoting will not survive. Globs (*, ?) are protected from expansion (set -f before the parse) so they reach clawpatch untouched. Users needing complex quoting should run clawpatch map directly.

flow-next's review backend config (codex / copilot / cursor / claude / host / none) stays out of clawpatch. clawpatch's provider matrix (codex / acpx / claude / cursor / grok / opencode / pi) is orthogonal — a run that sets CLAWPATCH_PROVIDER from the flow-next backend has broken this. The script echo reports the backend as informational only.

Version pin

The supported clawpatch range lives in one place, SUPPORTED_MIN and SUPPORTED_MAX_EXCL in the bundled script (scripts/map.sh). It parses clawpatch --version with a tolerant (\d+\.\d+\.\d+) regex and compares against this range. Outside-range → warn one line to stderr and degrade (continue). Never block. Re-verify on each clawpatch minor release.

clawpatch is pre-1.0 with frequent minor releases. The README forecasts breaking changes between minor releases — tolerant parsing matters.

Workflow

Invoke the bundled script as workflow.md directs. It handles install detection, the version warning, init, ignore skeleton, streaming map and mechanical counts. The host explains the result and optional next steps.

Sharing contract — local-only by design

The .clawpatch/.gitignore skeleton this skill writes is * + !.gitignore — everything under .clawpatch/ is git-ignored; only the .gitignore itself is tracked. The feature index is local-per-developer, not committed.

This is a deliberate design choice for a pre-1.0 mapper:

  • No PR review noise from regenerated feature data on every clawpatch map run.
  • No merge conflicts on features/*.json when two branches mapped at different SHAs.
  • No coupling of PR review to mapper-output drift as clawpatch schema bumps land (weekly minor releases at the time of writing).
  • Onboarding cost is low — --source heuristic is a fast filesystem walk; new contributors regenerate locally in seconds.

Teams that want a shared, in-repo feature index can edit .clawpatch/.gitignore directly (e.g. !features/, !project.json, ignore only .cache/ and *.log). The skill is idempotent and won't clobber a customized .gitignore on re-run. This is unsupported — be prepared for review noise and merge conflicts; document the choice in your team's CLAUDE.md / AGENTS.md. See flow-next.dev/skills/map for the full trade-off table.

Forbidden

  • Auto-installing clawpatch. The skill detects and instructs; users install with their own permission. Global npm installs are user-consent territory.
  • Proxying flow-next's review backend into CLAWPATCH_PROVIDER. Orthogonal matrices. clawpatch users configure clawpatch directly.
  • Auto-upgrading --source to auto or agent when heuristic coverage looks weak. Users opt up explicitly via --source.
  • Touching the repo .gitignore. The .clawpatch/.gitignore skeleton is self-contained inside .clawpatch/ so a full deletion of that directory removes both data and ignore rules in one step.
  • Importing or requiring clawpatch from flowctl. flowctl never references this skill or clawpatch — uninstall promise (rm -rf .flow/) stays intact and zero-dep STRATEGY track is preserved.
  • Network calls beyond what clawpatch itself does. The wrap is local-only; clawpatch's network behavior is upstream's concern.

版本历史

  • 259dbe6 当前 2026-11-03 09:55

    更新版本范围支持至 clawpatch 0.8.x

  • 4eba935 2026-10-19 16:50
  • 7db792a 2026-09-28 08:14

    更新flowctl路径定义逻辑,增强对插件根目录的自适应识别能力;优化输入解析与passthrough边界处理说明。

  • 8baa538 2026-08-20 08:00

同 Skill 集合

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-features/SKILL.md
plugins/flow-next/codex/skills/flow-next-flow/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-prose/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-rolling/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-export-context/SKILL.md
plugins/flow-next/skills/flow-next-features/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-land/SKILL.md
plugins/flow-next/skills/flow-next-make-pr/SKILL.md
plugins/flow-next/skills/flow-next-pilot/SKILL.md
plugins/flow-next/skills/flow-next-plan-review/SKILL.md

元信息

文件数
0
版本
259dbe6
Hash
33a5604a
收录时间
2026-08-20 08:00

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.156.0. UTC+08:00, 2026-11-06 03:23
浙ICP备14020137号-1