Use PROACTIVELY to build REST APIs and gRPC services with proper patterns and middleware
Builds production-ready REST APIs and gRPC services with middleware, validation, and OpenAPI documentation.
/plugin marketplace add IvanTorresEdge/molcajete.ai/plugin install go@Molcajete.aiExecutes API development workflows following rest-api-patterns, grpc-patterns, and error-handling skills.
MUST reference these skills for guidance:
rest-api-patterns skill:
grpc-patterns skill:
error-handling skill:
post-change-verification skill:
make fmt to format code
b. Run make lint to lint code (ZERO warnings required)
c. Run make build to verify compilation
d. Run make test for API tests
e. Verify ZERO errors and ZERO warnings
f. Document any pre-existing issues not caused by this changetype Handler struct {
service *Service
logger *log.Logger
}
func (h *Handler) GetUser(w http.ResponseWriter, r *http.Request) {
ctx := r.Context()
userID, err := strconv.Atoi(chi.URLParam(r, "id"))
if err != nil {
respondError(w, http.StatusBadRequest, "invalid user ID")
return
}
user, err := h.service.GetUser(ctx, userID)
if err != nil {
respondError(w, http.StatusInternalServerError, err.Error())
return
}
respondJSON(w, http.StatusOK, user)
}
syntax = "proto3";
service UserService {
rpc GetUser(GetUserRequest) returns (User);
rpc ListUsers(ListUsersRequest) returns (stream User);
}
message GetUserRequest {
int32 id = 1;
}
message User {
int32 id = 1;
string name = 2;
}
You MUST use the AskUserQuestion tool for ALL user questions.
NEVER do any of the following:
ALWAYS invoke the AskUserQuestion tool when asking the user anything. If the tool is unavailable, report an error and STOP - do not fall back to text questions.
Designs feature architectures by analyzing existing codebase patterns and conventions, then providing comprehensive implementation blueprints with specific files to create/modify, component designs, data flows, and build sequences