> **Can't find what you're looking for?** Use `search_docs` on the docs MCP server at `https://www.getfoundry.sh/api/mcp` to find what you need.
>
> **Have feedback?** Use `submit_feedback` on the same MCP server.

## `skip`

### Signature

```solidity
function skip(bool skipTest) external;
```

### Description

Marks a test as skipped conditionally. Must be called at the top of the test to ensure it is skipped without any execution.

If called with `false`, the test will not be skipped.

Tests marked as skipped appear with a `[SKIPPED]` label in the test runner output.

### Parameters

| Parameter  | Type   | Description                       |
|------------|--------|-----------------------------------|
| `skipTest` | `bool` | Whether to skip the test          |

### Examples

```solidity [test/Skip.t.sol]
function testSkip() public {
    vm.skip(true);
    // This revert will not be reached as this test will be skipped
    revert("Should not reach this revert");
}

function testNotSkip() public {
    vm.skip(false);
    // This revert will be reached as this test will not be skipped
    revert("Should reach this revert");
}
```

### Gotchas

In a [table test](/forge/testing#skipping-a-table-row), `vm.skip(true)` skips the entire test, not just the current row, and prevents later rows from running. To omit one row while continuing with the remaining rows, return early from the table test instead. The returned row counts as a successful run, not a skipped test.

:::warning
`vm.skip` must be called at the very top of the test function. Any code before it will still execute.
:::
