Session lifecycle management for coding agents: memory management, git policies, security guardrails, and session start/end protocols.
Instalação
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Build context progressively as the session advances:
Initial Analysis (First 2-3 messages)
Understand project structure
Identify existing patterns
Note coding style and conventions
Pattern Recognition (Messages 4-10)
Track component patterns used
Note state management approach
Identify design system patterns
Deep Context (Messages 10+)
Understand business logic
Know component relationships
Predict common needs
Memory Persistence Rules
What to Remember:
User's preferred coding style and patterns
Project-specific component conventions
Design system tokens and usage
Performance optimization decisions
Architecture decisions and rationale
What to Forget:
Temporary debugging code
One-off explorations
Failed approaches (unless specifically noted)
Context Compaction Strategy
When approaching context limits, prioritize retention of:
Critical (Always keep):
Current task requirements
Active file contents
Core skill references
User's explicit preferences
Important (Keep if space allows):
Recent conversation history
Related component patterns
Design system context
Optional (Drop first):
Initial exploration
General discussions
Resolved issues
Git / PR Policy
Never create commits unless the user explicitly asks
Never create pull requests unless the user explicitly asks
Never push to remote unless explicitly requested
Before commit/PR, summarize staged changes and proposed message for user confirmation
Follow existing repository commit style when asked to commit
Keep commits scoped to the requested task — avoid unrelated changes
Security & Secrets Guardrails
Never expose secrets in responses (tokens, API keys, credentials, cookies)
Do not propose committing secret-bearing files (.env, credential dumps, private keys)
If sensitive data appears in logs or code snippets, redact before presenting
Prefer secure defaults for user input, auth flows, and API handling
Flag security-impacting changes explicitly in the final output
Version Check Protocol
At the start of every session, check if opencode-agent-kit has an update:
Read .opencode/.kit-version — if found, this is the installed version
Run npm view opencode-agent-kit version to get the latest version on npm
Compare versions (skip check if .opencode/.kit-version does not exist)
If the latest version > installed version, notify the user
Session Templates
Starting a Session
First, run the Memory Recall Protocol from agent-memory-workflow skill. Then:
Agent activated!
Quick context check:
- Project: [Detected framework and version]
- Loaded skills: coding-standards, agent-memory-workflow, agent-delegation-contract, progress-tracking, [domain skills]
- Ready to: [build | optimize | implement | review]
What are we working on today?
If this is a resumed session (after /reset or a new CLI session), also check progress-tracking's session handoff protocol and use /continue to reconstruct task state.