Skip to main content
skill CX Codex

flow-next-map — Claude Code skill: semantic feature index

flow-next-map wraps clawpatch map to build a semantic index of functions and modules across ~20 languages. Runs provider-free by default.

MIT ★ 730 updated 2026-10-29

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin marketplace add gmickel/flow-next
/plugin install flow-next@flow-next
Open on GitHub

What flow-next-map does

The skill invokes clawpatch map and persists the index to .clawpatch/features/*.json. Default mode (--source heuristic) analyses project structure heuristically — no LLM calls, no API spend, deterministic output. For unconventional repos (CLI tools, plugins, docs-heavy projects), you can explicitly pass --source auto or --source agent, but those require a configured CLAWPATCH_PROVIDER in clawpatch itself.

The skill checks for clawpatch (version >=0.4.0 <0.5.0 supported), initialises .clawpatch/ on first run, and writes a .gitignore with a wildcard inside — the entire index stays local, never committed. This prevents PR noise and merge conflicts. flowctl never imports clawpatch: the skill is the only touch point, and you can delete it along with .flow/ without leaving traces.

Arguments after -- pass through to clawpatch map (e.g. --since-ref origin/main, --paths src/). Globs like * and ? reach clawpatch intact, but spaces and shell metacharacters won't survive — complex cases are easier to run clawpatch map directly.

What it helps with

  • build a semantic index of functions and modules in the repo
  • analyse project structure without calling an LLM
  • prepare a codebase map for scouts and /flow-next:prime
  • initialise clawpatch in a new project
  • re-index only changed files with --since-ref

Example prompts for the agent

  • Build a feature index of the repo with flow-next-map
  • Run /flow-next:map with --source heuristic
  • Re-index changes since the last commit: /flow-next:map -- --since-ref HEAD~1

How to install flow-next-map

1Plugin marketplace

/plugin marketplace add gmickel/flow-next
/plugin install flow-next@flow-next

This installs the whole flow-next plugin with all its skills

2Skills CLI (Vercel)

npx skills add gmickel/flow-next --skill flow-next-map -a claude-code

3Manually: put the files in place

~/.claude/skills/flow-next-map/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/flow-next-map/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about flow-next-map

How do I install flow-next-map in Claude Code?

Add the repository with /plugin marketplace add gmickel/flow-next, install the plugin with /plugin install flow-next@flow-next, then add the skill via npx skills add gmickel/flow-next --skill flow-next-map -a claude-code. The SKILL.md path is ~/.claude/skills/flow-next-map/SKILL.md.

What does flow-next-map do?

It wraps clawpatch map and builds an index of functions, classes, and modules at .clawpatch/features/*.json. Default mode is heuristic — fast structural analysis without LLM calls. flow-next scouts and /flow-next:prime read the index, but flowctl itself does not depend on clawpatch.

Can I commit .clawpatch/features/ to the repo?

The skill creates .clawpatch/.gitignore with a wildcard — the entire directory is ignored, index stays local. This avoids PR noise and merge conflicts. You can edit .gitignore to allow !features/, but then you'll face drift on every clawpatch map run — officially unsupported.

Source text

SKILL.md · MIT
---
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.
user-invocable: false
allowed-tools: Read, Bash, Grep, Glob, Write, Edit
---

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

**Read [workflow.md](workflow.md) for the bundled-script invocation and summary.**

Wrap the upstream [`clawpatch`](https://github.com/openclaw/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`:

```bash
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

```
SUPPORTED_CLAWPATCH=">=0.4.0 <0.5.0"
```

Single source of truth for the supported clawpatch range. The bundled script 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 (v0.4.0, 2026-05-22; weekly minor releases). The README forecasts breaking changes between minor releases — tolerant parsing matters.

## Workflow

Invoke the bundled script as [workflow.md](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](https://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.

© Gordon Mickel · MIT · gmickel/flow-next

Similar skills

All skills for Agent setup: memory, context, orchestration →

From the same set70

The whole set →
flow-next-plan flow-next-plan is a Claude Code skill that turns a feature request or existing spec into repository-based tasks before implementation; it does not write code. CX Codex +1 ★ 730repo stars flow-next flow-next is a Claude Code skill for managing project tasks and specs in .flow/, checking statuses, creating tasks, and closing completed work. It shows what is planned and ready. CX Codex +1 ★ 730repo stars github-scout github-scout finds code patterns, implementations, and issue reports on GitHub. Helpful when you need authoritative references before writing code. CX Codex ★ 730repo stars flow-next-prospect flow-next-prospect is a Claude Code skill that finds and ranks ideas from a repository’s contents. It runs when asked to brainstorm what to build next. CX Codex +1 ★ 730repo stars security-scout security-scout inspects GitHub branch protection, CODEOWNERS, secret scanning, and automated dependency updates before agent tasks begin. CX Codex ★ 730repo stars flow-next-tracker-sync flow-next-tracker-sync projects a flow-next spec onto a Linear, GitHub, GitLab or Jira issue and keeps body, status and comments in sync, with the spec staying authoritative. CX Codex +1 ★ 730repo stars claude-md-scout claude-md-scout audits CLAUDE.md and AGENTS.md files on an eight-point substance scale, verifying real commands and repo specifics before agents start working. CX Codex ★ 730repo stars flow-gap-analyst The flow-gap-analyst subagent examines a short feature brief for unclear requirements, missing steps, and edge cases. Use it to surface questions before implementation begins. CX Codex ★ 730repo stars

Project sponsors

Companies that keep this analytics open