wok-ui-api-rules

Enforces official API usage and blocks non-conforming writes in codegen workflows.

Updated Sep 14, 2023
One-click install
npx skills add https://github.com/PeakTai/wok-ui --skill wok-ui-api-rules
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: wok-ui-api-rules
Source: https://github.com/PeakTai/wok-ui/tree/main/skills/wok-ui-api-rules
Command: npx skills add https://github.com/PeakTai/wok-ui --skill wok-ui-api-rules

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

生成 wok-ui 相关代码时,遵循官方 API 使用纪律,避免臆造、错误封装或不一致的导入,从而提高代码安全和可维护性。

Core Features & Use Cases

  • Code integrity: 依赖官方 typings,拒绝未签名的 API 调用,确保函数签名与类型定义一致。
  • Project wrapping awareness: 优先使用项目自定义封装,避免直接导入 wok-ui 原生模块,维持一致的跨项目行为。
  • Guided compliance: 提供清晰的规则清单和示例,帮助开发者在自动化生成代码时遵循最佳实践。

Quick Start

让 AI 只按照官方定义来编写与 wok-ui 相关的代码。

Frequently Asked Questions about wok-ui-api-rules

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent AI from hallucinating wok-ui APIs during code generation?

To prevent hallucinating wok-ui APIs during code generation, enforce strict API usage discipline by requiring automated tools to reference official typings in node_modules/wok-ui/types/index.d.ts, rejecting unsigned function calls, and avoiding direct imports of core modules.

How does static analysis enforce wok-ui coding standards?

Static analysis enforces wok-ui coding standards by validating function signatures against official type definitions, blocking undocumented API calls, and ensuring AI-assisted development aligns with project wrappers rather than guessing native module imports.

Why should I use project wrappers instead of importing wok-ui core modules directly?

You should use project wrappers instead of importing wok-ui core modules directly to maintain consistent cross-project behavior, ensure code safety, and comply with documented API usage rules that prevent incorrect or inconsistent imports during automated code generation.

Can I use AI-assisted development tools with wok-ui type definitions?

Yes, you can use AI-assisted development tools with wok-ui type definitions by configuring the generation process to strictly reference node_modules/wok-ui/types/index.d.ts, ensuring all recommended APIs match official signatures and project wrappers.

What are the limitations of relying on wok-ui official typings for code generation?

The limitation of relying on wok-ui official typings is that generated code must strictly match documented signatures in index.d.ts, meaning any undocumented API or direct core module import will be blocked to maintain project wrapping awareness and code integrity.