---
slug: "vladstudio-pi-skim"
source_type: "readme"
source_url: "https://cdn.jsdelivr.net/gh/vladstudio/pi-skim@main/README.md"
repo: "https://github.com/vladstudio/pi-skim"
source_file: "README.md"
branch: "main"
---
# @vladstudio/pi-skim

Pi extension adding a `skim` tool: structural overview of JS/JSX/TS/TSX/Swift files — exports, signatures, hooks, behavior — via [ast-grep](https://ast-grep.github.io/), without reading full source.

Use instead of `read` when exploring code or understanding a file's purpose. Pass multiple paths to batch.

## What it extracts

- **JS/TS**: imports, exports (default/named/const/type/interface), private functions, React hooks (`useX`), behavior (component, `'use client'`/`'use server'`, `fetch`, async, `useEffect`, `redirect`, `router.push`, storage).
- **Swift**: imports, exports (`public`/`open`/`package`), types (class/protocol/typealias/extension), members (functions/init/subscript/properties), behavior (await/async/throws/Task, SwiftUI, Combine).

## Supported extensions

`.js .jsx .mjs .cjs .ts .tsx .mts .cts .swift`

## Install

```bash
pi install npm:@vladstudio/pi-skim
```

## Example

```
extensions/skim/index.ts

imports:
  {SgNode} from "@ast-grep/napi"
  {js, parse, registerDynamicLanguage, ts, tsx} from "@ast-grep/napi"
  swift from "@ast-grep/lang-swift"

exports:
  default: skimExtension(pi)
  skimExtension(pi)

behavior:
  React component (returns JSX)
```

## License

MIT