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/cli-tooling/flags-config/exercise/flagvalue_test.go
View on GitHubpackage main
import (
"flag"
"io"
"slices"
"testing"
)
// TagList must satisfy flag.Value; this fails to compile if it does not.
var _ flag.Value = (*TagList)(nil)
func TestTagListSetAppends(t *testing.T) {
var tags TagList
for _, in := range []string{"build", " nightly ", "arm64"} {
if err := tags.Set(in); err != nil {
t.Fatalf("Set(%q) = %v, want nil", in, err)
}
}
want := []string{"build", "nightly", "arm64"}
if !slices.Equal(tags, want) {
t.Errorf("after Set calls, TagList = %v, want %v", []string(tags), want)
}
if got := tags.String(); got != "build,nightly,arm64" {
t.Errorf("String() = %q, want %q", got, "build,nightly,arm64")
}
}
func TestTagListRejectsEmptyTag(t *testing.T) {
var tags TagList
for _, in := range []string{"", " "} {
if err := tags.Set(in); err == nil {
t.Errorf("Set(%q) = nil, want an error", in)
}
}
if len(tags) != 0 {
t.Errorf("rejected tags were stored anyway: %v", []string(tags))
}
}
func TestTagListStringOnEmptyValue(t *testing.T) {
// flag calls String on a zero value while printing usage.
var tags TagList
if got := tags.String(); got != "" {
t.Errorf("empty TagList.String() = %q, want %q", got, "")
}
}
func TestTagListThroughFlagSet(t *testing.T) {
var tags TagList
fset := flag.NewFlagSet("toolkit", flag.ContinueOnError)
fset.SetOutput(io.Discard)
fset.Var(&tags, "tag", "tag to attach, repeatable")
if err := fset.Parse([]string{"-tag", "alpha", "-tag", "beta"}); err != nil {
t.Fatalf("Parse() = %v, want nil", err)
}
want := []string{"alpha", "beta"}
if !slices.Equal(tags, want) {
t.Errorf("-tag alpha -tag beta gave %v, want %v", []string(tags), want)
}
var empty TagList
fset2 := flag.NewFlagSet("toolkit", flag.ContinueOnError)
fset2.SetOutput(io.Discard)
fset2.Var(&empty, "tag", "tag to attach, repeatable")
if err := fset2.Parse([]string{"-tag", ""}); err == nil {
t.Error("-tag with an empty value parsed cleanly, want an error")
}
}
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: 470k | 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 |