index-at-creation
Index at Creation Time
When & Why to Use This Skill
This Claude skill optimizes agentic workflows by implementing real-time artifact indexing at the moment of creation. By eliminating the delay associated with batch processing or session-end indexing, it ensures that all generated data is immediately queryable and available for downstream logic, significantly enhancing the reliability and data consistency of complex AI operations.
Use Cases
- Sequential Tool Use: Ensuring that a document or code snippet generated by one tool is instantly searchable and usable by a subsequent tool in the same task chain.
- High-Frequency Data Updates: Maintaining an up-to-the-second accurate knowledge base during long-running sessions where waiting for a scheduled index would result in stale information.
- Complex Handoffs: Using the PostToolUse hook to index handoffs immediately, allowing the agent to maintain perfect contextual awareness of its own progress and outputs.
| name | index-at-creation |
|---|---|
| description | Index at Creation Time |
| user-invocable | false |
Index 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"