rexleimo/harness-cli/contextdb-autopilot
Claude Code and agent skill by rexleimo/harness-cli
- community
Checking that the SKILL.md file is still in the repository.
Automatic ContextDB session lifecycle — init, session events, checkpoints, and continuity artifacts. Use when you need AIOS context persistence without prompt injection. NOT for general task execution — only for ContextDB session management. TRIGGER: contextdb、session persist、checkpoint save.
Install
npx vskill@latest install rexleimo/harness-cli/contextdb-autopilotSKILL.md
ContextDB Autopilot
Working directory: project root. Commands assume repo root; npm run contextdb runs from mcp-server/.
Overview
Use this skill only to persist and retrieve ContextDB state. ContextDB is no longer a prompt-injection layer.
Runtime rules:
- Do not auto-inject ContextDB packets, continuity summaries, persona overlays, user overlays, route guides, or handoff prompts into model prompts.
- Interactive startup may show a short local unfinished-task summary to the user; it must not pass that summary as model input.
- One-shot mode sends only the explicit
--prompttext to the selected client. - Durable workflow constraints belong in checked-in instruction files (
AGENTS.md,CLAUDE.md,GEMINI.md) and repo-local skills.
Deprecated prompt-loading flags are intentionally unsupported:
--startup-mode inject--context-mode--limitCTXDB_AUTO_PROMPT
If old docs, scripts, or user requests mention these as ways to preload memory, treat them as removed behavior. Use explicit search/timeline retrieval instead.
Script path: scripts/ctx-agent.sh
When to Use
- You want cross-CLI memory continuity (
codex,claude,gemini,opencode) in the same project. - You need automatic session creation, event logging, checkpoints, and continuity/handoff artifact writes.
- You want to retrieve prior facts explicitly before continuing work.
Do not use this skill just to execute a normal coding task. Let the current Rex Capability Command select the task Provider.
Required Pattern
Use one-shot mode (--prompt) when you want automatic logging around a single explicit request. The prompt is not augmented with ContextDB state.
Session Control
- Continue same session:
--session <session_id> - Mark terminal step:
--status done - Disable auto bootstrap for current run:
--no-bootstrap - Disable checkpoint (rare):
--no-checkpoint - Disable auto bootstrap globally:
export AIOS_BOOTSTRAP_AUTO=0 CODEX_HOMEcan be relative; wrappers normalize it against current working directory at runtime.
Interactive wrapper behavior:
- Direct
codex/claude/gemini/opencodestartup routes through AIOS wrappers without prompt injection. - Startup prints only a local unfinished-task summary when tasks/handoffs exist.
- To resume, the user must explicitly name the task/handoff to continue before any ContextDB detail is loaded.
- Route execution defaults to live for team/subagent command templates.
- Override subagent runtime for routed commands with
CTXDB_ROUTE_SUBAGENT_CLIENT=<codex-cli|claude-code|gemini-cli|opencode-cli>.
Bootstrap note:
- On first run in a workspace,
ctx-agentmay auto-createtasks/pending/task_<timestamp>_bootstrap_guidelines/*andtasks/.current-taskif both are empty.
Example:
Verification
- Session files:
.aios/context-db/sessions/<session_id>/ - Continuity artifact:
.aios/context-db/sessions/<session_id>/continuity.json - Handoff artifact:
.aios/context-db/sessions/<session_id>/handoff.json - Manual report export, when requested:
.aios/context-db/exports/<session_id>-context.md
Retrieval Workflow
When retrieving from ContextDB, run search first and then inspect the timeline only for the matching session. Search finds relevant events by keyword; timeline provides chronological context that explains when and why those events occurred.
npm run contextdb -- search --query "<term>" --project <project>— find relevant eventsnpm run contextdb -- timeline --session <session_id> --limit 30— see chronological context
Only then drill into specific events with event:get. If retrieval returns empty, run index:rebuild once and retry both commands.
Optional semantic rerank:
Recovery:
- If retrieval returns empty unexpectedly, run
index:rebuildonce. - Source-of-truth remains
.aios/context-db/sessions/*; sidecar is rebuildable cache.
Compression contract
When a session grows past its budget, compress oldest-first under these rules. Compression reshapes what you carry forward; it never deletes session history — originals stay in .aios/context-db/sessions/* for the user and for audit.
Tier per event range (you declare the tier, the harness only records it):
FULL— keep verbatim (recent rounds, open blockers, unconsumed handoffs).PARTIAL— trim raw tool output, keep conclusions plus evidence refs.SUMMARY— one conclusion line plus evidence refs per event cluster.EXCLUDED— drop pure noise (heartbeats, duplicates, empty polls).
Rules:
- Protect the most recent 2 rounds: never compress them below
PARTIAL. - Summarize, don't truncate: the summary stays agent-visible with evidence
refs so the next round can retrieve the original on demand.
- Every compression writes an auditable event: which range, which tier, and
the resulting refs. Compressed content stays recallable through search.
- State the remaining budget each round; cite it when you choose to compress.
- A compression event that loses an evidence ref is malformed — re-emit it.
Manual Report Export
Use context:pack only for explicit inspection/debug export. Do not feed the report into a model prompt by default. Never paste a full ContextDB Report into a model prompt; if a model needs historical evidence, retrieve only the specific event, checkpoint, or ref the user chose.
Defaults:
- Event dedupe in report view is enabled.
--token-strategysupportslegacy|balanced|aggressive(recommended:balanced).- You can disable with
--no-dedupewhen needed for debugging.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskill-sources/contextdb-autopilot/SKILL.md
Popularity
- Repository stars
- 49
- Repository forks
- 6
- 7-day trend score
- 20
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/rexleimo/harness-cli/contextdb-autopilot)