Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/far-200/think-before-code/complexity-coachnpx skills add Far-200/think-before-code --skill complexity-coachgit clone --depth 1 https://github.com/Far-200/think-before-codeWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00077 | $0.01020 |
| Opus 5 | $0.00039 | $0.00510 |
| Sonnet 5 | $0.00015 | $0.00204 |
| Haiku 4.5 | $0.00008 | $0.00102 |
Grade A, and why
complexity-coach scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 101 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Complexity Coach
Why this exists
dsa-tutor asks about complexity once, as one item among several during verification. That's enough to check the box, but it's not enough to build the skill of derivation — most learners answer with the complexity they've memorized for a pattern name, not one they worked out from the actual code in front of them. This skill exists to drill the derivation itself, either standalone or as a deeper follow-up to that single verification question.
This skill does not evaluate whether the algorithm is correct, and it
does not suggest a better approach. If the learner's approach itself
is in question, that's dsa-tutor's job. A broad review of existing
code — correctness, maintainability, design — is code-review-coach's
session; this skill applies when complexity derivation is the
question itself, even if it arrived as one lens of such a review.
Circuit breaker
Never state the Big-O for the learner. If they state one first, treat it as a claim to be justified, not a fact to confirm.
Has the learner derived the complexity from the actual structure of
their code or approach — loop bounds, recursion depth, or amortized
cost — rather than recalled it from the pattern's name?
NO → ask them to derive it. Don't confirm or correct yet.
YES → check it against a degenerate input before accepting it.
Protocol
- Identify every loop and recursive call, and ask the learner to state its bound in terms of the input size — not "it loops a bit," an actual expression.
- For nested structures, ask the learner to derive the total
work as a sum over iterations rather than reciting a shape like
"nested loop = O(n²)." A nested loop whose inner bound changes
each pass is not automatically a different complexity — a loop
that runs
n + (n-1) + (n-2) + ... + 1times is still Θ(n²), just arrived at through a sum instead of a flat multiplication. The point isn't to memorize which shapes are which; it's to make the learner actually sum or multiply the bounds instead of guessing from the shape. - For recursion, ask them to write the recurrence relation
(
T(n) = ...) before reaching for a name. Then ask whether they can solve it by unrolling it a few levels, or whether they recognize a Master Theorem case — don't supply which case applies. - For amortized structures (dynamic arrays, union-find with path compression, a two-pointer scan that never backtracks), ask them to reason about total work across all operations, not the worst single one.
- Ask space separately from time. Auxiliary space vs. input space, and whether the call stack from recursion counts (it does).
- Stress-test the claim against a degenerate input: does the complexity change for an already-sorted array, all-duplicate values, or an empty input? If the learner hasn't considered this, ask rather than tell.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 101 lines · 77 tokens per session scan A a9de41520ba9
complexity-coach is a skill published in the GitHub repository Far-200/think-before-code (8 stars, last pushed 17d ago), licensed MIT. It adds 77 tokens to every session and 1,020 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
configure-profile
Create or update the global learner profile. Interviews the learner using the measurement checklist in references/PROFILE-TEMPLATE.md and writes the structured result to profile/PROFILE.md. Use when a new learner sets up Upstack for the first time, or after completing a course to update skills and Dreyfus levels.
create-course
Scaffold a new course directory from the COURSE.md schema. Creates the directory structure, populates COURSE.md with YAML frontmatter and markdown template sections, and creates stub assignment directories. Use for curated courses (core/courses/) or personal courses (custom/courses/) in any domain.
start-course
Initialise a learning session. Checks for an existing journal in progress/ /journal.md, creates one from the template if missing, loads the course definition, and calibrates to the learner's declared context. Use when starting a new course or resuming after a break.
start-learning-path
Enrol in a curated learning path. Discovers available paths, presents project options in plain language, records the learner's choice, initialises the integration journal, and displays the full course roadmap. Run once at the start of the path — not at the start of each course. Distinguishes enrolment (path level…
complete-assignment
Run the reasoning review gate for a completed assignment. Asks 2-3 Reasoning Review Prompts from COURSE.md, verifies genuine understanding, and only marks the assignment complete if the learner demonstrates conceptual grasp. Use when a learner finishes an assignment and is ready for verification.
check-progress
Display current completion state for one or all active courses. Runs collect-progress.js to parse journals and extract completion percentages with git timestamps. Use when the learner asks about their progress or at the start of a session.