2.6k
GitHub Stars
2
Bundled Files
2 months ago
Catalog Refreshed
3 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill openclaw/skills --skill ts-interface-miner- _meta.json287 B
- SKILL.md8.2 KB
Overview
This skill analyzes TypeScript (.ts/.tsx) files to locate and document API interfaces based on user keywords. It deeply parses code structure and comments (JSDoc and inline) to extract request methods, paths, parameters, response structures, and status codes. The output is a clear, standardized Markdown table for each matched interface. It prioritizes comment meaning and expands referenced types recursively for complete documentation.
How this skill works
I scan provided code or file paths for keywords that match function names, URL strings, or descriptive comments. Once a target is located, I identify the HTTP client call and extract method, path, and source location. I then extract request parameters (path/query/body/header), expand referenced interfaces/types, merge JSDoc/inline comments, infer response generics and status codes, and format everything into a predefined Markdown table template. Conflicts between code types and comments are flagged and annotated in the output.
When to use it
- You have TypeScript code and need API documentation generated quickly.
- You want to locate interfaces by function name, URL path, or a descriptive keyword.
- You need parameter and response details expanded from referenced interfaces/types.
- You require Markdown tables that are ready to include in docs or a wiki.
- You want JSDoc comments to drive field descriptions and be treated as authoritative.
Best practices
- Provide the code file or relevant code snippets rather than only a vague keyword.
- Include related type definition files if you want full recursive expansion of custom types.
- Use or add JSDoc comments (@param, @returns, @description) so descriptions are precise and authoritative.
- If a request method is not explicit, accept inferred methods and check the annotated (推断) label.
- Flag optional vs required conflicts in comments so I can mark and explain inconsistencies.
Example use cases
- Given a file with fetch/axios calls, generate per-endpoint Markdown tables for API docs.
- Search a repo snippet for ‘login’ or getUserInfo and extract request/response shapes and status codes.
- Expand a DTO referenced in a request body into individual parameter rows for client SDK generation.
- Audit interfaces to find missing or conflicting documentation between types and comments.
- Produce quick API reference pages from TypeScript source for product or backend teams.
FAQ
If a type references an external file that is not provided, I will note the external reference and show only basic type info. I will report that full expansion was not possible and list the unresolved type name.
How are conflicts between TypeScript optional fields and comments handled?
Conflicts are flagged in the required column as ⚠️ Conflict and I add an explanatory note in the description. Comment meanings are prioritized but the code’s type information is preserved and shown.