/pathfinder:pathfinderfrom Pathfinder
Maps user journeys in web and mobile codebases, visualizes UI/E2E test coverage as color-coded Mermaid diagrams, and generates framework-correct tests to fill gaps.
Ships in Pathfinder. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Map every user journey. See what's tested. Fill the gaps. Track progress.
python3 "${CLAUDE_SKILL_DIR}/scripts/pathfinder-init.py"
This auto-detects your test directory and creates pathfinder/ inside it (e.g., e2e/tests/pathfinder/).
For monorepos, run init in each module. Use ${CLAUDE_SKILL_DIR}/scripts/aggregate.py for a combined view.
/map -> /blaze -> /scout -> /summit
| Command | Phase | What happens |
|---|---|---|
/map | Map | Crawl code, discover all user journeys, create journeys.json |
/blaze | Blaze | Generate Mermaid flowcharts, decision tree, and coverage delta |
/scout | Scout | Write UI tests for untested steps |
/summit | Summit | Run tests, compare before/after, finalize coverage |
Each command is a skill — invoke it directly or let Claude chain them as needed.
Not every situation needs the full cycle. Use what fits:
| User wants | Commands to run |
|---|---|
| "What's our test coverage?" | /map then /blaze (discover + visualize) |
| "Write tests for the gaps" | /scout (assumes journeys.json exists) |
| "Update the coverage diagrams" | /blaze (regenerate from existing journeys.json) |
| "Full coverage sprint" | /map -> /blaze -> /scout -> /summit |
| "Show progress since last sprint" | /blaze (auto-compares with baseline) |
If journeys.json doesn't exist yet, always start with /map.
Each journey gets its own Mermaid flowchart with colour-coded nodes:
All journeys merged into a single flowchart showing every branching path:
When a baseline exists, diagrams show:
A legend table is included at the top of every generated blazes.md explaining all symbols, colours, and arrow types.
Read references/ui-testing.md for selector strategies, wait patterns, and visual regression.
Framework-specific patterns (only load the one matching the project):
All scripts are Python 3 CLIs in the scripts/ directory of this skill. They output JSON to stdout, errors to stderr. Reference them via ${CLAUDE_SKILL_DIR}/scripts/.
| Script | Purpose |
|---|---|
scripts/pathfinder-init.py | Initialize Pathfinder in a project |
scripts/scan-test-coverage.py . | Scan existing tests and map to routes/screens |
scripts/detect-ui-framework.py . | Auto-detect UI test framework |
scripts/generate-ui-test.py ID "desc" framework --auto | Generate or append a UI test |
scripts/generate-diagrams.py journeys.json | Generate flowcharts, decision tree, and delta |
scripts/generate-diagrams.py journeys.json --save-baseline | Reset baseline to current state |
scripts/generate-diagrams.py journeys.json --clear-baseline | Remove baseline (next run creates fresh one) |
scripts/coverage-score.py [<testDir>/pathfinder/journeys.json] | Compute coverage percentage (auto-detects when omitted) |
scripts/snapshot-compare.py capture|compare name image | Visual regression |
scripts/aggregate.py [root] | Discover all modules, merge coverage summary |
scripts/validate-journeys.py <path> | Validate journeys.json structure and fields |
| File | Purpose |
|---|---|
<testDir>/pathfinder/config.json | Project config (framework, test directory, auth) |
<testDir>/pathfinder/journeys.json | Journey map -- source of truth |
<testDir>/pathfinder/journeys-baseline.json | Baseline snapshot for before/after comparison (auto-created) |
<testDir>/pathfinder/blazes.md | Mermaid coverage diagrams (auto-generated) |
assets/journeys-template.json | Starter template for journeys.json |
Optional <testDir>/pathfinder/config.json (schema: schema/config.schema.json):
{
"$schema": "https://raw.githubusercontent.com/srpadrono/Pathfinder/main/skills/pathfinder/schema/config.schema.json",
"project": "my-app",
"framework": "playwright",
"testDir": "e2e/tests",
"auth": { "storageState": "e2e/.auth/user.json" },
"coverage": { "thresholds": { "excellent": 80, "acceptable": 50 }, "failUnder": null, "countPartialAsTested": false },
"ignore": ["**/admin/**"],
"commands": { "test": "npx playwright test" },
"selectors": { "strategy": "accessibility-first", "testIdAttribute": "data-testid" }
}
All fields are optional — if absent, Pathfinder auto-detects from framework config files. Read this file before scoring or generating tests, and honor it:
coverage.thresholds / failUnder / countPartialAsTested drive coverage-score.py (pass --fail-under N to gate CI).ignore globs are skipped by scan-test-coverage.py during mapping.commands.test is the command to run in the summit phase.selectors guide the test stubs you write in the scout phase.Both config.json and journeys.json are JSON-Schema validated (schema/).
Pathfinder works across web, mobile, and desktop. The terminology adapts:
| Concept | Web | Mobile (iOS/Android/Flutter) |
|---|---|---|
| Location | Route (/dashboard) | Screen (DashboardView) |
| Navigation | URL change | Push/pop, tab switch |
| Entry point | app/ or pages/ directory | App launch, deeplink |
The journey map uses "screen" in the screen field regardless of platform -- for web apps this is the component/page name, for mobile it's the view/screen name.
<testDir>/pathfinder/config.json or install one./map first./map.() are auto-escaped to []; all labels are double-quoted.agents/openai.yaml (opens in a new tab)assets/journeys-template.json (opens in a new tab)references/cypress.md (opens in a new tab)references/detox.md (opens in a new tab)references/espresso.md (opens in a new tab)references/flutter-test.md (opens in a new tab)references/maestro.md (opens in a new tab)references/playwright.md (opens in a new tab)references/ui-testing.md (opens in a new tab)references/xcuitest.md (opens in a new tab)schema/config.schema.json (opens in a new tab)schema/journeys.schema.json (opens in a new tab)scripts/aggregate.py (opens in a new tab)scripts/coverage-score.py (opens in a new tab)scripts/detect-ui-framework.py (opens in a new tab)scripts/generate-diagrams.py (opens in a new tab)scripts/generate-ui-test.py (opens in a new tab)scripts/pathfinder-init.py (opens in a new tab)scripts/pathfinder_config.py (opens in a new tab)scripts/pathfinder_paths.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub srpadrono/pathfinder --plugin pathfinder5 skills in this plugin
/blazeGenerates Mermaid flowcharts and decision trees from journeys.json showing test coverage with before/after comparison. Use when visualizing coverage, generating diagrams, or showing progress since last sprint./mapCrawls a codebase to discover all user journeys and creates a journey map (journeys.json) with test coverage status. Use when starting UI test coverage work, auditing existing coverage, or exploring a new codebase's user flows./scoutWrites UI tests for untested steps in the journey map using framework-correct selectors, waits, and patterns. Use when writing tests to fill coverage gaps or generating E2E tests for untested journey steps.Other plugins' skills for the same job