# Cuda Webdoc Search

> Search CUDA-X library documentation (cuBLAS, cuTENSOR, cuTensorNet, cuSOLVER, etc.) to find API symbols, functions, and types. Use when you need to look up CUDA library APIs, discover available functions, or find documentation URLs for specific operations.

- **Type:** Skill
- **Install:** `agentstack add skill-ultimatile-cuda-x-skills-cuda-webdoc-search`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [ultimatile](https://agentstack.voostack.com/s/ultimatile)
- **Installs:** 0
- **Category:** [Search](https://agentstack.voostack.com/c/search)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [ultimatile](https://github.com/ultimatile)
- **Source:** https://github.com/ultimatile/cuda-x-skills/tree/main/skills/cuda-webdoc-search

## Install

```sh
agentstack add skill-ultimatile-cuda-x-skills-cuda-webdoc-search
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# CUDA-X Documentation Search Guide

## Overview

Search and discover APIs across CUDA-X library documentation by querying Sphinx inventory files. Use this skill when you need to find specific CUDA library functions, check available APIs, or get documentation links.

## Setup

```bash
uv tool install "cuda-webdoc-search @ git+https://github.com/ultimatile/cuda-x-skills.git#subdirectory=skills/cuda-webdoc-search"
```

After installation, `cws` is available as a standalone command. For one-shot usage without installing:

```bash
uvx --from "cuda-webdoc-search @ git+https://github.com/ultimatile/cuda-x-skills.git#subdirectory=skills/cuda-webdoc-search" cws search cublas --stats
```

## When to Use

- Finding CUDA library APIs (e.g., "what SVD functions does cuTensorNet have?")
- Checking if a specific function exists in a library
- Getting documentation URLs for CUDA APIs
- Exploring available operations in a library

## Quick Reference

### Check Available Domains First

Before searching, check what domains (API types) are available:

```bash
cws search  --stats
```

This returns domain counts: `cpp` (C++ APIs), `c` (C APIs), `py` (Python bindings), `std` (doc labels).

### Search for APIs

```bash
cws search  --domains  --keywords "" --fuzzy --limit 20
```

### Keyword Syntax (fzf subset)

- Space-separated terms are **AND** (all must match): `--keywords "SVD batch"`
- Use `|` for **OR** (requires shell quoting): `--keywords "SVD | QR"`
- AND binds tighter than OR: `--keywords "a b | c"` = (a AND b) OR c
- **Note**: Only AND/OR via `|` is supported. fzf operators `^`, `'`, `!`, `$` are not available.

### Available Libraries

See `registry.toml` for the full list. Common ones:

- `cuquantum` - cuTensorNet, cuStateVec (quantum/tensor network)
- `cublas` - BLAS operations
- `cusolver` - Dense/sparse solvers
- `cusparse` - Sparse matrix operations
- `cufft` - FFT operations
- `cudnn` - Deep learning primitives
- `cutlass` - GEMM templates
- `cuda_math` - Math functions

## Workflow

1. **Identify the library**: Determine which CUDA library likely contains the API
2. **Check domains**: Run `--stats` to see available domain types
3. **Search**: Use `--keywords` with `--fuzzy` for flexible matching
4. **Filter by domain**: Use `--domains cpp` for C++ APIs, `--domains c` for C APIs
5. **Extract details**: Use `cws get` to get full documentation content

## Examples

### Find tensor decomposition APIs in cuTensorNet

```bash
cws search cuquantum --stats
# Shows: cpp:3179, py:1172, std:3378, c:4

cws search cuquantum --domains cpp --keywords "SVD" --fuzzy --limit 10
# Returns: cutensornetTensorSVD, etc. (functions ranked above enumerators)

cws search cuquantum --domains cpp --keywords "SVD | QR" --fuzzy
# Returns: entries matching SVD OR QR
```

### Search across multiple libraries

```bash
# "Where is SVD in CUDA-X?" — search cuSOLVER and cuDSS together
cws search cusolver cudss --keywords "svd" --fuzzy --limit 10

# Mix any number of sources
cws search cusolver cusparse cudss --keywords "solve" --fuzzy
```

Multi-source output uses `"sources"` (list) instead of `"source"` (string), and `"total_found"` becomes a per-source dict.

### Find GEMM functions in cuBLAS

```bash
cws search cublas --stats
# Shows: std:36 (only doc labels, no cpp/c domain)

cws search cublas --domains std --keywords "gemm"
# Returns: cublas-t-gemm, cublas-t-gemmex, etc. (doc section labels)
```

### Extract API documentation details

After finding a function URL, extract its full documentation:

```bash
cws get  --section 
```

Example:

```bash
cws get \
  "https://docs.nvidia.com/cuda/cuquantum/latest/cutensornet/api/functions.html" \
  --section "cutensornetTensorSVD"
```

Output is a brace-delimited text tree:

```
{
cutensornetTensorSVD
{
cutensornetStatus_t cutensornetTensorSVD {
const cutensornetHandle_t handle
const cutensornetTensorDescriptor_t descTensorIn
...
}
Performs SVD decomposition of a tensor. { ... }
Parameters { ... }
}
}
```

### List available sources

```bash
cws list                     # table format
cws list --json              # JSON format
```

### Audit registry health

```bash
cws audit                    # audit all sources
cws audit --source cublas    # audit single source
```

## Output Format

### cws search

JSON output includes:

Single source:
- `source`: Library name (string)
- `total_found`: Total APIs in filtered domains
- `filtered_count`: APIs matching keywords
- `candidates`: List of matching APIs with `group` (name), `url`, `domain`, `role`

Multi-source (`cws search A B`):
- `sources`: Library names (list)
- `total_found`: Per-source totals (dict)
- `filtered_count`: Total APIs matching keywords across all sources
- `candidates`: Merged list (k-way merge by score if `--fuzzy`, else concatenated)

### cws get

Brace-delimited text tree where:
- `{` `}` denote hierarchy
- Text content is preserved
- Inline elements (code, links) are flattened to text

Options:
- `--section `: Extract only a specific section
- `--main-only`: Extract only the main content area

## Files

- `cli.py` - Unified CLI entry point (`cws`)
- `search.py` - Search APIs across library inventories
- `audit.py` - Audit registry entries for endpoint health
- `get.py` - Extract documentation content as text tree
- `fetchers.py` - Data fetching for Sphinx/Doxygen sources
- `scoring.py` - Search ranking and filtering logic
- `registry.py` - Registry loading utility
- `registry.toml` - Library metadata (URLs, doc types)

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [ultimatile](https://github.com/ultimatile)
- **Source:** [ultimatile/cuda-x-skills](https://github.com/ultimatile/cuda-x-skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-ultimatile-cuda-x-skills-cuda-webdoc-search
- Seller: https://agentstack.voostack.com/s/ultimatile
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
