Agent Skillsopen-circle/formisch › repo-website-api-review

repo-website-api-review

GitHub

系统化审查 Formisch 网站 API 文档的准确性与一致性。通过比对源码、验证类型签名、检查 MDX 内容格式及链接有效性,确保文档与代码严格同步,并修正常见错误如签名不匹配、参数缺失或框架术语误用。

.agents/skills/repo-website-api-review/SKILL.md open-circle/formisch

Trigger Scenarios

需要核对 API 文档是否与源代码一致 检查文档的完整性、准确性和链接有效性 修复因代码变更导致的文档过时或错误

Install

npx skills add open-circle/formisch --skill repo-website-api-review -g -y
More Options

Non-standard path

npx skills add https://github.com/open-circle/formisch/tree/main/.agents/skills/repo-website-api-review -g -y

Use without installing

npx skills use open-circle/formisch@repo-website-api-review

指定 Agent (Claude Code)

npx skills add open-circle/formisch --skill repo-website-api-review -a claude-code -g -y

安装 repo 全部 skill

npx skills add open-circle/formisch --all -g -y

预览 repo 内 skill

npx skills add open-circle/formisch --list

SKILL.md

Frontmatter
{
    "name": "repo-website-api-review",
    "metadata": {
        "author": "formisch",
        "version": "1.0"
    },
    "description": "Review and verify API documentation routes on the Formisch website. Use when checking documentation accuracy, completeness, and consistency with source code."
}

Reviewing API Documentation

This skill provides a systematic approach to reviewing API documentation routes for accuracy and consistency.

Review Process

Step 1: Compare with Source Code

For each documented API:

  1. Read the source file completely
  2. Compare function signatures - Must match exactly
  3. Verify types - Generics, parameters, return types
  4. Check JSDoc - Descriptions should match

Step 2: Check properties.ts

Verify each property:

  • Generic constraints match source code
  • Parameter types are accurate
  • Return type is correct
  • All href links are valid
  • No unused properties defined

Step 3: Check index.mdx

Verify content:

  • Front matter is complete (title, description, source, contributors)
  • Function signature matches source exactly
  • All generics documented
  • All parameters documented with correct headings (Parameters vs Properties)
  • Explanation references specific parameters/properties
  • Examples are realistic and follow conventions
  • Related section uses correct framework terminology

Step 4: Check Menu and Links

  • API listed in menu.md (alphabetical order)
  • All internal links work
  • Cross-package links use absolute paths
  • No broken links to types or functions

Common Issues to Find

Signature Mismatches

// Source code
export function validate(form: FormStore, config?: Config): void;

// ❌ Documentation shows different signature
const result = validate(form); // Missing config, wrong return

Missing Parameters

Documentation should include ALL parameters from source:

## Parameters

- `form` <Property {...properties.form} />
- `config` <Property {...properties.config} /> <!-- Don't forget optional params -->

Wrong Headings

API Type Heading
Functions ## Parameters
Components ## Properties

Outdated Examples

Examples must work with current API:

// ❌ Old API usage
const form = createForm(schema);

// ✅ Current API
const form = createForm({ schema });

Framework Terminology

Framework Related Section Heading
Solid ### Primitives
Qwik ### Hooks
Preact ### Hooks
React Native ### Hooks
Angular ### Functions / ### Directives
Vue ### Composables
Svelte ### Runes

Type Links

// ❌ Wrong - using constraint type name
generics: [{ type: 'custom', name: 'RequiredPath' }];

// ✅ Correct - using parameter name
generics: [{ type: 'custom', name: 'TFieldPath' }];

Cross-Package Links

// ❌ Wrong - relative across packages
href: '../../../core/api/FormSchema/';

// ✅ Correct - absolute path
href: '/core/api/FormSchema/';

Verification Checklist

properties.ts

  • All generics have modifier: 'extends' (extends unknown when the source has no constraint)
  • Custom types have valid href links
  • Property order: name, href, generics
  • No unused properties
  • Types match source exactly

index.mdx

  • Title matches API name exactly (case-sensitive)
  • Description ends with period
  • Source path is correct
  • Function signature code block matches source
  • Correct heading (Parameters/Properties)
  • Explanation references specific params/props
  • Returns section present (unless void or component)
  • Examples section present (unless component/type)
  • Related section uses correct framework terminology
  • No Types in Related section

Menu Integration

  • API listed in appropriate menu.md
  • Alphabetical order maintained
  • Link path matches folder structure

Link Validation

  • All href in properties.ts resolve
  • ApiList links are valid
  • Cross-framework links use absolute paths
  • External links (Valibot) use full URLs

Review Output Format

Document issues found:

## Review: createForm

### Issues Found

1. **Signature mismatch** (L15)
   - Source shows `config: FormConfig<TSchema>`
   - Docs show `config: Config`

2. **Missing parameter** (Parameters section)
   - `initialInput` not documented

3. **Broken link** (properties.ts L23)
   - `href: '../FormConfig/'` - FormConfig not documented

### Recommendations

- Update properties.ts with correct FormConfig type
- Add initialInput to Parameters section
- Create FormConfig type documentation

Version History

  • 865212e Current 2026-08-02 20:48

    根据提交日志,此版本主要修复了跨文档的错误、拼写和代码示例问题,包括纠正特定框架的代码用法、更新 API 文档以匹配源码(如返回类型和语义)、修复菜单排序及死链等。

  • 09acd5e 2026-07-24 11:30

Same Skill Collection

.agents/skills/repo-prepare-release/SKILL.md
.agents/skills/repo-source-code-document/SKILL.md
.agents/skills/repo-source-code-review/SKILL.md
.agents/skills/repo-source-code-test-frameworks/SKILL.md
.agents/skills/repo-source-code-test-packages/SKILL.md
.agents/skills/repo-structure-navigate/SKILL.md
.agents/skills/repo-website-api-create/SKILL.md
.agents/skills/repo-website-api-update/SKILL.md
.agents/skills/repo-website-guide-create/SKILL.md
website/public/.well-known/agent-skills/formisch/SKILL.md

Metadata

Files
0
Version
865212e
Hash
21b5ded9
Indexed
2026-07-24 11:30

Accueil - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-07 17:17
浙ICP备14020137号-1 $Carte des visiteurs$