home / skills / openclaw / skills / context-scope-tags

context-scope-tags skill

/skills/phenomenoner/context-scope-tags

This skill helps you manage chat context with explicit tags to isolate topics, scope projects, and prevent context bleed.

npx playbooks add skill openclaw/skills --skill context-scope-tags

Review the files below or copy the command above to add this skill to your agents.

Files (2)
SKILL.md
3.6 KB
---
name: context-scope-tags
slug: context-scope-tags
version: 0.2.0
license: MIT
description: |
  Use when: you chat across topics and want explicit boundaries to prevent topic bleed.
  Tags: [ISO], [SCOPE], [GLOBAL], [NOMEM], [REM]. (Memory tags are signals; persistence depends on your agent's memory backend.)
  Don't use when: you prefer free-form conversation where prior context carries over automatically.
  Output: a copy/paste tag cheat sheet + routing rules for how to treat the current message.
metadata:
  openclaw:
    emoji: "🏷️"
---

# Context Scope Tags (Chat Protocol)

A lightweight, portable convention for **explicit context boundaries** in chat.

## Copy/paste cheat sheet (one screen)

- `[ISO: <topic>]` fresh slate for this message (no prior project/topic context)
- `[SCOPE: <topic>]` restrict to one named scope
- `[GLOBAL]` cross-topic reuse allowed (call out what was reused)
- `[NOMEM]` do not store long-term memory from this exchange
- `[REM]` persist preferences/decisions (requires a memory backend; otherwise advisory)

Examples:
- `[ISO: marketing][NOMEM] Draft 5 ad angles for OpenClaw; don't store memory.`
- `[SCOPE: openclaw-mem] Explain why lane A is failing; keep it scoped.`
- `[GLOBAL][REM] Remember: display times in Asia/Taipei unless I say otherwise.`

## Quick start

1) Put one or more tags at the **very start** of your message.
2) Prefer this order: **scope tag(s)** then **memory tag(s)**.
3) Write normally.

Optional: if your assistant supports command-style shortcuts, `/ctx` or `/context_def` can print this cheat sheet.

## Tag parsing rules

- Tags must appear **at the start** of the user's message.
- Multiple tags are allowed.
- Tags do **not** override safety policies, tool access controls, approvals, or platform rules.

### Conflicting tags

Some combinations conflict (for example `[ISO]` + `[GLOBAL]`, or `[REM]` + `[NOMEM]`).

Recommended policy:
- **Last tag wins** for the conflicting dimension.
- If the combination is ambiguous, **ask a clarifying question** rather than guessing.

## Supported tags

### Isolation / scope

- `[ISO: <topic>]` / `[Isolated Context: <topic>]`
  - Treat as a **fresh topic**.
  - Do **not** pull in other conversation/project context unless the user explicitly re-provides it.
  - Allowed implicit carry-over: universal safety rules + a few stable user prefs (timezone, "don't apply changes without approval", etc.).

- `[SCOPE: <topic>]` / `[Scoped Context: <topic>]`
  - Restrict reasoning to the named scope.
  - If missing details inside the scope, ask clarifying questions.

- `[GLOBAL]` / `[Global Context OK]`
  - Cross-topic reuse is allowed.
  - When reusing prior context, call out what was reused.

### Memory intent

- `[NOMEM]` / `[No Memory]`
  - Do not store durable/long-term memories from this exchange.

- `[REM]` / `[Remember]`
  - Signal that preferences/decisions in the message should be persisted.
  - **Dependency note:** actual persistence requires the host agent to have a memory subsystem enabled.

## Default behavior (no tags)

- Be conservative about cross-topic mixing.
- If the user complains about topic bleed, suggest using the tags above.

## Cross-platform / chat-surface notes

- Telegram slash commands cannot contain dashes.
  - Use `/context_def` (underscore), not `/context-def`.
- Slash commands may collide with other bots/skills.
  - If `/ctx` is already taken, use the tag syntax directly (it works everywhere).
- The tags themselves are just text; they work the same on Telegram/Discord/Slack/WhatsApp.
- If a surface auto-formats brackets, it's fine - just keep the tags at the very beginning.

Overview

This skill implements a context-scoping protocol using explicit start-of-message tags to prevent context bleed in chat, with special attention to Telegram. It provides tag parsing rules, a set of supported tags for isolation, scoping, and memory intent, and a compact /ctx or /context_def cheat sheet for users. Use it to ensure the assistant limits or permits cross-topic reuse in predictable ways.

How this skill works

The skill inspects the start of each user message for one or more tags placed at the beginning of the message (one per line or chained). Supported tags signal isolation ([ISO], [SCOPE]), global reuse ([GLOBAL]), or memory intent ([NOMEM], [REM]). Tags do not override safety or tool policies; they only change how conversational context is carried between turns. When asked for /ctx or /context_def the skill returns a short copy/pasteable cheat sheet showing tags, meanings, and two examples.

When to use it

  • When the user wants a fresh, isolated topic and no prior conversation should be assumed.
  • When narrowing reasoning to a specific project, module, or domain using [SCOPE].
  • When the user wants to prevent storing durable preferences or memories ([NOMEM]).
  • When the user asks the assistant to remember a short preference for future sessions ([REM]).
  • When the user requests a quick reference: send /ctx or /context_def (Telegram note: use underscore).

Best practices

  • Require tags to appear at the very start of the message; ignore tags placed later in the text.
  • Prefer short tags but accept long-form equivalents (e.g., [Isolated Context: X]).
  • Always call out what prior context you are reusing when [GLOBAL] is present.
  • Ask clarifying questions if a scoped request lacks necessary details inside [SCOPE].
  • Do not allow tags to override safety policies or external access controls.

Example use cases

  • User: [ISO: token-currency][NOMEM] write a manifesto — start fresh and do not store preferences.
  • User: [SCOPE: openclaw-mem] implement feature flag wiring — restrict reasoning to that module and request missing specifics.
  • User: [GLOBAL] continue earlier design but state which prior elements you are reusing.
  • User: /context_def — return the compact cheat sheet describing tags and two examples.
  • User: [REM] Save my preferred timezone for future tailored responses.

FAQ

Do tags override safety or access rules?

No. Tags only control conversational scope and memory intent; they never override safety policies or tool access controls.

What happens if tags appear mid-message?

Tags must appear at the start of the message. If they appear later, treat the message as untagged and, when appropriate, prompt the user to resend with tags at the start.