protext
БесплатноБез исполняемых скриптовНе проверенDynamic context management for AI agents. Invoke /protext at session start to load token-efficient project orientation. Use when (1) Starting a session and…
от diegosouzapw★ 68 звёзд на GitHubОб этом скилле
Protext: Dynamic Context Management
Protext provides a three-layer context hierarchy for token-efficient AI agent orientation.
Core Concept
PROTEXT.md (Layer 0) → .protext/index.yaml (Layer 1) → Deep Context (Layer 2)
~500 tokens Signposts only Full docs/memory
Always loaded On-demand hints Explicit extraction
Separation of Concerns:
- Behavior file = Agent behavior (how to act) — stable, rarely changes
CLAUDE.md(Claude Code) ·GEMINI.md(Gemini CLI) ·AGENTS.md(Codex/OpenCode)
PROTEXT.md= Project state (what's happening) — dynamic, session-aware
File Structure
project-root/
├── PROTEXT.md # Layer 0: Orientation (~500 tokens)
├── CLAUDE.md / GEMINI.md / AGENTS.md # Existing: Behavior instructions (platform-specific)
└── .protext/
├── index.yaml # Layer 1: Extraction signposts
├── handoff.md # Session continuity
├── scopes/
│ ├── ops.md # Operations context
│ ├── dev.md # Development context
│ └── security.md # Security context
└── config.yaml # Protext settings
PROTEXT.md Format
# Protext: [Project Name]
> Generated: YYYY-MM-DD | Scope: [active-scope] | Tokens: ~XXX
## Identity
[1-2 sentences: What is this project/system?]
## Current State
Active: [current work] | Blocked: [blockers] | Recent: [last completed]
## Hot Context
- [Critical point 1]
- [Critical point 2]
- [Critical point 3]
## Scope Signals
- `@ops` → .protext/scopes/ops.md
- `@security` → .protext/scopes/security.md
- `@deep:[name]` → Extract from index
## Links
- `[path]` → [rel-type] | [note]
## Handoff
Last: [summary] | Next: [suggested] | Caution: [warnings]
Commands
/protext (Primary - Session Start)
Load project orientation. This is the main entry point - invoke at session start.
/protext # Load PROTEXT.md + active scope + handoff status
/protext @security # Load with security scope
/protext --full # Include available extractions list
What it does:
- Reads and displays PROTEXT.md (orientation layer)
- Shows handoff status (FRESH/AGING/STALE)
- Loads active scope context
- Lists available deep extractions (with
--full)
Cross-platform: Works as slash command on Claude Code, or natural language on other platforms:
- "Load protext"
- "Show me the project context"
- "What's the current state?"
If no PROTEXT.md exists: Inform the user and offer to run protext init to bootstrap one. Do not fail silently.
protext init
Initialize protext in a project. Reads existing CLAUDE.md to bootstrap.
# Standard mode
"Initialize protext for this project"
"Set up protext here"
# Parent mode (aggregates children)
"protext init --parent"
Creates: PROTEXT.md, .protext/ directory with full structure.
Parent mode: Scans for child .protext/ directories, aggregates their status into ## Child Projects section. One-level hierarchy only.
protext status
Display current protext state.
"Show protext status"
"What's the current context state?"
Shows: Tier, active scope, handoff age, token budget, available extractions.
protext scope [name]
Switch active scope context.
"Switch to ops scope"
"Focus on security context"
"@security" # Shorthand
protext handoff
Capture or display session handoff. User-initiated only — no auto-capture, no TTL enforcement.
"Capture handoff: stopped mid-refactor, next step is testing"
"What was the last handoff?"
Handoff is an optional scratchpad. Only created when user explicitly captures.
protext extract [name]
Pull deep context from index.
"Extract network context"
"@deep:services" # Shorthand
Agent receives extraction suggestion; confirm to load.
protext link [path]
Add a cross-project link. Guided flow — agent asks for relationship type and note.
"Link this project to ../skills-validator"
"protext link ../homelab"
"What projects are linked?"
Relationship types with spatial validation:
child— Subdirectory (./name) — aggregates statusparent— Ancestor (../) — no aggregationsibling— Adjacent (../name) — no aggregationpeer— Any path (relative preferred) — no aggregation
Path preference: Use relative paths (../sibling, ./child) wherever possible — they are portable across nodes and OS mount points. Absolute paths may break on machines with different prefixes (e.g., /mnt/ops on Linux vs /Volumes/ops on macOS).
Validates path patterns with regex enforcement (ERROR if spatial rules violated). Max 5 lateral links. See Spatial Validation Rules in references/commands.md for pattern specs, validation flow, and edge cases.
protext refresh --children
Re-aggregate child status in parent protext. User-initiated only
Установить protext в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл protext?
Dynamic context management for AI agents. Invoke /protext at session start to load token-efficient project orientation. Use when (1) Starting a session and need quick orientation, (2) Handing off between sessions, (3) Managing context for multi-scope projects (dev/ops/security), (4) Linking related projects, (5) Reducing token usage while maintaining awareness. Primary command is /protext to load context. Other commands include protext init, status, scope, handoff, extract, link.
Как установить скилл protext?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл protext запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic