A2A agent protocol interoperability, Agent Cards, and MCP bridging / Protokol agen A2A, Agent Cards, dan integrasi MCP.
日本語の概要は準備中です。原文の説明を表示しています。
Expert-level skill for Go programming (Go 1.24+ / 1.25+). Covers Swiss Table maps, weak pointers, synctest concurrency testing, tool directives, sqlc, net/http, and microservices in English and Indonesian.
日本語の概要は準備中です。原文の説明を表示しています。
実行スコア 未検証
インストール方法を見るインストールする前に、エージェントに与えられる指示の中身を確認できます。
<a name="english"></a>
Connects and orchestrates with domain skills:
api-design-expert, openapi-swagger-codegen-expert, and spec-driven-development-expert for gRPC/protobuf contract design, REST endpoints, and RFC 9457 Problem Details.database-orm-expert for sqlc type-safe query generation, pgx/v5 connection pooling, and transactional data integrity.sse-websocket-streaming-expert for goroutine-backed streaming pipelines and low-latency WebSocket hubs.autonomous-tdd-debugger, e2e-testing-expert, and anti-slop for executing go test -v ./..., synthetic clock testing via testing/synctest, and strict error checking (if err != nil).brainstorming and zero-to-prod-orchestrator (Phase 4: Backend & APIs).Expert-level Go development for building high-performance microservices, concurrent pipelines, and production CLI tools. Covers Go 1.24+ and 1.25 features (Swiss Table maps, weak pointers, testing/synctest deterministic concurrency testing, tool directives in go.mod), structured logging with slog, enhanced ServeMux pattern routing, sqlc type-safe SQL, and robust worker pools.
weak.Pointer), or generic type aliases.testing/synctest without flaky time.Sleep.tool directive in go.mod.net/http ServeMux method & wildcard routing.go.modGo 1.24 standardizes executable developer tooling dependencies directly in go.mod, eliminating legacy tools.go boilerplate:
# Add a tool dependency
go get -tool github.com/sqlc-dev/sqlc/cmd/sqlc@latest
go get -tool github.com/golangci/golangci-lint/cmd/golangci-lint@latest
# Run the tool directly
go tool sqlc generate
go tool golangci-lint run
// go.mod snippet
tool (
github.com/sqlc-dev/sqlc/cmd/sqlc
github.com/golangci/golangci-lint/cmd/golangci-lint
)
weak.Pointer) & In-Memory CachingGo 1.24 introduces weak.Make() and weak.Pointer to reference heap objects without preventing the Garbage Collector from freeing them:
package cache
import (
"sync"
"weak"
)
type Session struct {
UserID string
AuthToken string
}
type WeakSessionCache struct {
mu sync.RWMutex
store map[string]weak.Pointer[Session]
}
func NewWeakSessionCache() *WeakSessionCache {
return &WeakSessionCache{
store: make(map[string]weak.Pointer[Session]),
}
}
func (c *WeakSessionCache) Set(key string, session *Session) {
c.mu.Lock()
defer c.mu.Unlock()
c.store[key] = weak.Make(session)
}
func (c *WeakSessionCache) Get(key string) (*Session, bool) {
c.mu.RLock()
defer c.mu.RUnlock()
ptr, ok := c.store[key]
if !ok {
return nil, false
}
// Dereference: returns nil if GC reclaimed the session
val := ptr.Value()
if val == nil {
return nil, false
}
return val, true
}
testing/synctestGo 1.24 introduces testing/synctest (GOEXPERIMENT=synctest) to test concurrent code with virtual clocks:
package queue_test
import (
"context"
"testing"
"testing/synctest"
"time"
)
func TestWorkerTimeout(t *testing.T) {
synctest.Run(func() {
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
defer cancel()
resultChan := make(chan string, 1)
go func() {
// Virtual time advances instantaneously when all goroutines in the bubble are idle
time.Sleep(10 * time.Second)
resultChan <- "completed"
}()
select {
case res := <-resultChan:
t.Fatalf("unexpected success: %s", res)
case <-ctx.Done():
// Successfully verified timeout without waiting 5 real seconds!
t.Log("Worker timed out deterministically")
}
})
}
Stream sequence processing with zero slice allocations:
package iterator
import "iter"
type Transaction struct {
ID string
Amount int64
Failed bool
}
// Custom iterator filtering successful transactions
func SuccessfulTransactions(txs []Transaction) iter.Seq[Transaction] {
return func(yield func(Transaction) bool) {
for _, tx := range txs {
if !tx.Failed {
if !yield(tx) {
return // Stop iteration early if consumer breaks
}
}
}
}
}
// Consumer loop
func TotalRevenue(txs []Transaction) int64 {
var total int64
for tx := range SuccessfulTransactions(txs) {
total += tx.Amount
}
return total
}
net/http ServeMux & log/slogZero-dependency HTTP server with method routing, path parameters, and structured JSON telemetry:
package main
import (
"encoding/json"
"log/slog"
"net/http"
"os"
)
type UserResponse struct {
ID string `json:"id"`
Role string `json:"role"`
}
func main() {
logger := slog.New(slog.NewJSONHandler(os.Stdout, &slog.HandlerOptions{Level: slog.LevelInfo}))
slog.SetDefault(logger)
mux := http.NewServeMux()
// Method and path parameter matching
mux.HandleFunc("GET /health", func(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusOK)
w.Write([]byte(`{"status":"healthy"}`))
})
mux.HandleFunc("GET /api/v1/users/{id}", func(w http.ResponseWriter, r *http.Request) {
userID := r.PathValue("id")
slog.Info("retrieving user profile", "user_id", userID, "remote_addr", r.RemoteAddr)
w.Header().Set("Content-Type", "application/json")
json.NewEncoder(w).Encode(UserResponse{ID: userID, Role: "member"})
})
slog.Info("starting production server", "port", 8080)
if err := http.ListenAndServe(":8080", mux); err != nil {
slog.Error("server exited", "error", err)
os.Exit(1)
}
}
-- queries/users.sql
-- name: GetUser :one
SELECT id, name, email, created_at FROM users WHERE id = $1 LIMIT 1;
-- name: CreateUser :one
INSERT INTO users (name, email) VALUES ($1, $2) RETURNING id, name, email, created_at;
// Consuming generated sqlc code
package handler
import (
"context"
"example/internal/db"
"github.com/jackc/pgx/v5/pgxpool"
)
type UserHandler struct {
queries *db.Queries
pool *pgxpool.Pool
}
func (h *UserHandler) Create(ctx context.Context, name, email string) (*db.User, error) {
user, err := h.queries.CreateUser(ctx, db.CreateUserParams{
Name: name,
Email: email,
})
if err != nil {
return nil, err
}
return &user, nil
}
<a name="bahasa-indonesia"></a>
Terhubung dan mengorkestrasi bersama skill domain:
api-design-expert, openapi-swagger-codegen-expert, dan spec-driven-development-expert untuk kontrak gRPC/protobuf, endpoint REST, dan spesifikasi RFC 9457 Problem Details.database-orm-expert untuk pembuatan query type-safe via sqlc, connection pooling pgx/v5, dan integritas transaksi database.sse-websocket-streaming-expert untuk pipeline streaming berbasis channel goroutine dan hub WebSocket berlatensi rendah.autonomous-tdd-debugger, e2e-testing-expert, dan anti-slop untuk eksekusi go test -v ./..., pengujian jam sintetis dengan testing/synctest, dan penegakan penanganan error ketat (if err != nil).brainstorming dan zero-to-prod-orchestrator (Fase 4: Backend & APIs).Panduan Go tingkat ahli untuk membangun microservices, pipeline konkurensi, dan CLI tool berkinerja tinggi. Mencakup fitur Go 1.24+ dan 1.25 (optimasi hash map Swiss Table, weak pointer, pengujian deterministik testing/synctest, direktif tool di go.mod), structured logging dengan slog, ServeMux net/http dengan pola pencocokan rute modern, sqlc untuk SQL type-safe, dan worker pool tangguh.
weak.Pointer), atau generic type alias.testing/synctest tanpa time.Sleep yang rapuh.tool di go.mod.tool di go.mod (Standar Go 1.24+)Go 1.24 menstandardisasi pelacakan perkakas dependensi biner langsung di dalam go.mod, menghapus trik lawas tools.go:
# Menambahkan dependensi tool
go get -tool github.com/sqlc-dev/sqlc/cmd/sqlc@latest
go get -tool github.com/golangci/golangci-lint/cmd/golangci-lint@latest
# Menjalankan tool langsung
go tool sqlc generate
go tool golangci-lint run
weak.Pointer) untuk Cache Memori Ramah GCGo 1.24 menyediakan weak.Make() dan weak.Pointer untuk menunjuk memori tanpa menghalangi Garbage Collector membersihkannya:
package cache
import (
"sync"
"weak"
)
type SesiPengguna struct {
UserID string
AuthToken string
}
type CacheSesiWeak struct {
mu sync.RWMutex
store map[string]weak.Pointer[SesiPengguna]
}
func NewCacheSesiWeak() *CacheSesiWeak {
return &CacheSesiWeak{
store: make(map[string]weak.Pointer[SesiPengguna]),
}
}
func (c *CacheSesiWeak) Set(kunci string, sesi *SesiPengguna) {
c.mu.Lock()
defer c.mu.Unlock()
c.store[kunci] = weak.Make(sesi)
}
func (c *CacheSesiWeak) Get(kunci string) (*SesiPengguna, bool) {
c.mu.RLock()
defer c.mu.RUnlock()
ptr, ada := c.store[kunci]
if !ada {
return nil, false
}
// Dereferensi: mengembalikan nil jika GC telah mengumpulkan memori sesi
nilai := ptr.Value()
if nilai == nil {
return nil, false
}
return nilai, true
}
testing/synctestGo 1.24 memperkenalkan testing/synctest untuk menguji alur waktu asinkron dengan jam virtual seketika:
package antrean_test
import (
"context"
"testing"
"testing/synctest"
"time"
)
func TestBatasWaktuPekerja(t *testing.T) {
synctest.Run(func() {
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
defer cancel()
hasilChan := make(chan string, 1)
go func() {
// Waktu virtual maju seketika saat seluruh goroutine menganggur
time.Sleep(10 * time.Second)
hasilChan <- "sukses"
}()
select {
case hasil := <-hasilChan:
t.Fatalf("alur gagal: menerima data di luar batas waktu %s", hasil)
case <-ctx.Done():
// Berhasil diverifikasi tanpa menunggu 5 detik waktu riil!
t.Log("Pekerja berhasil timeout secara deterministik")
}
})
}
Pemrosesan koleksi secara streaming tanpa alokasi memori berlebih:
package iterator
import "iter"
type Transaksi struct {
ID string
Nominal int64
Gagal bool
}
func TransaksiSukses(daftar []Transaksi) iter.Seq[Transaksi] {
return func(yield func(Transaksi) bool) {
for _, tx := range daftar {
if !tx.Gagal {
if !yield(tx) {
return
}
}
}
}
}
まだレビューはありません。使ってみた感想をお寄せください。
ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。
まだコメントはありません。最初のコメントを書いてみませんか。
A2A agent protocol interoperability, Agent Cards, and MCP bridging / Protokol agen A2A, Agent Cards, dan integrasi MCP.
日本語の概要は準備中です。原文の説明を表示しています。
Expert guide for automated and manual Web Accessibility (a11y) testing — axe-core, Pa11y, Playwright a11y, screen reader testing, and WCAG 2.2 Level AA/AAA compliance / Panduan ahli pengujian aksesibilitas web.
日本語の概要は準備中です。原文の説明を表示しています。
Web accessibility testing with axe-core, Playwright, and WCAG 2.2 / Pengujian aksesibilitas web axe-core, Playwright, dan WCAG 2.2.
日本語の概要は準備中です。原文の説明を表示しています。
Model cascading & complexity-scored routing (Grok, Gemini, Claude) / Routing kaskade model & scoring kompleksitas (Grok, Gemini, Claude).
日本語の概要は準備中です。原文の説明を表示しています。
Expert guide for intelligent model cascading and routing — complexity-scored task routing from Flash/Haiku to Sonnet/Opus/Astra, dynamic escalation with quality gates, 40-60% token cost reduction while maintaining output quality / Panduan ahli untuk kaskade dan routing model cerdas — routing tugas berbasis skor kompleksitas dari Flash/Haiku ke Sonnet/Opus/Astra, eskalasi dinamis dengan gerbang kualitas, pengurangan biaya token 40-60% dengan kualitas output terjaga.
日本語の概要は準備中です。原文の説明を表示しています。
Affective computing, emotion AI, and multimodal sentiment analysis / Komputasi afektif, AI emosional, dan analisis sentimen multimodal.
日本語の概要は準備中です。原文の説明を表示しています。