一键导入
error-config
Implement shared error types, config system, and token storage in clickup-api. Use this when creating error.rs, config.rs, or auth.rs in the API crate.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Implement shared error types, config system, and token storage in clickup-api. Use this when creating error.rs, config.rs, or auth.rs in the API crate.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | error-config |
| description | Implement shared error types, config system, and token storage in clickup-api. Use this when creating error.rs, config.rs, or auth.rs in the API crate. |
This skill creates the foundational error handling, configuration management, and credential storage layer in clickup-api. All other API crate code depends on these modules.
clickup-apifoundation completed — workspace compilescrates/clickup-api/src/error.rs — ClickUpError enum with thiserror, Result<T> type aliascrates/clickup-api/src/config.rs — Config struct with TOML load/savecrates/clickup-api/src/auth.rs — TokenStorage with OS keyring + file fallbackDefine ClickUpError enum with these variants (all using #[error("...")]):
| Variant | Source | When |
|---|---|---|
AuthError(String) | — | HTTP 401, invalid/missing token |
NotFound(String) | — | HTTP 404 |
RateLimited { reset_at: u64 } | — | HTTP 429 |
ApiError { message: String, ecode: Option<String> } | — | Other 4xx/5xx |
NetworkError(String) | reqwest::Error | Connection failures |
DeserializationError(String) | serde_json::Error | JSON parse failures |
ConfigError(String) | std::io::Error, toml::de::Error | Config read/write |
KeyringError(String) | keyring::Error | Credential storage |
Export pub type Result<T> = std::result::Result<T, ClickUpError>;
~/.config/clickup-rs/config.tomldirs::config_dir() to resolve platform-specific config directoryConfig struct fields: default_workspace_id: Option<String>, log_level: Option<String>Config::load() -> Result<Config> and Config::save(&self) -> Result<()>TokenStorage struct with methods: store_token(), get_token(), delete_token()keyring crate (service: "clickup-rs", username: "api_token")~/.config/clickup-rs/.tokenCLICKUP_TOKEN env var takes precedence over stored tokensecrecy::SecretStringConfig::load() → Config::save() → Config::load() round-trips without data lossCLICKUP_TOKEN env var overrides stored tokenClickUpError variants produce human-readable Display outputstd::error::ErrorSPECTRA 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/.
Create serde model structs for all ClickUp API entities in clickup-api. Use this when creating or modifying files in clickup-api/src/models/.
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.