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/cobra/exercise/store.go
View on GitHubpackage main
import (
"errors"
"fmt"
"slices"
)
// ErrNoteNotFound reports that no note with the requested id exists. Callers
// match it with errors.Is instead of comparing message text.
var ErrNoteNotFound = errors.New("note not found")
type Note struct {
ID string `json:"id"`
Text string `json:"text"`
Tags []string `json:"tags"`
}
// Store is everything the commands need from storage. Commands receive it as a
// dependency, so a test can hand them an in-memory implementation and a real
// main can hand them something else later.
type Store interface {
Add(text string, tags []string) Note
All() []Note
Tag(id string, tags ...string) (Note, error)
Tags() []string
}
// MemStore keeps notes in memory for the life of one process. Persistence is
// not this lesson's subject.
type MemStore struct {
notes []Note
seq int
}
func NewMemStore() *MemStore { return &MemStore{} }
func (m *MemStore) Add(text string, tags []string) Note {
m.seq++
n := Note{ID: fmt.Sprintf("n%d", m.seq), Text: text, Tags: append([]string{}, tags...)}
m.notes = append(m.notes, n)
return n
}
func (m *MemStore) All() []Note {
return append([]Note{}, m.notes...)
}
func (m *MemStore) Tag(id string, tags ...string) (Note, error) {
for i := range m.notes {
if m.notes[i].ID != id {
continue
}
for _, t := range tags {
if !slices.Contains(m.notes[i].Tags, t) {
m.notes[i].Tags = append(m.notes[i].Tags, t)
}
}
return m.notes[i], nil
}
return Note{}, fmt.Errorf("%w: %s", ErrNoteNotFound, id)
}
func (m *MemStore) Tags() []string {
out := []string{}
for _, n := range m.notes {
for _, t := range n.Tags {
if !slices.Contains(out, t) {
out = append(out, t)
}
}
}
slices.Sort(out)
return out
}
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 |