setup

A setup command for installing the ntucool command-line program and logging in to NTU COOL, National Taiwan University’s online course system. It verifies that the program is available and that the saved login session works.

In plain words
What is it for?
Use it to install ntucool, sign in with NTU’s account system, confirm the current user, and prepare access to courses, assignments, grades, and course materials.
Why use it?
It removes the manual setup needed before using NTU COOL from the command line or through its MCP tools. Submitting assignments remains disabled by default until the write permission is raised.

Command

Install

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.

agentmods
npx agentmods add commands/kc0506/ntucool/setup
Clone the repo
git clone --depth 1 https://github.com/kc0506/ntucool
Per session 16 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,164 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What 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.

ModelPer sessionOnce invoked
Fable 5 $0.00016 $0.01164
Opus 5 $0.00008 $0.00582
Sonnet 5 $0.00003 $0.00233
Haiku 4.5 $0.00002 $0.00116

Measured yesterday against content hash e208303b6ef4, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

setup scanned grade C with 2 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 yesterday.

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.

Downloads and executes remote codehighSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

curl --proto '=https' --tlsv1.2 -LsSf https://github.com/kc0506/ntucool/releases/latest/download/ntucool-installer.sh | sh

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl --proto '=https' --tlsv1.2 -LsSf https://github.com/kc0506/ntucool/releases/latest/download/ntucool-installer.sh | sh
plugins/ntucool/commands/setup.md · 98 lines

How it starts

The opening of the file, as written. The whole thing — 98 lines — stays where its author put it; the contents beside it link to each section on GitHub.

ntucool setup

End state: cool on PATH, a valid NTU COOL session on disk, cool whoami works. Once that's true, the MCP tools (cool mcp) and the CLI both work end-to-end — but read-only: assignments_submit is gated by write_level and refuses every submit at the default level (none). Surface this when you report setup complete (Step 3) so the user knows the gate exists and how to lift it.

Step 0: Detect current state

which cool 2>/dev/null
[ -f "${XDG_DATA_HOME:-$HOME/.local/share}/ntucool/session.json" ] && echo "session: present" || echo "session: missing"
cool whoami 2>&1 | head -1

Decide what's needed:

cool on PATH? cool whoami succeeds? Action
no Step 1 (install) → Step 2 (login) → Step 3 (verify)
yes yes Already set up. Stop.
yes no Step 2 (login) → Step 3 (verify)

Step 1: Install the cool binary

Branch on the environment context's Platform: value (do not run uname; the Bash tool may report MINGW/MSYS under Windows).

Linux (linux) — also covers WSL:

curl --proto '=https' --tlsv1.2 -LsSf https://github.com/kc0506/ntucool/releases/latest/download/ntucool-installer.sh | sh

Windows + bash / Git Bash (win32, Shell bash): same curl command as Linux.

Windows + PowerShell (win32, Shell powershell / pwsh / cmd):

powershell -ExecutionPolicy ByPass -c "irm https://github.com/kc0506/ntucool/releases/latest/download/ntucool-installer.ps1 | iex"

macOS (darwin): no prebuilt binaries yet (GitHub free-tier macOS runner queue is unresolved). Fall back to cargo install:

command -v cargo 2>&1

If cargo is found:

cargo install ntucool

If not, stop and tell the user: install Rust from https://rustup.rs/, then re-run /ntucool:setup.

After install, confirm cool resolves:

which cool

It should print a path under ~/.cargo/bin/ (or the matching Windows location). If empty, stop and surface the install error — don't proceed to Step 2.

Read the full file on GitHub · 98 lines

Changes

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.

  1. yesterday First seen · 98 lines · 16 tokens per session scan C e208303b6ef4

Subscribe to this mod's changes

setup is a command published in the GitHub repository kc0506/ntucool (10 stars, last pushed 1mo ago), licensed MIT. It adds 16 tokens to every session and 1,164 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it C with 2 findings (downloads and executes remote code, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.