원클릭으로
generate-sdk-types
Generates TypeScript type definitions for SDK from Rust tool schemas, ensuring type safety between server and client
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Generates TypeScript type definitions for SDK from Rust tool schemas, ensuring type safety between server and client
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Use when designing prompts for LLMs, optimizing model performance, building evaluation frameworks, or implementing advanced prompting techniques like chain-of-thought, few-shot learning, or structured outputs.
How to deploy Dravr infrastructure and apply Cloud Run config changes. Use when editing infra/ terraform, when a merged code change is live but a Cloud Run setting (cpu, memory, min/max instances, env var, scaling) hasn't taken effect, or when asked to plan/apply infra. Explains the two-pipeline model (app binary auto-deploys on push; terraform infra config is a separate manual apply) plus the cpu/cpu_idle guardrails.
Enforces zero-tolerance code quality policy using Clippy with strict lints, all warnings treated as errors
Write well-formatted notes to the dravr-vault Obsidian knowledge base. Use this skill whenever creating or updating an ADR, runbook, plan, API doc, guide, session output, or any structured document that should land in the vault — even when the user doesn't say "Obsidian" explicitly. Delegates to obsidian:obsidian-cli to write to the live vault and applies Dravr frontmatter and formatting standards.
Bootstrap Pierre server with database, admin user, coaches, and test users for development and testing
Validates coach markdown files for required frontmatter fields, sections, and naming conventions
| name | generate-sdk-types |
| description | Generates TypeScript type definitions for SDK from Rust tool schemas, ensuring type safety between server and client |
| user-invocable | true |
Generates TypeScript type definitions for the SDK from Rust tool schemas, ensuring type safety between server and client.
Run this skill:
sdk/ directory with dependencies installed# 1. Ensure server is running
cargo run --bin pierre-mcp-server &
SERVER_PID=$!
sleep 3
# 2. Generate TypeScript types
cd sdk
bun run generate-types
# 3. Verify types changed
git diff src/types.ts
# 4. Cleanup
kill $SERVER_PID
cd ..
# Run from project root (handles server lifecycle)
./scripts/sdk/generate-sdk-types.js
# 1. Start server
cargo run --bin pierre-mcp-server &
SERVER_PID=$!
sleep 3
# 2. Fetch tool schemas via MCP
curl -X POST http://localhost:8081/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"tools/list","id":1}' \
> /tmp/tools.json
# 3. Parse and generate types
cd sdk
node scripts/generate-types.js /tmp/tools.json
# 4. Format generated code
bun run format
# 5. Cleanup
kill $SERVER_PID
cd ..
// Generated from Rust ToolDefinition structs
export interface Tool {
name: string;
description: string;
inputSchema: {
type: 'object';
properties: Record<string, JsonSchema>;
required?: string[];
};
}
// Example: get_activities tool
export interface GetActivitiesParams {
start_date?: string;
end_date?: string;
limit?: number;
provider?: 'strava' | 'garmin' | 'fitbit';
}
// All available tools
export const TOOLS: Tool[] = [
{
name: 'get_activities',
description: 'Retrieves fitness activities...',
inputSchema: { /* ... */ }
},
// ... 35+ tools
];
# Verify Rust tools compile
cargo build --lib
# Check tool count
rg "^pub const TOOL_" src/protocols/universal/tool_registry.rs --type rust | wc -l
# Verify types compile
cd sdk
bun run build
# Run type tests
bun test -- test/unit/types.test.ts
# Check type coverage
bun run type-check
cd ..
# Compare generated types with committed version
git diff sdk/src/types.ts
# Expected changes after adding a tool:
# + New tool interface
# + New tool definition in TOOLS array
# + Updated tool count comment
// src/protocols/universal/tool_registry.rs
pub const TOOL_MY_NEW_FEATURE: ToolDefinition = ToolDefinition {
name: "my_new_feature",
description: "Does something useful",
input_schema: json!({
"type": "object",
"properties": {
"param1": { "type": "string" },
"param2": { "type": "number" }
},
"required": ["param1"]
}),
};
// src/protocols/universal/mod.rs
impl UniversalToolExecutor {
pub fn register_tools(&mut self) {
self.register(TOOL_MY_NEW_FEATURE, handle_my_new_feature);
}
}
cd sdk
bun run generate-types
// sdk/src/types.ts (auto-generated)
export interface MyNewFeatureParams {
param1: string;
param2?: number;
}
export const TOOL_MY_NEW_FEATURE: Tool = {
name: 'my_new_feature',
description: 'Does something useful',
inputSchema: { /* ... */ }
};
git add src/protocols/universal/tool_registry.rs
git add sdk/src/types.ts
git commit -m "feat: add my_new_feature tool with TypeScript types"
scripts/sdk/generate-sdk-types.js - Type generation scriptsdk/src/types.ts - Generated TypeScript typessrc/protocols/universal/tool_registry.rs - Rust tool definitionssdk/TYPE_GENERATION.md - Type generation documentationtest-mcp-compliance - MCP protocol validation