Skill files exist. Agents still skip them.

Claude Code reads skill files from .claude/skills/ or .agent/skills/, one folder per skill, each with its own SKILL.md describing what the skill does and when to use it. Cursor has an equivalent. Gemini-based agents have their own version. The convention is everywhere.

What is not everywhere is reliable activation. A skill file sitting in a folder is invisible to the agent unless something in the agent's actual working memory tells it that file is relevant right now. A clear, well-written description at the top of the SKILL.md helps, but in practice it is not enough on its own โ€” the agent still has to decide, mid-conversation, that this particular phrase warrants opening that particular file, and it often decides wrong.

I hit this repeatedly across two different agents: Claude Code and Gemini. Same skill folders, same problem. The agent would answer a question it had already answered for itself in a skill file, just without reading the file.

The skill file was never the problem. Nothing told the agent exactly when to open it. So instead of rewriting descriptions, I started writing explicit triggers for each one.

Two different activation mechanisms get confused

There are two separate layers here, and conflating them is the source of most of the confusion.

Layer 1 โ€” skill-level description triggering

Anthropic's own skill-creator tooling optimizes the description field inside a SKILL.md so that Claude's internal skill-matching is more likely to fire for the right query. This is a real mechanism, and it helps. It is also probabilistic โ€” it improves the odds, it does not guarantee the file gets opened on a specific phrase every time.

Layer 2 โ€” project-level config activation

This is the layer this article is about. CLAUDE.md, AGENTS.md, .cursorrules, or a system prompt is loaded into context automatically, in full, at the start of every session โ€” not probabilistically, deterministically. Anything written inside that file is an instruction the agent is already holding when it reads the next user message.

A trigger table lives in layer 2. It does not replace layer 1 โ€” a well-described skill file is still worth writing. It closes the gap layer 1 leaves open: the moment-to-moment decision of which file to open for which exact phrase.

A trigger table inside the file the agent already reads

CLAUDE.md / AGENTS.md / .cursorrules (loaded every session)
  โ†“ contains
Trigger table: user phrase โ†’ exact skill file path
  โ†“ agent matches incoming message against table
Opens .agent/skills/<name>/SKILL.md before answering
  โ†“
No guessing, no re-deriving what's already on disk

The table maps the exact phrases a user types, not abstract task categories, to the exact skill file:

  • "write a report" โ†’ .agent/skills/report-writer/SKILL.md
  • "deploy to prod" โ†’ .agent/skills/deploy/SKILL.md
  • "check the traffic" โ†’ .agent/skills/analytics/SKILL.md

Since the config file is already loaded into context every session, the agent follows the table instead of guessing what exists on disk. There is no separate search step, no retrieval call โ€” it is the same mechanism as any other instruction the agent is holding while it reads your message.

Where the table actually lives

  • Claude Code โ€” CLAUDE.md, skills in .claude/skills/ or .agent/skills/
  • Cursor โ€” .cursorrules (or .cursor/rules/), same skills folder
  • Gemini CLI and others โ€” AGENTS.md, a vendor-neutral convention several tools read
  • Custom GPTs โ€” system prompt / project instructions

The mechanism is identical across all of them: one file loads automatically regardless of which LLM is behind it, everything else needs a pointer inside that file.

A real trigger table section

Dropped at the end of CLAUDE.md, the rule plus table looks like this:

Rule: on first mention of any trigger below, read
the matching skill file before answering.
Path: .agent/skills/{name}/SKILL.md

| Skill | Triggers | Path |
|report-writer|"write a report"|.../report-writer/SKILL.md|
|deploy|"deploy to prod"|.../deploy/SKILL.md|
|db-migration|"add a migration"|.../db-migration/SKILL.md|

The same principle in multi-agent pipelines

This holds whether it is a single Claude Code session in an IDE or several agent instances passing work between each other in a pipeline. Each instance still needs its own access to the config file โ€” a sub-agent spawned without that file in its context cannot follow a table it never sees. But the logic does not change: map real phrases to real files, put the map where it is guaranteed to load.

More agents in a chain means more places the activation can silently fail, not fewer. A trigger table does not make that risk disappear, but it replaces a probabilistic guess with an explicit, auditable rule at every hop.

The prompt, packaged

I packaged the exact prompt I use, a compatibility table, and working examples for Claude Code and Cursor into a small public repository. No package, no install step โ€” it is a system prompt you hand to your own agent, and it scans your skills folder and writes the trigger table for you.

MIT License CONTRIBUTING.md examples/claude-code examples/cursorrules No install required
Grab the prompt and examples

Paste it into your own agent, point it at your config file, see what skills it finds missing from the table.

View on GitHub โ†—

Common questions about skill activation

How do I make my AI agent read a specific file automatically?
Put the instruction inside the config file your agent already loads at the start of every session: CLAUDE.md for Claude Code, AGENTS.md for Gemini CLI and several other tools, or .cursorrules for Cursor. A trigger table inside that file maps the exact phrases a user types to the exact skill file path. Since the config file is already in context, the agent follows the table instead of guessing what exists on disk.
Why does my AI coding assistant ignore my instructions file?
A skill file that exists in a folder is invisible to the agent unless something tells it to open that file at the right moment. A clear description at the top of the skill file is not enough on its own. The fix is a trigger table in the one file the agent reads automatically every session, mapping real phrases to real files.
Does this trigger table pattern work with Cursor or only Claude Code?
It works with any agent that reads a project-level config file at session start. Claude Code reads CLAUDE.md, Cursor reads .cursorrules, Gemini CLI and several agents read AGENTS.md, and custom GPTs read their system prompt. The mechanism is identical: one file loads automatically, the trigger table inside it tells the agent which skill file to open for which phrase.
What is AGENTS.md and how is it different from CLAUDE.md?
AGENTS.md is a vendor-neutral convention several coding agents read at startup, similar in purpose to CLAUDE.md but not tied to one provider. CLAUDE.md is specific to Claude Code. Both serve the same role in this pattern: the one file an agent reads automatically, where a trigger table can live.
Building agent workflows that actually hold up in production?

I design and build AI agent systems, RAG pipelines, and automation workflows for businesses moving from manual process to code-first AI. Let's talk about what you're building.

โ† Back to articles