From 445f3b33ff991fbb69df226bdfd44951b33a59c1 Mon Sep 17 00:00:00 2001 From: alban bertolini Date: Fri, 19 Dec 2025 08:52:10 +0100 Subject: [PATCH 1/4] feat: add Claude skills for Forest Admin MCP MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a dedicated folder for Claude Code skills that enhance AI interactions with Forest Admin: - forest-mcp: Guides Claude to effectively query Forest Admin data through MCP tools (list, listRelated, describeCollection) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- claude-skills/README.md | 45 +++++++++++++ claude-skills/forest-mcp/SKILL.md | 104 ++++++++++++++++++++++++++++++ 2 files changed, 149 insertions(+) create mode 100644 claude-skills/README.md create mode 100644 claude-skills/forest-mcp/SKILL.md diff --git a/claude-skills/README.md b/claude-skills/README.md new file mode 100644 index 0000000000..e3a931cd10 --- /dev/null +++ b/claude-skills/README.md @@ -0,0 +1,45 @@ +# Claude Skills for Forest Admin + +This directory contains Claude Code skills that enhance AI interactions with Forest Admin. + +## Available Skills + +### forest-mcp + +A skill that guides Claude to effectively query Forest Admin data through MCP tools. + +**Installation:** + +Copy the `forest-mcp` folder to your Claude skills directory: +```bash +cp -r forest-mcp ~/.claude/skills/ +``` + +Or create a symlink: +```bash +ln -s $(pwd)/forest-mcp ~/.claude/skills/forest-mcp +``` + +**Usage:** + +Once installed, Claude will automatically use this skill when you ask questions like: +- "Find all users with status active" +- "Show orders from last week" +- "How many products are in stock?" + +## Creating New Skills + +Skills are defined by a `SKILL.md` file with YAML frontmatter: + +```markdown +--- +name: skill-name +description: When to trigger this skill... +--- + +# Skill Title + +Instructions for Claude... +``` + +See the [Claude Code documentation](https://docs.anthropic.com/en/docs/claude-code) for more details on skill creation. diff --git a/claude-skills/forest-mcp/SKILL.md b/claude-skills/forest-mcp/SKILL.md new file mode 100644 index 0000000000..ee80b7eab9 --- /dev/null +++ b/claude-skills/forest-mcp/SKILL.md @@ -0,0 +1,104 @@ +--- +name: forest-mcp +description: Query Forest Admin data through MCP tools. Use when the user wants to search, filter, or explore data from their Forest Admin database. Triggers on questions like "find all users", "show orders from last week", "how many products", or any data exploration request. +--- + +# Forest Admin MCP + +Query Forest Admin data as if it were a database, with an abstraction layer that handles authentication, filtering, and relationships. + +## Available Tools + +| Tool | Purpose | +|------|---------| +| `describeCollection` | Get collection schema (fields, types, operators, relations) | +| `list` | Query records from a collection | +| `listRelated` | Query records from a one-to-many or many-to-many relation | + +## Workflow + +1. **Always start with `describeCollection`** to understand the collection structure before querying +2. Use `list` for direct collection queries +3. Use `listRelated` to traverse relationships (e.g., "orders of user 123") + +## Filter Syntax + +```json +// Simple condition +{ "field": "status", "operator": "Equal", "value": "active" } + +// Combined conditions +{ + "aggregator": "And", + "conditions": [ + { "field": "status", "operator": "Equal", "value": "active" }, + { "field": "age", "operator": "GreaterThan", "value": 18 } + ] +} +``` + +### Common Operators + +| Category | Operators | +|----------|-----------| +| Comparison | `Equal`, `NotEqual`, `LessThan`, `GreaterThan`, `LessThanOrEqual`, `GreaterThanOrEqual` | +| String | `Contains`, `StartsWith`, `EndsWith`, `IContains` (case-insensitive) | +| Array | `In`, `NotIn`, `IncludesAll` | +| Null | `Present`, `Blank`, `Missing` | +| Date | `Today`, `Yesterday`, `Before`, `After`, `PreviousWeek`, `PreviousMonth` | + +### Nested Fields + +Use `@@@` separator for relation fields: +```json +{ "field": "customer@@@email", "operator": "Contains", "value": "@gmail.com" } +``` + +## Examples + +**"Find active users created this month"** +``` +1. describeCollection({ collectionName: "users" }) +2. list({ + collectionName: "users", + filters: { + aggregator: "And", + conditions: [ + { field: "status", operator: "Equal", value: "active" }, + { field: "createdAt", operator: "PreviousMonth" } + ] + } + }) +``` + +**"Show orders for user 42"** +``` +1. describeCollection({ collectionName: "users" }) // to find relation name +2. listRelated({ + collectionName: "users", + relationName: "orders", + parentRecordId: 42 + }) +``` + +**"Count pending orders over $100"** +``` +list({ + collectionName: "orders", + filters: { + aggregator: "And", + conditions: [ + { field: "status", operator: "Equal", value: "pending" }, + { field: "total", operator: "GreaterThan", value: 100 } + ] + }, + enableCount: true +}) +``` + +## Tips + +- Use `enableCount: true` when user asks "how many" or needs totals +- Use `fields: ["id", "name"]` to reduce payload when only specific fields needed +- Use `search` parameter for full-text search across searchable fields +- Check `isSortable` from describeCollection before using sort From f6f2aef5ccc4831a16da5fe30a87b42659496e60 Mon Sep 17 00:00:00 2001 From: alban bertolini Date: Fri, 19 Dec 2025 08:57:07 +0100 Subject: [PATCH 2/4] docs: update skill installation to use marketplace MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- claude-skills/README.md | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/claude-skills/README.md b/claude-skills/README.md index e3a931cd10..65dc06b9b3 100644 --- a/claude-skills/README.md +++ b/claude-skills/README.md @@ -10,15 +10,7 @@ A skill that guides Claude to effectively query Forest Admin data through MCP to **Installation:** -Copy the `forest-mcp` folder to your Claude skills directory: -```bash -cp -r forest-mcp ~/.claude/skills/ -``` - -Or create a symlink: -```bash -ln -s $(pwd)/forest-mcp ~/.claude/skills/forest-mcp -``` +Add this skill from the [Claude Code Marketplace](https://marketplace.claudecode.dev). **Usage:** From eda63bc80fffba6ffc5b652de732f716a84bc18b Mon Sep 17 00:00:00 2001 From: alban bertolini Date: Fri, 19 Dec 2025 08:59:02 +0100 Subject: [PATCH 3/4] chore: remove README from claude-skills MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- claude-skills/README.md | 37 ------------------------------------- 1 file changed, 37 deletions(-) delete mode 100644 claude-skills/README.md diff --git a/claude-skills/README.md b/claude-skills/README.md deleted file mode 100644 index 65dc06b9b3..0000000000 --- a/claude-skills/README.md +++ /dev/null @@ -1,37 +0,0 @@ -# Claude Skills for Forest Admin - -This directory contains Claude Code skills that enhance AI interactions with Forest Admin. - -## Available Skills - -### forest-mcp - -A skill that guides Claude to effectively query Forest Admin data through MCP tools. - -**Installation:** - -Add this skill from the [Claude Code Marketplace](https://marketplace.claudecode.dev). - -**Usage:** - -Once installed, Claude will automatically use this skill when you ask questions like: -- "Find all users with status active" -- "Show orders from last week" -- "How many products are in stock?" - -## Creating New Skills - -Skills are defined by a `SKILL.md` file with YAML frontmatter: - -```markdown ---- -name: skill-name -description: When to trigger this skill... ---- - -# Skill Title - -Instructions for Claude... -``` - -See the [Claude Code documentation](https://docs.anthropic.com/en/docs/claude-code) for more details on skill creation. From e0493f999538c878eda6e85bd3c97b1f009c3d33 Mon Sep 17 00:00:00 2001 From: alban bertolini Date: Fri, 19 Dec 2025 17:40:23 +0100 Subject: [PATCH 4/4] docs: add CRUD tools (create, update, delete) to forest-mcp skill --- claude-skills/forest-mcp/SKILL.md | 44 ++++++++++++++++++++++++++++--- 1 file changed, 41 insertions(+), 3 deletions(-) diff --git a/claude-skills/forest-mcp/SKILL.md b/claude-skills/forest-mcp/SKILL.md index ee80b7eab9..853440f3fe 100644 --- a/claude-skills/forest-mcp/SKILL.md +++ b/claude-skills/forest-mcp/SKILL.md @@ -1,11 +1,11 @@ --- name: forest-mcp -description: Query Forest Admin data through MCP tools. Use when the user wants to search, filter, or explore data from their Forest Admin database. Triggers on questions like "find all users", "show orders from last week", "how many products", or any data exploration request. +description: Query and manipulate Forest Admin data through MCP tools. Use when the user wants to search, filter, explore, create, update, or delete data from their Forest Admin database. Triggers on questions like "find all users", "create a new order", "update user 42", "delete inactive products", or any data operation request. --- # Forest Admin MCP -Query Forest Admin data as if it were a database, with an abstraction layer that handles authentication, filtering, and relationships. +Query and manipulate Forest Admin data as if it were a database, with an abstraction layer that handles authentication, filtering, and relationships. ## Available Tools @@ -14,12 +14,16 @@ Query Forest Admin data as if it were a database, with an abstraction layer that | `describeCollection` | Get collection schema (fields, types, operators, relations) | | `list` | Query records from a collection | | `listRelated` | Query records from a one-to-many or many-to-many relation | +| `create` | Create a new record in a collection | +| `update` | Update an existing record by ID | +| `delete` | Delete one or more records by IDs | ## Workflow -1. **Always start with `describeCollection`** to understand the collection structure before querying +1. **Always start with `describeCollection`** to understand the collection structure before querying or modifying data 2. Use `list` for direct collection queries 3. Use `listRelated` to traverse relationships (e.g., "orders of user 123") +4. Use `create`, `update`, `delete` for data modifications ## Filter Syntax @@ -96,9 +100,43 @@ list({ }) ``` +**"Create a new user"** +``` +create({ + collectionName: "users", + attributes: { + name: "John Doe", + email: "john@example.com", + status: "active" + } +}) +``` + +**"Update user 42's email"** +``` +update({ + collectionName: "users", + recordId: 42, + attributes: { + email: "newemail@example.com" + } +}) +``` + +**"Delete inactive users"** +``` +1. list({ collectionName: "users", filters: { field: "status", operator: "Equal", value: "inactive" } }) +2. delete({ + collectionName: "users", + recordIds: [1, 5, 12] // IDs from the list result + }) +``` + ## Tips - Use `enableCount: true` when user asks "how many" or needs totals - Use `fields: ["id", "name"]` to reduce payload when only specific fields needed - Use `search` parameter for full-text search across searchable fields - Check `isSortable` from describeCollection before using sort +- For `update`, only include attributes you want to change +- For `delete`, always confirm with user before deleting multiple records