一键导入
domain-models
Create serde model structs for all ClickUp API entities in clickup-api. Use this when creating or modifying files in clickup-api/src/models/.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Create serde model structs for all ClickUp API entities in clickup-api. Use this when creating or modifying files in clickup-api/src/models/.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
SPECTRA v4 — vendor-agnostic specification and planning methodology for AI agents.
Implement typed async endpoint methods on ClickUpClient in clickup-api. Use this when creating or modifying files in clickup-api/src/endpoints/.
Build the core HTTP client with rate limiting, retry, and pagination in clickup-api. Use this when creating client.rs, rate_limiter.rs, or pagination.rs.
Implement authentication commands for clickup-cli. Use this when creating auth.rs, output.rs, or client_factory.rs in the CLI crate.
Implement space, list, and task browsing commands with rich output for clickup-cli. Use this when creating data browsing commands in the CLI crate.
Create documentation, issue templates, release workflows, and test suites for clickup-rs. Use this when preparing for release or writing project documentation.
| name | domain-models |
| description | Create serde model structs for all ClickUp API entities in clickup-api. Use this when creating or modifying files in clickup-api/src/models/. |
This skill creates all the Rust structs that represent ClickUp API entities. Each struct must correctly deserialize from the ClickUp API's JSON responses. Use the fixture files in this skill's directory as the source of truth for field names and types.
clickup-apifoundation completed — workspace compilescrates/clickup-api/src/models/mod.rs — Re-exports all model typescrates/clickup-api/src/models/user.rs — User, AuthenticatedUser, AuthenticatedUserResponsecrates/clickup-api/src/models/workspace.rs — Workspace, WorkspaceMember, WorkspacesResponsecrates/clickup-api/src/models/space.rs — Space, SpacesResponsecrates/clickup-api/src/models/status.rs — Status (with #[serde(rename = "type")] for the reserved keyword)crates/clickup-api/src/models/folder.rs — Folder, FoldersResponsecrates/clickup-api/src/models/list.rs — List, ListsResponsecrates/clickup-api/src/models/task.rs — Task, TasksResponse, TaskPriority, Tag, CustomFieldcrates/clickup-api/src/models/comment.rs — Comment, CommentsResponse#[derive(Debug, Clone, Serialize, Deserialize)]
Option<T> for nullable API fields (e.g., due_date, date_closed, profilePicture)#[serde(default)] on Vec fields that may be absent (e.g., assignees, tags, subtasks, custom_fields)#[serde(rename = "...")] for camelCase fields (e.g., profilePicture → profile_picture)#[serde(alias = "...")] when the API uses inconsistent casing"1679012345000") — store as Option<String> and provide conversion methodsThe ClickUp API is type-unstable and endpoint-inconsistent. See docs/clickup-api-quirks.md for the full catalog. Key rules:
id and name may be required fields — all others must be Option<T> or #[serde(default)]Vec fields: #[serde(default, deserialize_with = "crate::serde_helpers::deserialize_null_as_default")] — ClickUp returns null for empty arraysdeserialize_string_or_number (or deserialize_default_string_or_number for defaultable structs) — IDs can be strings or integersdeserialize_bool_or_int — ClickUp sends 0/1 instead of true/falselist, folder, space, creator): MUST be Option<T> with #[serde(default)] — absent for TIML tasks, search resultsdeserialize_maybe_false — API sends false instead of nulldeserialize_time_value — number, {"time": ms}, or stringEvery model struct must have these test cases:
id (and name where applicable)null| API field | Rust type | Notes |
|---|---|---|
id (user) | u64 | Numeric in API |
id (workspace/space/folder/list/task) | String | String in API |
status.type | String with #[serde(rename = "type")] | Reserved keyword |
date_created, date_updated | Option<String> | Millisecond timestamp as string |
priority | Option<TaskPriority> | Can be null |
custom_fields | Vec<CustomField> with #[serde(default)] | May be absent |
Use these fixtures for testing deserialization:
GET /user responseGET /team responseGET /list/{list_id}/task responseEach model file should include a #[cfg(test)] mod tests block that:
serde_json::from_str round-trips for all response typestype is handled via #[serde(rename = "type")] on Statusnull and absent cases#[serde(default)] handle both absent and empty array cases