gts-analyze
Analyze how the GTS (Global Type System) is used in a Gear — defined types, declared instances, and references across sdk / main / plugin / docs. Thin wrapper around the `gts-analyze` CLI under tools/.
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-12
- Stars
- ★ 48
- Forks
- 52
01 前言 Front Matter
- name
- gts-analyze
- description
- Analyze how the GTS (Global Type System) is used in a Gear — defined types, declared instances, and references across sdk / main / plugin / docs. Thin wrapper around the `gts-analyze` CLI under tools/.
- allowed-tools
- Bash
- user-invocable
- true
03 SKILL.md 正文
gts-analyze
Thin wrapper around the workspace binary at tools/gts-analyze/. Source code, full docs, and human-readable usage live there: tools/gts-analyze/README.md.
How to invoke
- Parse the user's invocation for a gear path (absolute or repo-relative). If absent, ask once.
- Run from the workspace root:
First invocation in a fresh checkout compiles the crate (~30s withcargo run --release -p gts-analyze -- <MODULE_PATH> [flags]syn); subsequent runs are instant. - Show the markdown report verbatim — don't summarise away the per-type detail.
Flags
--format json— machine-readable JSON instead of markdown.--out FILE— write report to file instead of stdout.--include-tests— include Rust test files (default skips integration tests, benches,*_test(s).rs, and items behind#[test]/#[cfg(test)]).--skip-docs— drop every*.mdand any file underdocs/. Note: type definitions sourced fromdocs/schemas/*.schema.jsondisappear too — use only for code-only audits.-v/--verbose— expand reference lists to per-linefile:line — context. Default is compact (file + count).
Report sections
- Summary — file counts and totals.
- GTS Types Defined Here — per defined type: schema source (
#[gts_type_schema]/*.schema.json/struct_to_gts_schema!), location, struct name when applicable, and usage breakdown acrosssdk/main/plugin/doc. - GTS Instances Defined Here — per declared instance: macro form, inferred typed struct, base type, location, and usage breakdown.
- Other GTS IDs Referenced — table of IDs not defined here, plus a collapsible per-ID file breakdown.
Tips
- A GTS ID ending with
~is a Type, otherwise an Instance (gts-spec §8.1). - For doc-heavy gears with hundreds of
.mdreferences, suggest--skip-docsif the user only cares about code usage. cargo runbuilds on first invocation; if the user is running this often,cargo build --release -p gts-analyzeonce up front avoids latency.
04 同仓库更多 Skills
toolkit-pr-review
Review Rust changes against idiomatic Rust guidelines and ToolKit framework rules. PR mode posts inline comments on GitHub; local mode reviews a branch against main and writes a markdown report.
gear-creator
Interactive workflow for creating new ToolKit gears and editing existing ones. Use when adding a new gear to the platform, adding features to an existing gear (REST endpoints, DB entities, OData filtering, plugins, lifecycle/background tasks, SSE events, error types), refactoring gear layer structure, or creating SDK crates. Covers the full DDD-light stack — SDK pattern, contract/API/domain/infra layers, OperationBuilder, SecureORM, ClientHub, error handling, and testing.
config
暂无简介