Skip to content
Back to skills

323 Tool Patterns Fe45517c

ASecurity

```python tools = [ "memory_insert", "memory_replace", "memory_rethink" ] ```

  • 9 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 11, 2026
businesspythondatabase

Works with

  • terminal
  • cli

Security analysis

A100/100

Scanned October 11, 2026

npx -y skills add tools-only/X-Skills --skill 323-tool-patterns_fe45517c --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of 323 Tool Patterns Fe45517c?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for 323 Tool Patterns Fe45517c
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tools-only-323-tool-patterns-fe45517c/badge)](https://www.skillsdirectory.com/skills/tools-only-323-tool-patterns-fe45517c)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

SKILL.md
# Common Tool Configurations

## Memory-Only Agent

```python
tools = [
  "memory_insert",
  "memory_replace",
  "memory_rethink"
]
```

**Use cases:**

- Personal assistants
- Note-taking agents
- Context managers

## File System Agent

```
# Tools auto-attached when folder connected:
# - read_file
# - write_file
# - list_files
# - grep
# - search_files
```

**Use cases:**

- Code analysis
- Document processing
- Project management

## Database Agent

```
tools = [
  "memory_insert",
  "memory_replace",
  "query_database", # Custom tool
  "update_record" # Custom tool
]
```

**Use cases:**

- Data analysis
- Report generation
- Database management

## Multi-Agent System

```
# Supervisor agent:
tools = [
  "memory_insert",
  "send_message_to_agent_and_wait_for_reply"
]

# Worker agents:
tools = [
  "memory_insert",
  "domain_specific_tool"
]
```

**Note:** Use `send_message_to_agent_and_wait_for_reply` for agent-to-agent communication. Check docs for latest multi-agent patterns.

## Tool Rules

Constrain tool sequences without hardcoded workflows:

```
tool_rules = [
  {
    "tool_name": "answer_question",
    "children": [] # Must be terminal call
  },
  {
    "tool_name": "search_files",
    "children": ["search_files", "answer_question"]
  }
]
```

**Pattern:** Agent must search before answering, but can search multiple times.

## Custom Tool Development

**Critical requirements:**

- ALL imports must be INSIDE function body
- Tools execute in sandbox without top-level imports
- Return strings or JSON-serializable objects

**Example - Creating and attaching a custom tool:**

```python
from letta_client import Letta

client = Letta()

# Define tool with imports INSIDE the function
tool_source = '''
def fetch_weather(city: str) -> str:
    """Fetch current weather for a city.
    
    Args:
        city: Name of the city
        
    Returns:
        Weather description string
    """
    import requests  # Import INSIDE function
    
    response = requests.get(f"https://wttr.in/{city}?format=3")
    return response.text
'''

# Create and attach to agent
tool = client.tools.create(source_code=tool_source)
client.agents.tools.attach(agent_id=agent.id, tool_id=tool.id)
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.