agent-context-loader
- Repo stars 2,235
- Author updated Live
- Author repo claude-code-plugins-plus-skills
- Domain
- Productivity
- Compatible agents
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- Trust score
- 88 / 100 · community maintained
- Author / version / license
- @jeremylongshore · no license declared
- Token usage
- Lean
- Setup complexity
- Plug-and-play
- External API key
- Not required
- Operating systems
- Unspecified (assume cross-platform)
- Runtime requirements
- No special requirements
- Permissions
-
- Read-only
- Write / modify
- Network behavior
- Local-only
- Install commands
- 26 variants
Profile is derived at build time from SKILL.md and install vectors. Subject to drift from author intent.
Heads up: 未限定 allowed-tools,默认拥有全部工具权限。
---
name: agent-context-loader
description: 'Execute proactive auto-loading: automatically detects and loads agents.md Automatic discovery a…
category: productivity
runtime: no special runtime
---
# agent-context-loader output preview
## PART A: Task fit
- Use case: 'Execute proactive auto-loading: automatically detects and loads agents.md 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 con….
- Inputs: target material, constraints, expected output, and acceptance criteria.
- Evidence boundary: follow “Overview / Prerequisites / Instructions” and do not present inference as author intent.
## PART B: Execution result
- **01** The card summarizes the use case; runtime output centers on “'Execute proactive auto-loading: automatically detects and loads agents.md 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 con…”.
- **02** When the source has headings, the agent prioritizes “Overview / Prerequisites / Instructions” so the result follows the author’s structure.
- **03** Typical output includes task judgment, concrete steps, required commands or file edits, validation, and follow-up options.
- **04** Risk context follows the fingerprint: read files, write/modify files; mostly runs locally; usually needs no extra API key.
## Running Rules
- read files, write/modify files; mostly runs locally; usually needs no extra API key.
- Validate with a small sample before expanding scope.
- Return the result, validation criteria, and next iteration options. The source does not require a stable slash command. After installation, invoke the skill by name and describe the task.
Name target files or source material, expected output, forbidden changes, and whether network or shell access is allowed. Permission fingerprint: read files, write/modify files.
Start with a small task and check whether the result follows “Overview / Prerequisites / Instructions”. Inspect diffs, logs, previews, or tests before expanding scope.
Confirm the final output includes a concrete result, evidence, and next action. If it stays generic, tighten inputs, boundaries, and acceptance criteria.
---
name: agent-context-loader
description: 'Execute proactive auto-loading: automatically detects and loads agents.md Automatic discovery a…
category: productivity
source: jeremylongshore/claude-code-plugins-plus-skills
---
# agent-context-loader
## When to use
- 'Execute proactive auto-loading: automatically detects and loads agents.md Automatic discovery and loading of AGENTS.m…
- Use it when the task has clear inputs, repeatable steps, and validation criteria.
## What to provide
- Target material, scope, expected result, and forbidden changes.
- Whether network, commands, file writes, or external services are allowed.
## Execution rules
- Organize steps around “Overview / Prerequisites / Instructions” and keep inference separate from source facts.
- read files, write/modify files; mostly runs locally; usually needs no extra API key.
- Validate with a small sample before expanding the task.
## Output requirements
- Return the deliverable, key evidence, validation method, and next action.
- Mark missing information as unknown; do not invent commands, platforms, or dependencies. The author source anchors workflow facts; repository files anchor sources and commands; Fluxly only adds fit, limitations, and quality judgment.
skill "agent-context-loader" {
input -> user goal + target files + boundaries + acceptance criteria
context -> Overview / Prerequisites / Instructions
rules -> SKILL.md triggers / order / output contract
runtime -> no special runtime | read files, write/modify files | mostly runs locally
guardrails -> usually needs no extra API key + small-sample validation + diff/log review
output -> copyable result + checklist + next iteration
} 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.
- Cache the discovery results for the current session to avoid redundant filesystem scans on subsequent activations.
Output
- Ordered list of discovered
AGENTS.mdfile paths with their directory depth - Merged instruction set combining all discovered agent contexts
- Conflict report highlighting any contradictory directives between levels
- Session cache status indicating whether results are fresh or reused
Error Handling
| Error | Cause | Solution |
|---|---|---|
No AGENTS.md found |
Workspace has no agent instruction files | Confirm the correct working directory; create an AGENTS.md at the project root if needed |
| Permission denied on directory traversal | Restricted parent directories above the workspace | Limit scan depth to the repository root (detected via .git/ presence) |
| Circular symlink detected | Symlinked directories create an infinite traversal loop | Skip symlinked directories during the scan; log a warning with the symlink path |
| Conflicting instructions across levels | A subdirectory AGENTS.md contradicts the root-level file |
Flag the conflict in the output; apply the more specific (deeper) instruction by default |
| File encoding error | AGENTS.md uses a non-UTF-8 encoding |
Attempt latin-1 fallback; report the file path and encoding issue |
Examples
Example 1: Monorepo with per-package agent instructions
- Structure: Root
AGENTS.mdsets global conventions;packages/api/AGENTS.mdadds API-specific tooling rules. - Result: Both files loaded in order. The API-specific rules supplement the global context without conflict.
Example 2: Nested workspace with conflicting commit policies
- Structure: Root
AGENTS.mdsays "always sign commits";services/legacy/AGENTS.mdsays "skip commit signing." - Result: Conflict detected and reported. The deeper (legacy) directive is applied with a warning noting the override.
Example 3: First-time setup with no agent files
- Structure: A freshly cloned repository with no
AGENTS.mdanywhere. - Result: Scan completes with zero files found. Output includes a suggestion to create
AGENTS.mdat the repository root with a minimal template.
Resources
- Claude Code AGENTS.md specification: https://docs.anthropic.com/en/docs/agents
- Monorepo workspace patterns for agent configuration: https://docs.anthropic.com/en/docs/claude-code
- File discovery best practices for hierarchical configuration loading
Decide Fit First
Design Intent
How To Use It
Boundaries And Review