Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
lovstudio avatar

Lovstudio Auto Context

  • 10 installs
  • Updated August 4, 2026
  • lovstudio/dev-skills

Helps with ai & agent building tasks.

About

lovstudio-auto-context is a Claude Code skill for ai & agent building. It helps solo builders move faster with AI-assisted coding.

  • lovstudio-auto-context
  • AI & Agent Building
  • AI-coding skill

Lovstudio Auto Context by the numbers

  • 10 all-time installs (skills.sh)
  • +2 installs in the week ending Aug 2, 2026 (Skillselion tracking)
  • Ranked #11,937 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/lovstudio/dev-skills --skill lovstudio-auto-context

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs10
Last updatedAugust 4, 2026
Repositorylovstudio/dev-skills

What it does

Helps with ai & agent building tasks.

Files

SKILL.mdMarkdownGitHub ↗

AutoContext: Context Operator

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

LayerExamplesBehavior
Auto-executewrite project memory, update MEMORY.md indexDo it, report path
Confirm-firstedit global agent instructions, edit project CLAUDE.md, overwrite/delete existing memoryShow diff, wait for "yes"
Suggest-only/fork, /compact, /btw, new sessionPrint 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 lovstudio 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 StateAction
Mostly relevantContinue, say nothing
Some stale noiseMentally deprioritize, proceed
Mostly irrelevantSuggest /fork or /btw with exact command
Near capacitySuggest /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 (/lovstudio-auto-context [args])

Two call shapes:

A. Bare call — health report + opportunistic memory write

/lovstudio-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. 4. 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

/lovstudio-auto-context <free-form instruction>

Parse the instruction and route to the right action class:

Instruction patternActionSensitivity
"记到全局 / write to global / 加到全局指令"edit the configured global instructions fileConfirm-first
"记到项目 / 加到项目 CLAUDE.md"edit project CLAUDE.mdConfirm-first
"记住 X / 记到 memory"write project memoryAuto-execute
"忘掉 X / forget X"remove relevant memory file + index entryConfirm-first
"该分叉了吗 / should I fork"evaluate + suggest commandSuggest-only
"压缩一下 / compact"suggest /compact with exact syntaxSuggest-only

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: 1. Pick filename: <type>_<topic>.md (e.g. feedback_output_paths.md). 2. Write with the required frontmatter (name, description, type). 3. For feedback / project types, include **Why:** and **How to apply:** lines. 4. Update MEMORY.md with one-line pointer under 150 chars. 5. Report the absolute + relative path.

Action: Edit Global CLAUDE.md (confirm-first)

Target: <resolved-agent-home>/CLAUDE.md.

Procedure: 1. Read the file. 2. Locate the best section for the addition (match existing heading like "输出规范", "网络 / 代理", "Debugging Discipline"; or create a new section if none fits). 3. Show the proposed diff as a fenced block with -/+ lines. 4. Ask: "执行这个修改?(yes/no)" 5. On "yes" → apply via Edit. On anything else → abort, optionally offer to save as project memory instead.

Never skip the diff step. CLAUDE.md is user-authored authoritative config; silent edits erode trust.

Action: Edit Project CLAUDE.md (confirm-first)

Same flow as global, but target is <cwd>/CLAUDE.md (walk up if not at root). Same diff-then-confirm requirement.

Action: Suggest Harness Commands (suggest-only)

Produce the exact string the user should paste, not a description:

context polluted — paste this to fork:
/fork

or

approaching capacity — compact first, then continue:
/compact

Do not wrap in explanations. The command is the deliverable.

What this skill cannot do (be honest about it)

  • Invoke /fork, /compact, /btw, /clear, new session — harness-only.
  • Edit another agent's transcript.
  • Auto-install hooks — use /update-config for that.

If the user asks for one of these, say so and give them the command to paste.

Output convention

Every action that writes a file must echo its absolute + relative path (per project-wide output-paths rule). Applies to memory files, CLAUDE.md edits (show final path), and any derived artifacts.

User Configuration

Resolve agent paths in this order:

1. LOVSTUDIO_AUTO_CONTEXT_AGENT_HOME. 2. Shared profile ${LOVSTUDIO_SKILLS_PROFILE:-$HOME/.lovstudio/skills/profile.json} keys: agent.home, claude.home, or runtime.agent_home. 3. Ask the user once for the agent home directory and use that value for the current operation.

For alternate runtimes, set LOVSTUDIO_AUTO_CONTEXT_AGENT_HOME explicitly or add the relevant profile key.

Related skills

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.