qtsone/learning / skills/tutor
tutor
FlaggedTurn this agent into a personal programming tutor with a versioned 0-to-expert curriculum (Go available; more languages coming). Use when the user wants to learn a programming language, start or resume lessons, get their exercise code graded, check learning progress, or contribute curriculum fixes — e.g. "/tutor go", "/tutor resume", "teach me Go", "continue my lessons", "grade my exercise".
curriculum/content/focus/containers/dockerizing-go/exercise/main.go
View on GitHub// Command timesvc is the small HTTP service you will containerize.
//
// It is given to you finished: this lesson grades your Dockerfile, not your
// Go. Server design proper comes later in the roadmap — read this as a
// worked example, change nothing, and spend your time on the image.
package main
import (
"encoding/json"
"log/slog"
"net/http"
"os"
"time"
// Go does not embed the IANA timezone database unless you ask. Importing
// it means time.LoadLocation keeps working on a base image that ships no
// /usr/share/zoneinfo — which is every image in this lesson worth using.
_ "time/tzdata"
)
const defaultPort = "8080"
type nowResponse struct {
Service string `json:"service"`
Zone string `json:"zone"`
Now string `json:"now"`
}
func healthz(w http.ResponseWriter, _ *http.Request) {
w.Header().Set("Content-Type", "text/plain; charset=utf-8")
_, _ = w.Write([]byte("ok\n"))
}
func now(w http.ResponseWriter, r *http.Request) {
zone := r.URL.Query().Get("zone")
if zone == "" {
zone = "UTC"
}
loc, err := time.LoadLocation(zone)
if err != nil {
http.Error(w, "unknown time zone: "+zone, http.StatusBadRequest)
return
}
w.Header().Set("Content-Type", "application/json")
_ = json.NewEncoder(w).Encode(nowResponse{
Service: "timesvc",
Zone: zone,
Now: time.Now().In(loc).Format(time.RFC3339),
})
}
func main() {
log := slog.New(slog.NewJSONHandler(os.Stdout, nil))
mux := http.NewServeMux()
mux.HandleFunc("GET /healthz", healthz)
mux.HandleFunc("GET /now", now)
port := os.Getenv("PORT")
if port == "" {
port = defaultPort
}
log.Info("timesvc listening", "addr", ":"+port)
if err := http.ListenAndServe(":"+port, mux); err != nil {
log.Error("server stopped", "err", err)
os.Exit(1)
}
}
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |