User input before thread attachments

From ychampion/cskill-agents · View interactive version

User input before thread attachments is an AI agent skill from the GitHub repository ychampion/cskill-agents. Resolve user-input attachment triggers before running later thread-safe attachment builders so dependent state is in place.

How to use this skill

Skill file

SKILL: User Input Before Thread Attachments

Domain: attachment-pipeline

Trigger: When attaching contextual artifacts in response to user input, run that work first so any derived triggers exist before later attachment builders execute.

Source Pattern: Distilled from reviewed attachment-pipeline ordering and derived-trigger dependency implementations.

Core Method

Treat user-input-driven attachment producers as dependencies for the broader attachment phase. Start by collecting the attachments that inspect user text directly, such as file mentions, MCP references, or other explicit user-specified artifacts, and wait for that set to finish. Only then should the second-stage thread-safe attachment builders run, because they may depend on triggers or metadata harvested from the first phase. This ordering prevents downstream attachment builders from running too early against incomplete state.

Key Rules

Example Application

If a request mentions files and also triggers a secondary memory lookup, resolve the file mentions first and wait for that work to complete. Only then run the dependent memory attachment builder so it sees the full set of requested paths.

Anti-Patterns (What NOT to do)

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.