ワンクリックで
implement-verified-lightdash-api-client
Implement verified Lightdash API clients with documentation research and live schema verification.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Implement verified Lightdash API clients with documentation research and live schema verification.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Accountability for identifying deprecated Lightdash API usage in the provider by comparing code patterns against the official OpenAPI specification. Use when tasked to audit the codebase for technical debt or outdated API dependencies.
Guide the execution of Lightdash Terraform provider acceptance tests, ensuring correct environment setup and targeted test execution.
Run formatting, linters, unit tests, and build checks, then fix violations.
Research and investigate Lightdash API endpoints to understand request/response schemas and behavior.
Implement Terraform Resources and Data Sources in `internal/provider` with comprehensive testing.
Comprehensive security review of the Terraform provider codebase using gosec, trunk, osv-scanner, and trivy.
| name | implement-verified-lightdash-api-client |
| description | Implement verified Lightdash API clients with documentation research and live schema verification. |
This skill implements a new Lightdash API operation in the internal/lightdash/api directory, along with necessary models in internal/lightdash/models. It relies on the research-lightdash-api skill for researching and verifying the API schema before implementation.
The user should provide:
/api/v1/projects/:projectUuid/spaces)GetSpaceV1, CreateDashboardV1)LIGHTDASH_API_KEY is available).internal/lightdash/models for existing structs that match the resource.internal/lightdash/models/<resource>.go.
json tags.internal/lightdash/api/<verb>_<resource>_v1.go (snake_case).Client struct: func (c *Client) <FunctionName>(...) (*<ReturnType>, error).http.NewRequest.fmt.Sprintf and c.HostUrl.c.doRequest(req).Results field if the API wraps the response in a Results envelope.internal/lightdash/api/<verb>_<resource>_v1_test.go to test unmarshaling logic with sample JSON.Ref: internal/lightdash/api/get_space_v1.go
package api
import (
"encoding/json"
"fmt"
"net/http"
"strings"
"github.com/ubie-oss/terraform-provider-lightdash/internal/lightdash/models"
)
type GetResourceV1Response struct {
Results models.Resource `json:"results"`
Status string `json:"status"`
}
func (c *Client) GetResourceV1(id string) (*models.Resource, error) {
if len(strings.TrimSpace(id)) == 0 {
return nil, fmt.Errorf("id is empty")
}
path := fmt.Sprintf("%s/api/v1/resource/%s", c.HostUrl, id)
req, err := http.NewRequest("GET", path, nil)
if err != nil {
return nil, fmt.Errorf("error creating request: %w", err)
}
body, err := c.doRequest(req)
if err != nil {
return nil, fmt.Errorf("error performing request: %w", err)
}
var response GetResourceV1Response
if err := json.Unmarshal(body, &response); err != nil {
return nil, fmt.Errorf("error unmarshaling response: %w", err)
}
return &response.Results, nil
}