save-from-chat

save-from-chat is a command for Cursor from andiupn/andy-universal-agent-rules. It costs 0 tokens per session (294 once invoked), scanned A, original, MIT.

A chat command that reviews the current coding conversation and saves useful lessons to a project knowledge base. It records errors and fixes, working patterns, architecture decisions, and project context.

In plain words
What is it for?
Use it after a coding session to save bugs and fixes, reusable techniques, technology decisions, or important project information.
Why use it?
It prevents important discoveries from being lost when the chat ends or another developer takes over. The saved notes can document both solutions and mistakes to avoid.

Command for Cursor

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/andiupn/andy-universal-agent-rules/save-from-chat
Clone the repo
git clone --depth 1 https://github.com/andiupn/andy-universal-agent-rules

Made for: Cursor.

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 save-from-chat

README.md
[![agentmods](https://agentmods.dev/badge/commands/andiupn/andy-universal-agent-rules/save-from-chat.svg)](https://agentmods.dev/commands/andiupn/andy-universal-agent-rules/save-from-chat)
Your own site
<a href="https://agentmods.dev/commands/andiupn/andy-universal-agent-rules/save-from-chat"><img src="https://agentmods.dev/badge/commands/andiupn/andy-universal-agent-rules/save-from-chat.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 294 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 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.00000 $0.00294
Opus 5 $0.00000 $0.00147
Sonnet 5 $0.00000 $0.00059
Haiku 4.5 $0.00000 $0.00029

Measured 4d ago against content hash 698d8d73ae05, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

save-from-chat 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 4d 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.

.cursor/commands/save-from-chat.md · 49 lines

What it actually says

Save Knowledge from Chat

Scan this chat session and save important learnings to the knowledge base.

What to Look For

  • Errors that occurred and their solutions
  • Solutions that worked
  • 💡 Patterns or techniques that were effective
  • 🏗️ Decisions about architecture or technology
  • ⚠️ Gotchas to avoid in the future

Categories

Category Use When
gotchas Production bugs, errors to avoid
patterns Working code patterns
decisions Architecture/tech choices
context Project information

How to Save

# Save a gotcha
python .agent/scripts/save-knowledge.py --category gotchas "CRITICAL: describe the issue and solution"

# Save a pattern
python .agent/scripts/save-knowledge.py --category patterns "PATTERN: describe the pattern"

# Save a decision
python .agent/scripts/save-knowledge.py --category decisions "DECISION: what was decided and why"

Expected Output

Report what was saved:

✅ Saved 3 learnings from this chat:
   - gotchas/issue-name.md
   - patterns/pattern-name.md
   - decisions/decision-name.md

Use: Type /save-from-chat in Cursor Chat

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. 4d ago First seen · 49 lines · 0 tokens per session scan A 698d8d73ae05

Subscribe to this mod's changes

save-from-chat is a command published in the GitHub repository andiupn/andy-universal-agent-rules (2 stars, last pushed 2mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 294 tokens. 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.