# Skill Md Loader Convention

> Implement a modular, on-demand loading convention for agent skills to save context and organize playbooks.

Skill Md Loader Convention is a free AI agent skill on Agensi by Mohamed Mostafa Metawea, in Prompt & Skill Engineering. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [Mohamed Mostafa Metawea](https://www.agensi.io/creators/mohamed-mostafa-metawea)
- Category: [Prompt & Skill Engineering](https://www.agensi.io/skills/prompt-skill-engineering)
- Version: 1.0
- Last updated: 2026-12-01
- Security: scan passed (2026-11-30); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/skill-md-loader-convention
- Tags: prompt-engineering, ai-agents, llm-ops, automation, markdown

## About this skill

A growing library of agent instructions ends up bloating the context window and drifting between versions. This skill implements a proven architecture for modular instruction loading, allowing agents to fetch specific playbooks only when needed.

### What it does
- **Standardizes storage** by enforcing a strict folder-per-skill structure with frontmatter metadata.
- **Optimizes context** by providing an index-first approach where agents only load full playbooks via tool calls.
- **Validates inputs** using strict character limits and naming conventions to ensure system stability.
- **Enforces permissions** by restricting skill access to specific agent roles or employees.
- **Manages lifecycle** operations including safe writes, updates, and human-in-the-loop approval gates for agent-generated skills.

### How it works
1. **Initialize the index** by calling the list function to retrieve names and descriptions of assigned skills.
2. **Inject the index** into the agent system prompt, instructing it to request the full body when a task matches a description.
3. **Execute the load tool** when the agent identifies a relevant skill, retrieving the full markdown playbook.
4. **Update or create playbooks** using the write tool, which enforces character caps and name patterns.

### Why this beats prompting it yourself
Hard-coding every instruction into a system prompt wastes tokens and confuses the model with irrelevant rules. This skill provides a verified structural pattern that keeps agents focused. It moves the complexity of instruction management into a manageable file system that scales without degrading performance.

### Use cases
- Build a modular multi-agent system where each agent only "knows" its specific domain playbooks.
- Prevent context overflow in long-running sessions by loading instructions on demand.
- Implement a human-review workflow for instructions generated or modified by AI.
- Centralize organizational playbooks across different teams like research and copywriting.

### Known limitations
The frontmatter parser uses simple key-value logic rather than a full YAML engine. Playbooks are strictly capped at 20,000 characters to prevent context exhaustion.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Skill Md Loader Convention skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### How does this skill prevent my agents from running out of context space?

This skill organizes agent instructions into a strict folder-per-skill structure using markdown files with frontmatter. It solves the problem of context window bloat by allowing agents to first read a brief index of available skills and then only load the full, detailed playbook when a specific task requires it.

### Are there specific limits on how I can name or write my playbooks?

The file system enforces a strict naming pattern using only lowercase letters, digits, and hyphens between 2 and 41 characters. Additionally, the body of any single playbook is capped at a maximum of 20,000 characters to ensure system stability and prevent context exhaustion.

### Can I restrict specific skills so only certain agents can access them?

It uses a per-employee assignment system where the load tool will refuse to provide a skill body if it is not specifically assigned to the calling agent. This ensures that different roles, such as a researcher and a copywriter, only have access to their relevant domain playbooks.

### What specific file structure do I need to provide for this skill to work?

This skill requires a file system structure where each skill has its own folder containing a file named SKILL.md. To function correctly, these files must include frontmatter metadata with a name and a one line description of no more than 200 characters.

### How does an agent actually access and use a skill at run time?

When a task matches a skill description in the index, the agent uses a tool call to retrieve the full markdown playbook. For new skills proposed by an agent, the system includes an approval gate where a human must review the content before it is officially stored.

### What are the known technical limitations of this convention?

The frontmatter parser is designed with simple key-value logic and is not a full YAML engine. It is also important to note that while the convention organizes knowledge effectively, it does not guarantee that a weak model will follow the instructions provided.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
