# reindex

Refresh or rebuild the bundled Lumen index for the current project, preferring MCP-driven refreshes and using the CLI only for an explicit clean rebuild.

Skill by Ory. Category: Data and backend.

## Install

Project (for this project only):

```sh
npx skills add ory/lumen --skill reindex
```

Works with: Claude Code, Codex CLI, Cursor, Antigravity, Copilot CLI, opencode.

Global (for every project on this machine):

```sh
npx skills add ory/lumen --skill reindex -g
```

Works with: Claude Code, Codex CLI, Cursor, Antigravity, Copilot CLI, opencode.

## Tags

- Runs on your computer: It runs as a program on your machine, with your access.

## Security audits

- Gen Agent Trust Hub: Pass
- Socket: Pass
- Snyk: Pass

Installs: 1. Installs counted by skills.sh. [Open on skills.sh](https://www.skills.sh/ory/lumen/reindex)

## Source

[Open the source](https://github.com/ory/lumen/tree/HEAD/skills/reindex). Checked 2026-10-10. This summary may contain AI-generated text, so it can be wrong. Check the source before you rely on it.

## SKILL.md

````markdown
---
name: reindex
description: Refresh or rebuild the bundled Lumen index for the current project, preferring MCP-driven refreshes and using the CLI only for an explicit clean rebuild.
---

# Lumen Reindex

Refresh or rebuild the bundled Lumen index for the current project.

## Steps

1. Call the Lumen `index_status` tool for the current working directory so you
   can report the current state before making changes.
2. If the user wants the index refreshed or seeded, call the Lumen
   `semantic_search` tool with a broad natural-language query and set `path` or
   `cwd` to the current working directory. The search tool refreshes stale or
   missing indexes automatically.
3. If the user explicitly asks for a clean rebuild, explain the options and
   run one via the shell:
   - `lumen index --force .` — reprocesses every file for the current project
     without wiping other worktrees or their shared vectors. Prefer this.
   - `lumen clean --days 0 && lumen index .` — deletes every cached index not
     held by an active indexer lock before rebuilding; locked collections are
     skipped and counted in the summary. Use only when the user asks for a full
     wipe.
   - `lumen clean` — removes indexes for projects that no longer exist or have
     not been used in 30 days. Use to reclaim disk space, not to rebuild the
     current project.
4. After the refresh or rebuild, report the new index status, including vector
   precision, unique vectors, shared references, deduplication ratio, database
   bytes, and reclaimable bytes when available.
````

- Previous: [doctor](https://syn4pse.dev/terminal/ory-lumen-doctor.md)
- Next: [lumen](https://syn4pse.dev/terminal/ory-lumen.md)
- [Terminal](https://syn4pse.dev/terminal.md)
- [Suggest a change](mailto:terminal@syn4pse.dev?subject=Terminal%20suggestion)
