agent-context-loader
Installation
SKILL.md
Agent Context Loader
Overview
Automatic discovery and loading of AGENTS.md files across project hierarchies for AI coding agents. This skill scans the current workspace and its parent directories to locate agent instruction files, then surfaces their contents so the active agent session has full operational context.
Prerequisites
- A project workspace containing one or more
AGENTS.mdfiles at any directory depth - Read and Glob permissions to traverse the directory tree
- Grep access for searching file contents when multiple candidates exist
Instructions
- Scan the current working directory and all ancestor directories (up to the filesystem root or repository root) for files named
AGENTS.mdoragents.md. - Search subdirectories of the current workspace for additional
AGENTS.mdfiles that may apply to sub-projects or modules. - Determine load order: files closer to the repository root load first (global context), files in deeper directories load later (override or supplement).
- Read each discovered
AGENTS.mdfile and extract its instruction blocks, workflow definitions, and constraint declarations. - Merge instructions into a unified context, noting any conflicts between levels (e.g., a subdirectory agent overriding a root-level rule).
- Present the loaded context as a structured summary: source file path, instruction count, and any detected conflicts.
Related skills