# Active Context

> >-

- **Type:** Skill
- **Install:** `agentstack add skill-vivary-dev-vivary-active-context-skill`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [vivary-dev](https://agentstack.voostack.com/s/vivary-dev)
- **Installs:** 0
- **Category:** [Developer Tools](https://agentstack.voostack.com/c/developer-tools)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [vivary-dev](https://github.com/vivary-dev)
- **Source:** https://github.com/vivary-dev/vivary/tree/dev/packages/create-vivary/create_vivary_assets/active-context-skill
- **Website:** https://vivary.vercel.app/

## Install

```sh
agentstack add skill-vivary-dev-vivary-active-context-skill
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# active-context

Active context is an optional sidecar for a Vivary workspace. Vivary routes the work;
CocoIndex-code finds fuzzy source-code candidates when names are unknown and plain file
search is wasting context. The core truth stays the typed graph (`tropo`) and the
agent loop (`strato`).

For the compact copy/paste agent guide, use the canonical Vivary docs page:
https://vivary.vercel.app/llm-active-context/

## Ask First

Ask before installing, initializing, indexing, enabling MCP, or sending code to any
external embedding provider. These are Vivary gates. If the user has already approved
the sidecar for this workspace, say so and continue.

Use a short question like:

> Should I use CocoIndex-code for active semantic context on this codebase before I
> continue?

Explain the tradeoff in one sentence: it can improve semantic retrieval, but it may
create local index state and, depending on embedding settings, may send source text to
an external provider.

## When To Use It

Use CocoIndex-code when:

- the task asks "where is this implemented?" and exact names are unknown;
- a feature spans several modules, routes, packages, or languages;
- grep/rg returns too much, too little, or only naming coincidences;
- you are onboarding to an unfamiliar codebase;
- a refactor, review, or risk check needs related implementations by meaning;
- the user explicitly asks for CocoIndex, `ccc`, semantic code search, or active
  context.

Skip it when:

- the exact file, symbol, or string is already known;
- the codebase is tiny enough that `rg` and direct reads are cheaper;
- source sensitivity is unknown and the embedding path is not approved;
- the question is Vivary graph truth, where `tropo graph` / `tropo blast` should lead.

## Retrieval Order

1. Ask Vivary what to open first: `tropo find "" --budget 1200 --json`.
2. Read the Vivary graph when ids, edges, or blast radius matter: `tropo graph`,
   `tropo blast `, or `ozone impact `.
3. Use `modules/index.md` and the relevant `modules//index.md` to stay DRY.
4. Use CocoIndex-code for semantic candidates: `ccc search --refresh ""`.
5. Read the matched files and nearby lines directly before acting.
6. Verify with the repo's tests/build and Vivary checks (`tropo check`,
   `ozone review`) before a gate.

## Useful Commands

```bash
uv tool install --python 3.11 --upgrade "cocoindex-code[full]"
ccc init -f
ccc doctor
ccc index
ccc status
ccc search --refresh "authentication flow"
ccc search --lang python --path "src/db.py" "database connection pool"
```

For `ccc search --path`, prefer an exact indexed path. Broad folder globs such as
`src/*` may not match in current CocoIndex-code releases; if a path filter returns no
results, run the query without `--path`, then retry with one exact returned file path.

For non-interactive Windows agent runs, use `cmd /c "echo. | ccc init -f"` so `ccc`
uses the default local embedding model without opening an interactive prompt.

For MCP-backed agents, use the `search` tool with `refresh_index=true` on the first
query of a session or after code changes.

## Reporting

When you use active context, report:

- the semantic query;
- whether the index was refreshed;
- the top useful file paths and line ranges;
- what exact files you then read;
- whether the semantic hits confirmed, expanded, or contradicted the Vivary graph.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [vivary-dev](https://github.com/vivary-dev)
- **Source:** [vivary-dev/vivary](https://github.com/vivary-dev/vivary)
- **License:** MIT
- **Homepage:** https://vivary.vercel.app/

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-vivary-dev-vivary-active-context-skill
- Seller: https://agentstack.voostack.com/s/vivary-dev
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
