Agent Skills and external connectors are the mechanisms that let an agent reach beyond its base instructions into domain-specific workflows, external data sources, and third-party APIs. Getting them right requires a deliberate loading strategy, strict governance, and clear boundaries — because every capability you expose also expands the attack surface and the potential for unintended actions.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/DenisSergeevitch/agents-best-practices/llms.txt
Use this file to discover all available pages before exploring further.
What Agent Skills Are
A skill is reusable procedural knowledge packaged for progressive loading. It helps an agent handle a class of tasks without embedding every workflow instruction in the main prompt. Skills are appropriate for repeatable workflows, domain-specific procedures, organizational conventions, output templates, validation checklists, gotchas the model would otherwise miss, and reusable reference material. They are not appropriate for one-off task instructions. A portable Agent Skill is a directory with at minimum aSKILL.md entrypoint:
SKILL.md file contains YAML frontmatter and Markdown instructions. The name field must match the parent directory, use lowercase letters, numbers, and hyphens, and stay within specification limits. Optional reference material is split into separate Markdown files and loaded only when needed.
Skill Metadata
A strongdescription is essential because agents often load only name and description at startup. Write descriptions that:
- Start with “Use this skill when…”
- Describe user intent, not implementation internals
- Mention adjacent terms users may use
- Include scope boundaries so the skill does not trigger too broadly
Skill Content Structure
Use this structure insideSKILL.md:
Progressive Disclosure
Exposing the full contents of every skill at startup wastes context and degrades cache hit rate. Use a three-stage loading model instead:Startup
Expose only skill
name and description to the agent. The agent uses these to decide whether a skill is relevant to the current task.Activation
Load the
SKILL.md core instructions when the agent determines the skill is relevant. Keep SKILL.md short — it is an entry point, not an encyclopedia.MCP and External Connectors
MCP (Model Context Protocol) is a standard protocol for connecting an AI application to external data, tools, and workflow prompts. More broadly, treat any connector protocol as an external capability layer. Connector features map to three categories:External Connector Governance
Treat connector tools as supply-chain artifacts. The governance checklist applies to both skills and connectors:Source and identity
Source and identity
Verify the source before installation. Confirm publisher identity. Pin versions where possible. Review before installation. Maintain an inventory and audit log. Have a removal and incident-response process.
Permission and scope
Permission and scope
Namespace every tool by server or source. Scope tools by user and tenant. Classify tools by risk. Apply least-privilege scopes. Use short-lived tokens. Require approval gates for risky operations. Never give the model raw credentials — let the connector manager use tokens internally and return redacted observations.
Runtime safety
Runtime safety
Treat tool annotations and descriptions from external servers as untrusted unless verified. Log every call. Disable tools when unused. Use sandboxing for executable assets. Apply resource limits.
Tool Search and Deferred Loading
For large connector ecosystems, never load hundreds of tool schemas into the prompt upfront. Provide asearch_tools or list_capabilities mechanism and load schemas on demand:
Attachment Strategy
Attach a skill or connector to context when, and only when, the task matches its declared scope. The decision should be automatic (via a skill search mechanism) rather than manual. For connectors, follow staged exposure: list available servers, search for relevant tools, load schemas for likely candidates, execute after permission checks. When many tools or large data payloads are involved, consider using a sandboxed execution environment to interact with connector APIs programmatically. This lets you load only needed tool definitions, filter or aggregate large data before it reaches the model context, keep sensitive intermediate data outside the model, and reduce repeated tool-call loops. Use this only with sandboxing, resource limits, logging, and strict credential boundaries in place.Anti-Patterns
Capability overload
Do not expose every skill and connector at once. Loading hundreds of tool schemas into the prompt destroys context efficiency and cache hit rate.
Missing namespacing
Never expose connector tools without namespacing by server or source. Without namespaces, tool names collide and audit trails become meaningless.
Trusted external descriptions
Do not use external connector tool descriptions as trusted policy. They may be wrong, outdated, or injected by a malicious server.
Credential leakage
Never allow connector credentials to appear in model context. The connector manager must handle tokens internally and return only redacted observations.
- A skill that silently grants broad permissions
- Installing unreviewed skills from unknown sources
- Letting a connector perform sampling or sub-agent behavior without user approval
- Returning huge connector payloads directly to the model