# Cerb Search

> Build Cerb search queries for filtering records. Use when users need help constructing search queries for any record type (tickets, messages, workers, orgs, etc.) — whether for the Cerb search bar, automations, saved searches, or data queries.

- **Type:** Skill
- **Install:** `agentstack add skill-cerb-claude-skills-cerb-search`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [cerb](https://agentstack.voostack.com/s/cerb)
- **Installs:** 0
- **Category:** [Search](https://agentstack.voostack.com/c/search)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [cerb](https://github.com/cerb)
- **Source:** https://github.com/cerb/claude-skills/tree/main/cerb-search

## Install

```sh
agentstack add skill-cerb-claude-skills-cerb-search
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Cerb Search Query Builder

Consult `references/search-queries.md` for the complete reference: filter types, operators, deep search syntax, boolean groups, sorting, and per-record-type field listings.

## Process

1. **Identify the record type** (ticket, message, worker, org, contact, task, etc.)
2. **Look up available fields** in `references/search-queries.md` under "Search Query Fields by Record Type"
3. **Only use fields that exist** for that record type — never invent field names
4. **Choose the correct filter syntax** based on field type
5. **Construct the query** using proper syntax

## Syntax Quick Reference

| Field Type | Example |
|---|---|
| text | `subject:Invoice*` `status:open` `name:[a,b,c]` `mask:!ABC*` |
| fulltext | `content:("exact phrase" other terms)` |
| numeric | `importance:>=75` `size:>100000` `id:123` `age:25...50` |
| boolean | `isAdmin:y` `isDisabled:no` |
| date | `created:today` `updated:"-1 week"` `closed:"2024-01-01 to 2024-06-30"` |
| chooser | `group.id:5` `owner.id:[1,2,3]` `bucket.id:0` |
| record (deep search) | `group:(name:Support)` `org:(country:Germany)` |
| links | `links:task` `links.ticket:(mask:ABC*)` |
| watchers | `watchers:me` `watchers:any` `watchers:none` |
| null | `org.id:null` `phone:!null` |

## Key Rules

**Deep search:** Use parentheses for nested queries: `group:(name:Support)`. Chain to any depth: `messages.first:(sender:(org:(name:"Acme Corp")))`. Negate with `!`: `group:!(name:Sales)`. The `on.:` filter always takes a nested query: `on.ticket:(id:123)` — never `on.ticket:123`.

**Boolean logic:** Filters are AND-ed by default. Use `OR` between filters: `owner.id:me OR owner.id:0`. Group with parentheses: `(status:open group:(name:Sales)) OR (status:waiting group:(name:Support))`. Negate groups: `!(mimetype:image/png size:<100KB)`.

**Sorting/limiting:** `sort:-field` (desc), `sort:field` (asc), multiple: `sort:-importance,created`. `limit:N` to cap results.

**Query parameters (automations only):** When user input is involved, use `record_query_params:` for safe injection:
```kata
record_query: status:${status} group.id:${group_id}
record_query_params:
  status: o
  group_id: 5
```

## Related Skills

These skills are always installed alongside this one:

- `/cerb-automations` — write or modify Cerb automations (KATA, commands, triggers, events)
- `/cerb-docs` — look up Cerb documentation, features, configuration, integrations
- `/cerb-dev` — make changes to the Cerb PHP/MySQL codebase (new record types, extensions, migrations)

## Output Format

- **Record type:** state the target record type
- **Query:** the complete query on a single line (all filters space-separated)
- For automations, show in `record.search:` context with proper KATA indentation
- For the Cerb UI or general use, always present as a single line
- Explain each filter if the query is non-trivial

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [cerb](https://github.com/cerb)
- **Source:** [cerb/claude-skills](https://github.com/cerb/claude-skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-cerb-claude-skills-cerb-search
- Seller: https://agentstack.voostack.com/s/cerb
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
