---
title: "critical-paths"
description: "Claude Code plugin for persona-based user testing. Simulates Boomers, Millennials, Gen Z, and Gen Alpha users to find UX issues before real users do."
canonical_url: "https://skilld.dev/gh/ncklrs/claude-chrome-user-testing/critical-paths"
last_updated: "2026-09-30T03:19:26.000Z"
---

> Index of every page on this site: [llms.txt](https://skilld.dev/llms.txt)

> **Skill from skilld.dev.** Follow the user's requested action.
> If the user asked to fork this Skill, follow the fork workflow below. Do not execute the Skill instructions while copying it.
> Otherwise, follow the instructions below for this session. You do not need to install anything.
>
> If the user asked to install this Skill, run `npx skilld install ncklrs/claude-chrome-user-testing/critical-paths`. Install writes the Skill files into the project, so every session loads them.
>
> ## Fork workflow
>
> A fork creates an editable local Skill with its original author and licence. The request authorizes copying and local installation.
> 1. Check `./skills/critical-paths`, the project lockfile, and selected Agent targets together. If the local directory or installed Skill exists, stop. Never overwrite an existing directory or Agent target.
> 2. Read [source metadata](https://skilld.dev/api/v1/skills/ncklrs/claude-chrome-user-testing/critical-paths) once. Use sourceUrl, sourceCommit, skillPath, sourceGone, and license. If the source is gone or its path is missing, stop. If license is null, read licence files at the source commit.
> 3. Fetch only the source commit into a temporary Git repository. Do not clone full history. Derive repository_url from sourceUrl, including repository renames. If sourceCommit is absent, resolve the sourceUrl ref once. Set source_commit to that actual commit. Run these commands in one shell call:
>
> ```sh
> git init --quiet "$temporary_dir"
> git -C "$temporary_dir" fetch --quiet --depth=1 "$repository_url" "$source_commit"
> git -C "$temporary_dir" checkout --quiet --detach FETCH_HEAD
> ```
>
> Read applicable licence declarations and notices at that commit. If copying is not permitted, report the restriction and stop.
> 4. Inspect source entries together, then copy the directory containing skillPath into `./skills/critical-paths`. Use the user's path if selected. Keep the original SKILL.md, relative links, scripts, binary assets, and executable modes. Exclude .git metadata. Reject symlinks and paths outside the Skill directory. After checking entries, use cp -a where available. A regular source directory needs no custom copy script. Do not save this page wrapper as SKILL.md.
> Preserve author credit, notices, and applicable licence files from repository or parent directories. Add PROVENANCE.md with the Skill page, source URL, actual commit, original path, and licence. Retain any existing PROVENANCE.md and record new provenance separately. Batch source inspection, copying, and provenance work where practical.
> 5. In the project root, run `skilld install ./skills/critical-paths --mode copy --plain`. If skilld is unavailable, use `npx skilld install ./skills/critical-paths --mode copy --plain`. This known command needs no help lookup. Install does not support --json. Use detected Agent targets, or add --agent for the targets the user selected. Install the local path, never the upstream selector. If installation fails, preserve the local copy and report the exact failure.
> 6. Confirm the local lockfile source and installed Agent copies once. Report the local path, actual commit, and Agent targets. After edits, reinstall the same local path. Upstream updates must not replace it. Do not publish or push unless the user asks.

# Critical Paths Skill

Test must-work user journeys defined in project configuration. Critical paths are essential flows that must always function correctly.

## What is a Critical Path?

A critical path is a user journey that:
- Must work for the site/app to be usable
- Represents core business functionality
- Would cause significant harm if broken
- Should be tested before every deployment

## Examples of Critical Paths

| Site Type | Critical Paths |
|-----------|----------------|
| E-commerce | Purchase flow, Account creation, Cart |
| SaaS | Signup, Login, Core feature usage |
| Content | Navigation, Search, Article viewing |
| Banking | Login, Transfer, Balance check |

## Path Definition Schema

### Full Schema

```json
{
  "paths": [
    {
      "name": "string (required)",
      "description": "string (required)",
      "persona": "persona-id (required)",
      "priority": "critical|high|medium|low (optional, default: high)",
      "timeout": "number in seconds (optional, default: 120)",
      "steps": [
        {
          "action": "navigate|task|verify|wait|input",
          "...action-specific fields"
        }
      ],
      "onFailure": "continue|stop (optional, default: continue)"
    }
  ]
}
```

### Step Actions

#### navigate
Navigate to a URL path.

```json
{
  "action": "navigate",
  "to": "/path",
  "waitFor": "load|networkidle (optional)"
}
```

#### task
Perform a task using the persona's behavior.

```json
{
  "action": "task",
  "do": "description of task to perform",
  "timeout": 30
}
```

#### verify
Verify something exists or is true.

```json
// Verify element exists
{ "action": "verify", "element": "description of element" }

// Verify text appears
{ "action": "verify", "text": "exact text to find" }

// Verify URL matches
{ "action": "verify", "url": "/expected-path" }

// Verify URL contains
{ "action": "verify", "urlContains": "confirmation" }
```

#### wait
Wait for a condition.

```json
// Wait for seconds
{ "action": "wait", "seconds": 2 }

// Wait for element
{ "action": "wait", "for": "element description" }

// Wait for navigation
{ "action": "wait", "for": "page load" }
```

#### input
Enter specific data into a field.

```json
{
  "action": "input",
  "field": "field description or selector",
  "value": "value to enter"
}
```

## Execution Logic

### Path Execution

```
function executePath(path, baseUrl):
  results = { steps: [], status: 'pending' }

  loadPersona(path.persona)
  startTime = now()

  for step in path.steps:
    stepResult = executeStep(step, baseUrl)
    results.steps.append(stepResult)

    if stepResult.status == 'fail':
      results.status = 'fail'
      results.failedAt = step
      captureScreenshot()
      if path.onFailure == 'stop':
        break
      else:
        return results

  results.status = 'pass'
  results.duration = now() - startTime
  return results
```

### Step Execution

```
function executeStep(step, baseUrl):
  switch step.action:
    case 'navigate':
      navigate(baseUrl + step.to)
      return { status: 'pass' }

    case 'task':
      success = performTaskAsPersona(step.do)
      return { status: success ? 'pass' : 'fail' }

    case 'verify':
      found = verifyCondition(step)
      return { status: found ? 'pass' : 'fail' }

    case 'wait':
      waitForCondition(step)
      return { status: 'pass' }

    case 'input':
      fillField(step.field, step.value)
      return { status: 'pass' }
```

## Priority Handling

### Execution Order

1. Critical paths first
2. High priority second
3. Medium priority third
4. Low priority last

### Failure Impact

| Priority | On Failure | Report Level |
|----------|------------|--------------|
| critical | Major alert | CRITICAL |
| high | Alert | ERROR |
| medium | Warning | WARNING |
| low | Note | INFO |

## Report Generation

### Data Structure

```javascript
const pathReport = {
  summary: {
    total: 3,
    passed: 2,
    failed: 1,
    skipped: 0
  },
  results: [
    {
      name: 'purchase-flow',
      status: 'pass',
      duration: 45,
      steps: [
        { action: 'navigate', status: 'pass', duration: 2 },
        { action: 'task', status: 'pass', duration: 15 },
        // ...
      ]
    },
    {
      name: 'password-reset',
      status: 'fail',
      duration: 15,
      failedAt: { step: 4, action: 'task', error: 'Button not clickable' },
      screenshot: 'path-password-reset-fail.png'
    }
  ],
  actionRequired: [
    {
      priority: 'high',
      path: 'password-reset',
      issue: 'Form submission broken',
      recommendation: 'Check submit button handler'
    }
  ]
};
```

### Report Sections

1. **Summary**: Pass/fail counts
2. **Results**: Each path's outcome
3. **Failures**: Detailed failure information
4. **Action Required**: Prioritized fix list
5. **Screenshots**: Evidence of failures

## Integration with CI/CD

### Fail-Fast Mode

When `--fail-fast` is enabled:
- Stop testing after first failure
- Report what was tested so far
- Mark remaining paths as skipped
- Useful for quick validation

### Exit Status Interpretation

```
All pass + no critical failures = SUCCESS
Any critical failure = FAILURE
Only non-critical failures = WARNING (could be configurable)
```

## Template Path Definitions

### E-commerce

```json
{
  "paths": [
    {
      "name": "guest-purchase",
      "description": "Guest checkout flow",
      "persona": "impulse-buyer",
      "priority": "critical",
      "steps": [
        { "action": "navigate", "to": "/" },
        { "action": "task", "do": "find a product" },
        { "action": "task", "do": "add to cart" },
        { "action": "task", "do": "go to cart" },
        { "action": "task", "do": "proceed to checkout" },
        { "action": "task", "do": "fill shipping info" },
        { "action": "verify", "element": "payment form" }
      ]
    },
    {
      "name": "product-search",
      "description": "Search for products",
      "persona": "comparison-shopper",
      "priority": "high",
      "steps": [
        { "action": "navigate", "to": "/" },
        { "action": "task", "do": "search for a product" },
        { "action": "verify", "element": "search results" },
        { "action": "task", "do": "click a result" },
        { "action": "verify", "element": "product details" }
      ]
    }
  ]
}
```

### SaaS Application

```json
{
  "paths": [
    {
      "name": "signup-to-dashboard",
      "description": "New user onboarding",
      "persona": "genz-digital-native",
      "priority": "critical",
      "steps": [
        { "action": "navigate", "to": "/signup" },
        { "action": "task", "do": "complete registration" },
        { "action": "verify", "urlContains": "dashboard" },
        { "action": "verify", "element": "welcome message" }
      ]
    },
    {
      "name": "login-flow",
      "description": "Existing user login",
      "persona": "busy-executive",
      "priority": "critical",
      "steps": [
        { "action": "navigate", "to": "/login" },
        { "action": "input", "field": "email", "value": "test@example.com" },
        { "action": "input", "field": "password", "value": "testpass123" },
        { "action": "task", "do": "submit login" },
        { "action": "verify", "element": "dashboard or main app" }
      ]
    }
  ]
}
```

## Best Practices

1. **Start small**: Define 2-3 critical paths first
2. **Be specific**: Clear step descriptions help the agent
3. **Match personas**: Use personas that would actually do this journey
4. **Update regularly**: Keep paths in sync with features
5. **Test the tests**: Run paths manually to verify they make sense
6. **Prioritize correctly**: Reserve "critical" for truly essential flows
