TS API Miner for Openclaw

An intelligent assistant for analyzing TypeScript files to extract API interfaces, request structures, and JSDoc comments into structured Markdown documentation.

9talk
v0.1.0
Mar 3, 2026
0
822
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install ts-interface-miner

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install ts-interface-miner using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is TS API Miner?

TS API Miner is a specialized developer tool designed to bridge the gap between raw TypeScript code and readable documentation. It deep-scans .ts and .tsx files to locate API interfaces using keywords, function names, or URL paths. By combining structural code analysis with JSDoc and inline comment extraction, it provides a holistic view of your service layer, ensuring that business logic documented in comments is preserved alongside technical type definitions.

This skill is particularly valuable for teams using Openclaw Skills to automate documentation workflows. It doesn't just list types; it recursively expands nested interfaces, identifies HTTP methods, and highlights discrepancies between code and documentation, such as when a parameter is marked optional in TypeScript but required in a comment.

TS API Miner Use Cases

  • Automatically generating API documentation for frontend service layers or backend controllers.
  • Locating specific endpoint definitions within large-scale TypeScript codebases using partial keywords or paths.
  • Auditing request/response structures to ensure JSDoc comments accurately reflect the code logic.
  • Extracting nested DTO structures into flat, readable Markdown tables for team collaboration.

How TS API Miner Works

  1. Scan the provided TypeScript code context or file path for keywords like function names, constants, or URL strings.
  2. Lock onto the target function body and identify the associated HTTP client method (e.g., axios, fetch).
  3. Extract core metadata including the HTTP method, request path, and source code location.
  4. Deep-parse parameters and request bodies, expanding custom interfaces and recursive types into detailed field lists.
  5. Integrate JSDoc annotations to provide semantic descriptions for every field and response status.
  6. Generate a standardized Markdown report featuring structured tables for request parameters, response schemas, and code snippets.

TS API Miner Setup

To use this skill within the Openclaw Skills framework, ensure your TypeScript environment is configured and your source files use standard JSDoc for the best results.

# Example: Point the agent to your API directory
# No specific installation required beyond the Openclaw skill activation

TS API Miner Data Schema & Taxonomy

The skill organizes extracted metadata into a consistent Markdown taxonomy:

Component Data Extracted
Interface Summary Function name, description, URL path, and HTTP method.
Request Parameters Parameter location (Query/Body/Path), type, required status, and JSDoc description.
Response Schema HTTP status codes, response structure summaries, and success/error descriptions.
Source Context Filename, line numbers, and relevant code snippets for validation.

TS API Miner Advanced Features

  • Recursive Interface Expansion: Automatically unfolds nested DTOs and Types into flat documentation tables.
  • Comment Authority Logic: Prioritizes JSDoc descriptions and flags conflicts (e.g., code vs. comment mismatches) with warning icons.
  • Intelligent Method Inference: Infers HTTP methods based on URL patterns and naming conventions if not explicitly defined.
  • Generic Support: Handles complex TypeScript generics like Promise<ApiResponse> to extract the core data structure.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*