Contexts

From OutlineDriven/odin-codex-plugin · View interactive version

Contexts is an AI agent skill from the GitHub repository OutlineDriven/odin-codex-plugin. Auto-router for context gathering. Detects whether the task needs codebase exploration or external knowledge research and dispatches accordingly. Trigger on "get context", "background on X", "context on X", "how does X work", architectural orientation, or any setup-before-coding request.

How to use this skill

Skill file

Context Command

Auto-router for pre-implementation context gathering. Classify the input as codebase-oriented, doc-oriented, or both; invoke the appropriate workflow; emit a detected: acknowledgement as the first output line.

When to Apply / NOT

Apply:

NOT apply:

Detected Mode Acknowledgement [LOAD-BEARING]

First output line before ANY work:

detected: <mode> — scope=<paths|libs|both> sources=<brief summary>

Mode values: code-ref, doc-ref, both, ambiguous.

For both mode, also append: (sequential dispatch: codebase first, then external)

Input Classifier

First-match wins. Check in order: both must come before leaf modes so mixed-signal inputs are reachable.

| Priority | Mode | Minimum condition |

|----------|------|-------------------|

| 1 | both | Repo-local signal (path, glob, symbol, or module) AND external signal (library, framework, SDK, API, CLI, or service name) both present and non-trivial |

| 2 | code-ref | Repo-local signal present; no external signal |

| 3 | doc-ref | External signal present; no repo-local signal |

| 4 | ambiguous | Neither signal cleanly detected, OR signals present but neither dominant |

Worked examples:

Auto-Detect Gate

Fire AskUserQuestion (single-select, NEVER multiSelect) when classifier returns ambiguous OR when both signals are present but one is dominant and the mode is unclear:

Hand-off & Integration

code-ref: Invoke codebase exploration workflow. Emit 8-section output (Task Understanding, Architecture Context, Pattern Context, Tooling Context, Dependency Map, Critical Files Summary, Constraints & Considerations, Recommended Next Steps).

doc-ref: Invoke external research workflow. Walk the 5-tier source ladder (Official docs → API refs → Books/papers → Tutorials → Community). Emit source-cited claims with confidence labels.

both (sequential):

  1. Run codebase exploration first. Extract the symbols, modules, and interfaces that appear relevant to the external subject.
  2. Feed the extracted symbol list as additional context into the external research workflow. This grounds the research in actual repo usage rather than generic library docs.
  3. Emit both outputs in sequence. Label each section clearly.

Note: sequential dispatch roughly doubles wall-clock time versus a single mode. Emit (sequential dispatch: codebase first, then external) in the detected: line so the user can anticipate latency.

Anti-Patterns

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.