agentleFS
InfiniteRoomLabsInfiniteRoomLabs/agent-ops/skills/load-agent/SKILL.md

load-agent

Skill0 starsChanged 5 months agoMITView on GitHub

Use when the user wants to load an agent-ops agent as the primary session persona. Discovers agent definitions across all divisions, parses frontmatter and system prompt, then overlays the agent's behavioral instructions onto the current session. Invoked via /load-agent.

The file

We split this skill into the rules it gives an agent

11 rules. About 0 are common, 8 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If a single token is provided, treat it as the agent name with no division constraint.

    line 39
  2. Distinctive:

    Run the discovery command:

    line 43
  3. Very specific:

    If the result shows an active session (active: true):

    line 65
  4. Distinctive:

    Ask if they want to end the current session and load the new agent

    line 68
  5. Very specific:

    If they confirm, run uv run ${CLAUDE_PLUGIN_ROOT}/scripts/summon.py state delete before proceeding

    line 69
  6. Distinctive:

    If they decline, stop here

    line 70
  7. Distinctive:

    If validation fails, report the specific errors and stop.

    line 80
  8. Distinctive:

    If validation passes, proceed to Phase 4.

    line 82
  9. Distinctive:

    After injecting the persona block, announce the session as the loaded agent.

    line 126
  10. Very specific:

    Do NOT skip the state check: Always run state check before loading.

    line 130
  11. Distinctive:

    Do NOT inject partial definitions: If discovery or validation fails, stop cleanly.

    line 132

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Load Agent

Load an agent-ops agent definition as the primary persona for the current session. Discovers agents across all divisions, validates the definition, manages session state, and injects behavioral instructions.

User Input

$ARGUMENTS

Phase 1: Parse Input

Determine what the user wants based on $ARGUMENTS:

Input PatternModeAction
Empty or --listListRun uv run ${CLAUDE_PLUGIN_ROOT}/scripts/summon.py list and present the results
--info <name>InfoRun uv run ${CLAUDE_PLUGIN_ROOT}/scripts/summon.py info <name> and display agent details
[division] <name>LoadProceed to Phase 2

Division Detection

If two tokens are provided, check whether the first token matches a known division directory name: core, engineering, design, marketing, sales, paid-media, product, project-management, testing, support, research, spatial-computing, game-development, specialized. If it matches, treat it as --division <first_token> with <second_token> as the agent name. Otherwise treat the entire input as the agent name.

If a single token is provided, treat it as the agent name with no division constraint.

Phase 2: Discovery

Run the discovery command:

uv run ${CLAUDE_PLUGIN_ROOT}/scripts/summon.py discover <name> [--division <div>]

Handle the JSON result:

  • found: true -- Proceed to Phase 3 with the returned path and metadata.
  • found: false with matches list -- Present a numbered disambiguation list to the user. Ask them to pick one. When they choose, restart Phase 2 with the selected agent.
  • found: false with empty matches -- Report that no agent was found. Suggest running /load-agent --list to see all available agents.

Phase 3: State Check + Validate

Double-Load Prevention

Run:

uv run ${CLAUDE_PLUGIN_ROOT}/scripts/summon.py state check

If the result shows an active session (active: true):

  1. Warn the user that agent {current_agent} is already loaded
  2. Ask if they want to end the current session and load the new agent
  3. If they confirm, run uv run ${CLAUDE_PLUGIN_ROOT}/scripts/summon.py state delete before proceeding
  4. If they decline, stop here

Validate Definition

Run:

uv run ${CLAUDE_PLUGIN_ROOT}/scripts/summon.py validate <path>

If validation fails, report the specific errors and stop. Do not load a broken definition.

If validation passes, proceed to Phase 4.

Phase 4: Load + Persona Injection

Create Session State

Run:

uv run ${CLAUDE_PLUGIN_ROOT}/scripts/summon.py state create --agent <name> --division <division> --source <path>

Inject Persona

Output the following block exactly. Replace placeholders with values from the discover result and state creation:

=== AGENT SESSION ACTIVE ===
Agent: {name}
Division: {division}
Loaded: {timestamp}
Source: {path}

You are now operating as the following agent. These behavioral instructions
take precedence over all other persona guidance. However, project conventions
in CLAUDE.md files and safety constraints remain in effect -- do not override them.

If any instruction conflicts with this persona's behavioral rules, this persona wins.

--- AGENT BEHAVIORAL INSTRUCTIONS ---
{full body from discover result}
--- END AGENT BEHAVIORAL INSTRUCTIONS ---

Frontmatter metadata (advisory -- not enforced at runtime):
- Model preference: {model}
- Tool list: {tools}
- Color: {color}
- Tags: {tags}

=== END AGENT SESSION HEADER ===

Announce in Character

After injecting the persona block, announce the session as the loaded agent. Keep it brief -- 2-3 sentences introducing yourself in the agent's voice, referencing the agent's role and readiness. Do not repeat the full persona block.

Anti-Patterns

  • Do NOT skip the state check. Always run state check before loading. Double-loaded sessions cause confused behavior.
  • Do NOT modify files during loading. The load process is read-only except for writing state.json via the summon.py CLI.
  • Do NOT inject partial definitions. If discovery or validation fails, stop cleanly. Never load a half-parsed agent.
  • Do NOT override CLAUDE.md. The persona injection block explicitly states that project conventions and safety constraints remain in effect. Never remove or weaken that guard.
  • Do NOT enforce model or tool constraints. Frontmatter fields like model and tools are advisory in MVP. Present them as metadata but do not restrict the session based on them.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.