lov-auto-context
БесплатноБез исполняемых скриптовНе проверенManual or hook-triggered context operator. Evaluates the current session for pollution (long conversations, topic drift, stale noise), AND takes concrete…
от lovstudio★ 72 звезды на 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
- Measure — estimate turns, tool calls, distinct topics
- Assess — healthy / getting noisy / polluted / critical
- 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. - Recommend harness actions if needed (
/fork,/compact,/btw) with the exact command to paste.
Keep to 3-5 lines unless taking confirm-first actions.
B. With arguments — targeted context operation
/lov-auto-context <free-form instruction>
Parse the instruction and route to the right action class:
| Instruction pattern | Action | Sensitivity |
|---|---|---|
| "记到全局 / write to global / 加到全局指令" | edit the configured global instructions file | Confirm-first |
| "记到项目 / 加到项目 CLAUDE.md" | edit project CLAUDE.md |
Confirm-first |
| "记住 X / 记到 memory" | write project memory | Auto-execute |
| "忘掉 X / forget X" | remove relevant memory file + index entry | Confirm-first |
| "该分叉了吗 / should I fork" | evaluate + suggest command | Suggest-only |
| "压缩一下 / compact" | suggest /compact with exact syntax |
Suggest-only |
Action: Record Standing Authorization Preferences
A preference can include authorization. When the user explicitly establishes a reusable default, record a standing authorization with all of these fields:
trigger: the user action that activates it, such as explicitly invoking a Skill;action: the high-impact operation being pre-authorized;targetandpayload: the exact object and data class covered;destination: the external service or local boundary;limits: excluded modes, attachments, accounts, or broader background actions;revocation: a plain way for the user to turn it off.
Use surrounding context to resolve short phrases such as “默认同意”. Do not expand “invoking the share Skill authorizes its current sanitized session upload” into “all sessions may be uploaded automatically”. A matching standing authorization removes redundant confirmation; a non-matching action still requires current consent. Never store credentials, tokens, private keys, or approval codes as preferences.
Action: Write Project Memory (auto-execute)
Directory: <resolved-agent-home>/projects/<project-slug>/memory/.
Resolve <resolved-agent-home> from the User Configuration section before
writing. The memory directory should already exist; do not create a new
runtime layout silently.
Procedure:
- Pick filename:
<type>_<topic>.md(e.g.feedback_output_paths.md). - Write with the required frontmatter (
name,description,type). - For
feedback/projecttypes, include**Why:**and**How to apply:**lines. - Update
MEMORY.mdwith one-line pointer under 150 chars. - Report the absolute + relative path.
Action: Edit Global CLAUDE.md (confirm-first)
Target: <resolved-agent-home>/CLAUDE.md.
Procedure:
- Read the file.
- Locate the best section for the addition (match existing heading like "输出规范", "网络 / 代理", "Debugging Discipline"; or create a new se
Установить lov-auto-context в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл lov-auto-context?
Manual or hook-triggered context operator. Evaluates the current session for pollution (long conversations, topic drift, stale noise), AND takes concrete context-shaping actions: writing project memory, updating global or project CLAUDE.md (with diff + confirm), and recommending harness commands like /fork, /compact, /btw. Covers the full surface of context-affecting operations Claude can reach — direct file edits are auto-executed or confirmed based on sensitivity; harness-only commands (/fork etc.) are surfaced as one-click suggestions.
Как установить скилл lov-auto-context?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл lov-auto-context запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic