vbw:teach

vbw:teach is a command for Claude Code from swt-labs/vibe-better-with-claude-code-vbw. It costs 25 tokens per session (1,171 once invoked), scanned A, original, MIT.

A project-convention manager that lets you view, add, and maintain the rules your codebase follows, such as naming or file placement.

In plain words
What is it for?
Use it to list known conventions, refresh automatically detected rules, or add a rule in plain text.
Why use it?
It keeps project rules in one place and points out conflicts with conventions already detected in the codebase.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions CLAUDE.md; names the AskUserQuestion tool.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the vbw plugin — 11 skills, 26 commands, 7 agents, 11 hooks shipped together

Good fit Use it to list known conventions, refresh automatically detected rules, or add a rule in plain text.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add swt-labs/vibe-better-with-claude-code-vbw
Claude Code
/plugin install vbw

Made for: Claude Code.

Or install vbw, the plugin that ships this one along with the rest of its 11 skills, 26 commands, 7 agents, 11 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for vbw:teach

README.md
[![agentmods](https://agentmods.dev/badge/commands/swt-labs/vibe-better-with-claude-code-vbw/teach.svg)](https://agentmods.dev/commands/swt-labs/vibe-better-with-claude-code-vbw/teach)
Your own site
<a href="https://agentmods.dev/commands/swt-labs/vibe-better-with-claude-code-vbw/teach"><img src="https://agentmods.dev/badge/commands/swt-labs/vibe-better-with-claude-code-vbw/teach.svg" alt="Measured on agentmods" height="20"></a>
Per session 25 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,171 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00025 $0.01171
Opus 5 $0.00013 $0.00585
Sonnet 5 $0.00005 $0.00234
Haiku 4.5 $0.00003 $0.00117

Measured 8d ago against content hash b9451a3bd563, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

vbw:teach 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 8d 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.

commands/teach.md · 107 lines

How it starts

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

VBW Teach $ARGUMENTS

Context

Working directory:

!`pwd`

Plugin root: ${CLAUDE_PLUGIN_ROOT} Conventions:

!`cat .vbw-planning/conventions.json 2>/dev/null || echo "No conventions found"`

Codebase map:

!`ls .vbw-planning/codebase/INDEX.md 2>/dev/null && echo "EXISTS" || echo "NONE"`

Guard

If no .vbw-planning/ dir: STOP "Run /vbw:init first." (check .vbw-planning/config.json)

Convention Structure

Stored in .vbw-planning/conventions.json:

{
  "conventions": [{
    "id": "CONV-001", "rule": "API routes go in src/routes/{resource}.ts",
    "source": "auto-detected", "category": "file-structure",
    "confidence": "high", "detected_from": "PATTERNS.md", "added": "2026-02-10"
  }]
}

Sources: auto-detected (from codebase map) | user-defined (manual via /vbw:teach) Categories: file-structure | naming | testing | style | tooling | patterns | other Confidence (auto-detected only): high (80%+) | medium (50-80%) | low (<50%)

Behavior

No arguments: Display known conventions

  1. Read .vbw-planning/conventions.json. If missing, show empty state with examples (/vbw:teach refresh and /vbw:teach "convention text").
  2. Display conventions grouped by category. Tag: [auto . {confidence}] or [user]. Show totals.
  3. AskUserQuestion: "What would you like to do?" Options: "Add a convention" | "Refresh from codebase" (if map exists) | "Done"

Text argument: Add a convention

A1. Parse: Extract rule text. Infer category:

  • File paths/dirs → file-structure
  • Casing/naming/prefixes → naming
  • Test/coverage/vitest/jest/pytest → testing
  • Style/formatting/imports → style
  • Tool names (eslint, prettier, pnpm) → tooling
  • Patterns/architecture/state/API → patterns
  • Otherwise → other

A2. Conflict check: Compare against ALL existing conventions:

  • Semantic conflict (contradicting rules): display ⚠, AskUserQuestion: "Replace existing" | "Keep both" | "Cancel"
  • Redundancy (essentially same rule): display ○, AskUserQuestion: "Replace with new version" | "Add as separate" | "Cancel"

Read the full file on GitHub · 107 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. 8d ago First seen · 107 lines · 25 tokens per session scan A b9451a3bd563

Subscribe to this mod's changes

vbw:teach is a command published in the GitHub repository swt-labs/vibe-better-with-claude-code-vbw (79 stars, last pushed 2mo ago), licensed MIT. It adds 25 tokens to every session and 1,171 once invoked, about $0.0001 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-30.