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 commands/majiayu000/vibeguard/learngit clone --depth 1 https://github.com/majiayu000/vibeguardWrote 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.
[](https://agentmods.dev/commands/majiayu000/vibeguard/learn)<a href="https://agentmods.dev/commands/majiayu000/vibeguard/learn"><img src="https://agentmods.dev/badge/commands/majiayu000/vibeguard/learn.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00031 | $0.03651 |
| Opus 5 | $0.00015 | $0.01826 |
| Sonnet 5 | $0.00006 | $0.00730 |
| Haiku 4.5 | $0.00003 | $0.00365 |
Grade A, and why
VibeGuard: Learn 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 6d 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 — 376 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Core Concept
- Agent's mistakes are not the end, but a signal to improve the defense system.
- When the Agent discovers non-obvious solutions, it should be extracted into reusable knowledge
- Goal: Mistakes will no longer be repeated + Experience will no longer be forgotten
Pattern routing
Automatically select a mode based on parameters and context:
| input | mode |
|---|---|
| User describes error/bug/guard failure | Mode A: error analysis → output guard/hook/rule |
| User said "extract" / "Extract experience" / "What was learned" | Mode B: Experience extraction → Output SKILL.md |
| Stop hook automatically triggered (no parameters) | Evaluate first → select A or B as needed |
| Session with both bug fixes and non-obvious findings | A + B both executed |
Mode A: Error analysis (defense-oriented)
Learn from mistakes and generate guard rules or hooks to prevent similar mistakes from happening again.
Trigger scene
- Agent created duplicate files/types (L1 failed)
- Agent hard-coded path/port/URL (L4 failure)
- Agent introduces data splitting (multiple entries are inconsistent)
- Agent is unnecessarily over-designed (L5 failure)
- The guard script has false positives or false negatives
- Any recurring Agent error patterns
Guardrails
- No direct fixes to the business code — only improvements to VibeGuard itself
- New rules must be verifiable (can write scripts to detect or test assertions)
- Don’t overgeneralize — one error pattern corresponds to one precise rule
Steps
- Automatic pattern recognition (extracted from events.jsonl + learn-digest.jsonl)
- Read
~/.vibeguard/projects/<hash>/events.jsonland analyze recent event records - Read
~/.vibeguard/learn-digest.jsonlto obtain the cross-session signals recognized by GC regular learning (repeated_warn / chronic_block / hot_files / slow_sessions / warn_escalation) - For a bounded current-project preview, resolve the VibeGuard checkout before running the analyzer:
VIBEGUARD_REPO_DIR="${VIBEGUARD_REPO_DIR:-$(cat "$HOME/.vibeguard/repo-path" 2>/dev/null)}" test -f "$VIBEGUARD_REPO_DIR/scripts/gc/learn_digest.py" || { echo "VibeGuard repo path missing; rerun setup.sh from a VibeGuard checkout" >&2; exit 1; } python3 "$VIBEGUARD_REPO_DIR/scripts/gc/learn_digest.py" --scope current --project-root "$PWD" --dry-run --format json --no-code-scan - Preview mode reads only the resolved current project log directory and does not append
learn-digest.jsonlor update.learn-watermark - Extract high-frequency warn patterns: similar problems that have been warned many times but still reoccur
- Extract similar operations that are repeatedly blocked: identify the operation patterns in which the agent repeatedly hits the wall
- Group by hook + reason to output top 5 high-frequency problems
- Use recognized patterns as input for subsequent analysis (no longer relying solely on user descriptions)
- Read
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.
- 6d ago First seen · 376 lines · 31 tokens per session scan A c58b3f272376
VibeGuard: Learn is a command published in the GitHub repository majiayu000/vibeguard (41 stars, last pushed yesterday), licensed MIT. It adds 31 tokens to every session and 3,651 once invoked, about $0.0002 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.
Other commands, from other repositories
patterns
List makoto's integrity pattern catalog (read-only).
show
Read makoto's results ledger by key (read-only).
status
Show makoto's integrity-guardrail state (read-only).
claudemd-design-adopt
Generate a thin, fact-based DESIGN.md from a UI project's real design-token sources and wire it into project CLAUDE.md. Use when (1) the user asks to configure design specs / 配置设计规范 / 设计规范 for agents, (2) UI sessions keep inventing colors or spacing instead of using the project's existing tokens, (3) a UI project…
claudemd-refresh
Refresh the installed claudemd plugin to the latest released version in one shot (marketplace update → uninstall → install via the claude CLI). Use when the SessionStart banner reports a newer version, or /claudemd-doctor flags a stale plugin cache. Restart Claude Code afterwards — spec + manifest then sync…
claudemd-update
Sync /.claude/CLAUDE.md with the plugin-cache shipped spec. Shows diff summary; user chooses apply-all or cancel.