From gopilot
You are scaffolding a new Go-first project. The Go backend is the source of truth. The frontend consumes it via auto-generated typed SDK.
npx claudepluginhub bishwas-py/gopilot --plugin gopilotThis skill uses the workspace's default tool permissions.
You are scaffolding a new Go-first project. The Go backend is the source of truth. The frontend consumes it via auto-generated typed SDK.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Guides MCP server integration in Claude Code plugins via .mcp.json or plugin.json configs for stdio, SSE, HTTP types, enabling external services as tools.
You are scaffolding a new Go-first project. The Go backend is the source of truth. The frontend consumes it via auto-generated typed SDK.
skills/_shared/go-patterns.md for Go/Huma conventionssvelte (default) or reactsvelte, read skills/_shared/svelte-patterns.mdreact, read skills/_shared/react-patterns.mdParse $ARGUMENTS as: [project-name] [svelte|react]
svelteCreate the Go backend structure:
backend/
├── cmd/server/
│ └── main.go # Entry point, loads config, starts server
├── internal/
│ ├── api/
│ │ └── router.go # Central router, wires all handlers
│ ├── config/
│ │ └── config.go # Env-based config loader
│ └── database/
│ └── database.go # pgx connection pool
├── Makefile # dev, build, test, lint, db-schema
├── schema.sql # Declarative DB schema (pgschema-style)
├── go.mod
└── .air.toml # Hot reload config
GET /openapi.json*pgxpool.Pool and huma.APIGET /api/v1/healthDATABASE_URL, PORT, ENVdev: # air hot-reload
build: # go build -o bin/server ./cmd/server
test: # go test ./...
lint: # go vet ./...
db-schema: # pgschema apply (or manual psql)
frontend/
├── src/
│ ├── _sdk/ # Will be auto-generated (empty for now)
│ │ └── .gitkeep
│ ├── lib/
│ │ └── server/
│ │ └── go-client.ts # Typed fetch wrapper to Go backend
│ └── routes/
│ └── +page.svelte # Landing page
├── scripts/
│ └── generate-sdk.ts # SDK generation script (placeholder)
├── svelte.config.js # Enable experimental remoteFunctions
├── package.json
├── tsconfig.json
└── vite.config.ts
svelte.config.js must enable:
experimental: { remoteFunctions: true }
frontend/
├── src/
│ ├── _sdk/ # Will be auto-generated (empty for now)
│ │ └── .gitkeep
│ ├── lib/
│ │ └── go-client.ts # Typed fetch wrapper to Go backend
│ └── app/
│ ├── layout.tsx
│ └── page.tsx # Landing page
├── scripts/
│ └── generate-sdk.ts # SDK generation script (placeholder)
├── package.json
├── tsconfig.json
└── next.config.ts
project-root/
├── docker-compose.yml # PostgreSQL 16 on port 5731
├── pnpm-workspace.yaml # Monorepo: [frontend]
├── package.json # Root scripts: dev, generate-sdk, test
└── README.md
{
"scripts": {
"dev": "concurrently \"pnpm run dev:backend\" \"pnpm run dev:frontend\"",
"dev:backend": "cd backend && make dev",
"dev:frontend": "pnpm --filter frontend dev",
"generate-sdk": "pnpm --filter frontend generate-sdk",
"build": "pnpm --filter frontend build",
"test": "cd backend && make test"
}
}
This is the bridge between frontend and Go backend. Create a typed HTTP client:
const BASE_URL = process.env.GO_API_URL ?? 'http://localhost:8080';
type RequestOptions = {
params?: Record<string, string | number | undefined>;
headers?: Record<string, string>;
};
export const goApi = {
async get<T>(path: string, opts?: RequestOptions): Promise<T> { ... },
async post<T>(path: string, body?: unknown, opts?: RequestOptions): Promise<T> { ... },
async put<T>(path: string, body?: unknown, opts?: RequestOptions): Promise<T> { ... },
async patch<T>(path: string, body?: unknown, opts?: RequestOptions): Promise<T> { ... },
async del<T>(path: string, opts?: RequestOptions): Promise<T> { ... },
};
After scaffolding:
cd backend && go mod tidycd frontend && pnpm installdocker compose up -d (start PostgreSQL)pnpm dev — both servers should starthttp://localhost:8080/openapi.json returns spec/gopilot:domain, add endpoints with /gopilot:api, generate SDK with /gopilot:sdk."