Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 98 additions & 0 deletions skills/agent-creator/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
---
name: agent-creator
description: Compose focused, task-specific agents with curated skill sets. Use when you need to define specialized agent roles (e.g., "Deep Research Agent", "Frontend Specialist", "Data Analyst") and equip them with a whitelisted subset of available skills. Helps in creating modular, auditable, and efficient agent manifestations.
---

# Agent Creator

A skill for composing specialized agents by combining a specific role identity with a curated set of skills.

## Overview

The `agent-creator` skill follows a **whitelist approach** to agent design. Instead of a single generalist agent with access to all capabilities, you use this skill to create agents that are "fit for purpose." This improves safety, reduces context noise, and increases the reliability of the resulting agent.

### Key Concepts

- **Role Definition**: The persona, identity, and specific purpose of the agent.
- **Skill Selection**: A whitelist of existing skills that this specialized agent is authorized to use.
- **Agent Manifest**: A structured definition (often a `.md` file) that combines the role and skills into a deployable agent configuration.

---

## Workflow

### 1. Define the Agent's Role

Start by interviewing the user to understand the specialized task the agent needs to perform.
- What is the agent's primary goal?
- What are the success criteria for its tasks?
- What is the "voice" or "persona" of the agent?
- What are the boundaries? (What should it NOT do?)

### 2. Select Skills (Whitelist)

Browse the available skill library and select only the skills necessary for the defined role.
- **Avoid Over-provisioning**: Only include skills that are directly relevant to the agent's tasks.
- **Check Dependencies**: Ensure any scripts or resources required by the selected skills are available.

### 3. Draft the Agent Manifest

Create a new manifest file (e.g., `agents/my-specialized-agent.md`). The manifest should follow this structure:

```markdown
# [Agent Name]

## Identity & Purpose
[A clear description of the agent's role and goal]

## Authorized Skills
This agent is equipped with the following skills:
- **[Skill Name 1]**: [Brief description of when/why the agent uses this skill]
- **[Skill Name 2]**: [Brief description of when/why the agent uses this skill]

## Operating Guidelines
- [Specific instruction 1]
- [Specific instruction 2]
```

### 4. Verification

Validate the specialized agent by running a few test prompts that are typical for its role. Ensure it stays within its defined boundaries and uses the authorized skills effectively.

---

## Guidelines

- **Prefer Composition**: When a task becomes too complex for one specialized agent, consider creating a "Coordinator Agent" that orchestrates multiple specialized agents rather than adding more skills to a single agent.
- **Auditability**: The whitelist should be explicit. It must be clear at a glance what an agent can and cannot do.
- **Efficiency**: Specialized agents are more efficient because they operate with less "distraction" from irrelevant tools and instructions.

## Examples

### Example 1: Creating a "Deep Research Agent"
**Input**: "I need an agent that can do deep research on technical topics and produce structured reports."
**Skills selected**: `claude-api`, `web-artifacts-builder`, `pdf`
**Manifest Draft**:
```markdown
# Deep Research Agent
## Identity & Purpose
Expert technical researcher focused on synthesizing information from web sources and APIs into comprehensive reports.
## Authorized Skills
- **claude-api**: For advanced reasoning and data synthesis.
- **web-artifacts-builder**: To create interactive visualizations of research findings.
- **pdf**: To extract data from research papers and whitepapers.
```

### Example 2: Creating a "Frontend Specialist"
**Input**: "Build a frontend expert that knows our brand guidelines."
**Skills selected**: `frontend-design`, `brand-guidelines`, `web-artifacts-builder`
**Manifest Draft**:
```markdown
# Frontend Specialist
## Identity & Purpose
Specialized UI/UX engineer that builds modern web interfaces strictly adhering to corporate brand guidelines.
## Authorized Skills
- **frontend-design**: For core UI implementation.
- **brand-guidelines**: To ensure visual consistency.
- **web-artifacts-builder**: To prototype components.
```
49 changes: 27 additions & 22 deletions skills/mcp-builder/scripts/evaluation.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,31 +107,36 @@ async def agent_loop(
tool_metrics = {}

while response.stop_reason == "tool_use":
tool_use = next(block for block in response.content if block.type == "tool_use")
tool_name = tool_use.name
tool_input = tool_use.input

tool_start_ts = time.time()
try:
tool_result = await connection.call_tool(tool_name, tool_input)
tool_response = json.dumps(tool_result) if isinstance(tool_result, (dict, list)) else str(tool_result)
except Exception as e:
tool_response = f"Error executing tool {tool_name}: {str(e)}\n"
tool_response += traceback.format_exc()
tool_duration = time.time() - tool_start_ts

if tool_name not in tool_metrics:
tool_metrics[tool_name] = {"count": 0, "durations": []}
tool_metrics[tool_name]["count"] += 1
tool_metrics[tool_name]["durations"].append(tool_duration)

messages.append({
"role": "user",
"content": [{
tool_use_blocks = [block for block in response.content if block.type == "tool_use"]
tool_results = []

for tool_use in tool_use_blocks:
tool_name = tool_use.name
tool_input = tool_use.input

tool_start_ts = time.time()
try:
tool_result = await connection.call_tool(tool_name, tool_input)
tool_response = json.dumps(tool_result) if isinstance(tool_result, (dict, list)) else str(tool_result)
except Exception as e:
tool_response = f"Error executing tool {tool_name}: {str(e)}\n"
tool_response += traceback.format_exc()
tool_duration = time.time() - tool_start_ts

if tool_name not in tool_metrics:
tool_metrics[tool_name] = {"count": 0, "durations": []}
tool_metrics[tool_name]["count"] += 1
tool_metrics[tool_name]["durations"].append(tool_duration)

tool_results.append({
"type": "tool_result",
"tool_use_id": tool_use.id,
"content": tool_response,
}]
})

messages.append({
"role": "user",
"content": tool_results
})

response = await asyncio.to_thread(
Expand Down
10 changes: 7 additions & 3 deletions skills/xlsx/scripts/recalc.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

MACRO_DIR_MACOS = "~/Library/Application Support/LibreOffice/4/user/basic/Standard"
MACRO_DIR_LINUX = "~/.config/libreoffice/4/user/basic/Standard"
MACRO_DIR_WIN = os.path.join(os.environ.get("APPDATA", ""), "LibreOffice", "4", "user", "basic", "Standard")
MACRO_FILENAME = "Module1.xba"

RECALCULATE_MACRO = """<?xml version="1.0" encoding="UTF-8"?>
Expand All @@ -40,9 +41,12 @@ def has_gtimeout():


def setup_libreoffice_macro():
macro_dir = os.path.expanduser(
MACRO_DIR_MACOS if platform.system() == "Darwin" else MACRO_DIR_LINUX
)
if platform.system() == "Windows":
macro_dir = MACRO_DIR_WIN
else:
macro_dir = os.path.expanduser(
MACRO_DIR_MACOS if platform.system() == "Darwin" else MACRO_DIR_LINUX
)
macro_file = os.path.join(macro_dir, MACRO_FILENAME)

if (
Expand Down