index-at-creation
npx machina-cli add skill parcadei/Continuous-Claude-v3/index-at-creation --openclawIndex at Creation Time
Index artifacts when they're created, not at batch boundaries.
Pattern
If downstream logic depends on artifacts being queryable, index immediately at write time.
DO
- Index handoffs in PostToolUse Write hook (immediately after creation)
- Use
--fileflag for fast single-file indexing - Trigger indexing from the same event that creates the artifact
DON'T
- Wait for SessionEnd to batch-index
- Rely on cron/scheduled jobs for time-sensitive data
- Assume data will be available "soon enough"
Source Sessions
- a541f08a: "Index at artifact creation time, not at SessionEnd"
- 1c21e6c8: "If downstream logic depends on artifacts, index at the moment they're created"
Source
git clone https://github.com/parcadei/Continuous-Claude-v3/blob/main/.claude/skills/index-at-creation/SKILL.mdView on GitHub Overview
Indexing artifacts as soon as they’re created keeps data queryable in real time and avoids delays from batch processes. This approach supports downstream logic that relies on up-to-date searchability and reduces latency between creation and availability.
How This Skill Works
Index immediately at the write time when an artifact is created. Implement the indexing in the PostToolUse Write hook right after creation, and consider using the --file flag for fast indexing of a single file. Trigger indexing from the same event that creates the artifact to ensure no gap between creation and availability.
When to Use It
- When downstream logic requires artifacts to be queryable in real time.
- When dashboards or alerts depend on the latest artifact data.
- When indexing performance for single-file artifacts needs to be as fast as possible.
- When waiting for SessionEnd or batchJob cycles would introduce unacceptable latency.
- When artifacts are created within a session and must be searchable immediately for subsequent steps.
Quick Start
- Step 1: Identify artifact creation points and hook into the write path
- Step 2: Implement indexing in the PostToolUse Write hook immediately after creation; use --file for single files when appropriate
- Step 3: Create a test artifact and query it right away to confirm immediate availability
Best Practices
- Index handoffs in the PostToolUse Write hook immediately after creation.
- Use the --file flag for fast indexing of a single file.
- Trigger indexing from the exact event that creates the artifact.
- Avoid relying on SessionEnd, cron, or scheduled jobs for time-sensitive data.
- Validate indexing success and monitor indexing latency after each write.
Example Use Cases
- A tool handoff that must be searchable right after a data artifact is created so downstream steps can query it without waiting.
- Indexing a single-file artifact instantly to power an actor's real-time search interface during a live session.
- Real-time dashboards that reflect the latest artifacts immediately rather than after a batch flush.
- Ephemeral test artifacts that are created and queried within the same workflow to verify downstream behavior.
- Artifacts created in rapid succession within a session, where immediate indexing prevents query lag between steps.