agent-browser-automati…
Automate browser interactions for development testing using Puppeteer MCP
Generate comprehensive API endpoint with framework detection, implementation, tests, and documentation
How it fires
How this command gets triggered: by you, by Claude, or both.
/apiContext preview
What this command does when you run it.
Generate comprehensive API endpoint with framework detection, implementation, tests, and documentation
allowed-tools: Read, Write, Bash(fd:*), Bash(rg:*), Bash(gdate:*), Bash(jq:*), Task name: "Api" description: "Generate comprehensive API endpoint with framework detection, implementation, tests, and documentation" author: "wcygan" tags: ["code","generate"] version: "1.0.0" created_at: "2025-07-14T00:00:00Z" updated_at: "2025-07-14T00:00:00Z"
Generate comprehensive API endpoint for $ARGUMENTS using intelligent framework detection, parallel implementation, and extensive testing.
STEP 1: Framework Detection and Analysis
IF Java project detected (pom.xml/build.gradle):
ELSE IF Rust project detected (Cargo.toml):
ELSE IF Go project detected (go.mod):
ELSE IF Node.js project detected (package.json):
STEP 2: API Design Phase (with Extended Thinking)
Think deeply about the optimal API design patterns for this specific endpoint:
Design decisions:
STEP 3: Parallel Implementation Strategy
Use sub-agents for parallel development to optimize implementation time:
**Sub-Agent 1**: Core endpoint implementation **Sub-Agent 2**: Comprehensive test suite generation **Sub-Agent 3**: API documentation (OpenAPI/Swagger) generation **Sub-Agent 4**: Database integration and migrations **Sub-Agent 5**: Security and validation implementation
Implement endpoint based on detected framework:
**Spring Boot (Java):**
@RestController
@RequestMapping("/api/v1")
public class Controller {
@PostMapping("/resource")
public ResponseEntity<Response> create(@Valid @RequestBody Request req) {
// Implementation
}
}**ConnectRPC (Go):**
func (s *Server) Method(ctx context.Context,
req *connect.Request[pb.Request]) (*connect.Response[pb.Response], error) {
// Implementation
}**Axum (Rust):**
async fn handler(
State(state): State<AppState>,
Json(payload): Json<Request>,
) -> Result<Json<Response>, StatusCode> {
// Implementation
}STEP 4: Security Implementation (Think deeply about security implications)
STEP 5: Comprehensive Test Generation
Generate extensive test suite covering all scenarios:
**Java (JUnit/MockMvc):**
@Test
void testEndpoint() throws Exception {
mockMvc.perform(post("/api/v1/resource")
.contentType(MediaType.APPLICATION_JSON)
.content(jsonRequest))
.andExpect(status().isOk());
}**Go (testing package):**
func TestEndpoint(t *testing.T) {
req := httptest.NewRequest("POST", "/api/v1/resource", body)
w := httptest.NewRecorder()
handler(w, req)
assert.Equal(t, http.StatusOK, w.Code)
}**Rust (axum-test):**
#[tokio::test]
async fn test_endpoint() {
let app = create_app();
let response = app.oneshot(request).await.unwrap();
assert_eq!(response.status(), StatusCode::OK);
}STEP 6: Documentation Generation
A lightweight (~46kB) and comprehensive CLI tool for managing Claude commands, configurations, and workflows.
Repo: kiliczsh/claude-cmd
Automate browser interactions for development testing using Puppeteer MCP
Prepare branches for merging across multiple worktrees and coordinate integration
Transform into accessibility expert for WCAG compliance and inclusive design
Transform into an API design specialist who creates well-structured, developer-friendly APIs
Transform into backend specialist for scalable API and system design
Cloud architect persona for designing scalable, secure cloud infrastructure using modern cloud-native technologies