lov-auto-context

lov-auto-context is a skill for Claude Code from lovstudio/skills. It costs 112 tokens per session (2,221 once invoked), scanned A, original, MIT.

A context-management tool for coding-agent sessions. It checks for long conversations, topic drift, and stale information, then can write project memory, propose instruction changes, or suggest commands such as starting a fresh session.

In plain words
What is it for?
Use it to assess session context, record project memory, update approved project instructions, or receive recommendations to fork or compact a conversation.
Why use it?
It helps keep the agent focused when a conversation becomes noisy or approaches its context limit, while requiring confirmation before sensitive instruction changes.

Skill for Claude Code

Written for Claude Code: UserPromptSubmit hook event. Also seen: mentions CLAUDE.md; mentions Claude Code.

Part of the dev-tools plugin — 122 skills shipped together

Good fit Use it to assess session context, record project memory, update approved project instructions, or receive recommendations to fork or compact a conversation.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/lovstudio/skills/auto-context
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.

Any agent
npx skills add lovstudio/skills --skill auto-context
Clone the repo
git clone --depth 1 https://github.com/lovstudio/skills

Made for: Claude Code.

Or install dev-tools, the plugin that ships this one along with the rest of its 122 skills.

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 lov-auto-context

README.md
[![agentmods](https://agentmods.dev/badge/skills/lovstudio/skills/auto-context/github.svg)](https://agentmods.dev/skills/lovstudio/skills/auto-context)
Your own site
<a href="https://agentmods.dev/skills/lovstudio/skills/auto-context"><img src="https://agentmods.dev/badge/skills/lovstudio/skills/auto-context/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for lov-auto-context

Your own site · 80×15
<a href="https://agentmods.dev/skills/lovstudio/skills/auto-context"><img src="https://agentmods.dev/badge/skills/lovstudio/skills/auto-context.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 112 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,221 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 5 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Excessive Agency · line 11
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
  • medium Excessive Agency · line 76
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
  • medium Excessive Agency · line 100
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
  • medium Excessive Agency · line 32
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
  • medium Excessive Agency · line 95
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
How audits are shown
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.00112 $0.02221
Opus 5.5 $0.00045 $0.00888
Sonnet 5.5 $0.00022 $0.00444
Haiku 4.5 $0.00011 $0.00222

Measured 13d ago against content hash 1862f319f4f1, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

lov-auto-context 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 13d 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.

skills/auto-context/SKILL.md · 223 lines

How it starts

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

上下文哨兵 · Context Sentinel

Not just a health check — a full operator over everything that shapes context. Three layers by action sensitivity:

Layer Examples Behavior
Auto-execute write project memory, update MEMORY.md index Do it, report path
Confirm-first edit global agent instructions, edit project CLAUDE.md, overwrite/delete existing memory Show diff, wait for "yes"
Suggest-only /fork, /compact, /btw, new session Print the exact command to paste

The harness owns /fork and /compact; this skill cannot invoke them. But it can do everything else and will.

Auto Mode (via Plugin Hook)

When the skill-publisher plugin is enabled, a UserPromptSubmit hook monitors transcript size. Above threshold (40+ entries or 150KB+), it injects a lightweight <auto-context> reminder.

When you see <auto-context>:

Context State Action
Mostly relevant Continue, say nothing
Some stale noise Mentally deprioritize, proceed
Mostly irrelevant Suggest /fork or /btw with exact command
Near capacity Suggest /compact or /fork with exact command

Rules:

  • 1 sentence max unless acting.
  • If context is fine, say nothing.
  • Never auto-fork/auto-compact (can't anyway — harness-only).
  • Don't mention "AutoContext" unless asked.

Manual Mode (/lov-auto-context [args])

Two call shapes:

A. Bare call — health report + opportunistic memory write

/lov-auto-context
  1. Measure — estimate turns, tool calls, distinct topics
  2. Assess — healthy / getting noisy / polluted / critical
  3. Scan recent turns for unpersisted feedback/preferences — if the user stated a rule or preference earlier in the session that should persist to future conversations (typical trigger phrases: "从今以后", "以后都", "所有 X 应该 Y", "别再", "记住"), and no memory was written, auto-execute: write the memory file + update MEMORY.md. Report the path. Preferences may include standing authorization when the user explicitly uses durable language such as “以后默认同意”. Preserve its scope instead of downgrading it to a one-off confirmation.
  4. Recommend harness actions if needed (/fork, /compact, /btw) with the exact command to paste.

Read the full file on GitHub · 223 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 13d ago Changed 1862f319f4f1
  2. 2mo ago Changed · +23 lines aa135dda2d1f
  3. 2mo ago Changed c7793dd00f90
  4. 3mo ago First seen · 200 lines · 112 tokens per session scan A 6f3cb48f69e8

Subscribe to this mod's changes

lov-auto-context is a skill published in the GitHub repository lovstudio/skills (72 stars, last pushed today), licensed MIT. It adds 112 tokens to every session and 2,221 once invoked, about $0.0004 per session on Opus 5.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.

Related

lov-auto-context compared with skills from other repositories

lov-auto-context next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
lov-auto-contextlovstudio/skillsSkill72todayMITA112Claude Code
second-brainkidboy-man/vibe-engineeringSkill219d agoMITA47Claude Code, Codex
wiki-ingestkidboy-man/vibe-engineeringSkill219d agoMITA38Claude Code, Codex
wikikidboy-man/vibe-engineeringSkill219d agoMITA34Claude Code, Codex
obsidian-baseskidboy-man/vibe-engineeringSkill219d agoMITA38Claude Code, Codex
obsidian-markdownkidboy-man/vibe-engineeringSkill219d agoMITA42Claude Code, Codex
savekidboy-man/vibe-engineeringSkill219d agoMITA36Claude Code, Codex