# database-query

This skill finds a Notion database by name or ID and returns matching rows as a compact table, applying filters and sorting you describe in plain words.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · ★ 38
- Author: makenotion
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/makenotion/cursor-notion-plugin/tree/HEAD/skills/database-query/SKILL.md
- Updated: 2026-02-07
- HTML: https://affpapa.org/en/nevibecode/skills/database-query

## What it does

It runs the lookup through the Notion MCP server. First it works out which database you mean and what filters and sorts to apply. If several databases share the name, the agent asks you to pick one.

Row count stays sensible unless you ask for more. What comes back is a table with the key properties plus a short summary of any long text fields. Raw JSON is kept out of the answer on purpose, since a table is easier to read and act on.

An empty result gets called out, along with a suggestion for different filters. You need the Notion MCP server connected — the query has nowhere to run without it.

## Requirements
- Works with: Notion

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add makenotion/cursor-notion-plugin --skill database-query -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/database-query/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/database-query/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add makenotion/cursor-notion-plugin --skill database-query -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/database-query/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add makenotion/cursor-notion-plugin --skill database-query -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/database-query/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install makenotion/cursor-notion-plugin database-query
```

2. **Manually: put the files in place**
- File: `.github/skills/database-query/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add makenotion/cursor-notion-plugin --skill database-query -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/makenotion/cursor-notion-plugin --path skills/database-query
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/database-query/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add makenotion/cursor-notion-plugin --skill database-query -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/makenotion/cursor-notion-plugin/tree/HEAD/skills/database-query/SKILL.md

## When to use it
- pull every Active task from a Notion database
- list one owner's rows for the current week
- locate a database when you only know its name
- get a readable table instead of raw JSON
- adjust filters after an empty result

## Example prompts
- Query the Notion database Tasks for rows where Status is Active, show Name, Status, Owner, Due
- Find the Notion database called Roadmap and list upcoming items sorted by date
- Pull up to 30 rows from the clients database where Owner is Alice

## Similar
- [notion-automation](https://affpapa.org/en/nevibecode/skills/notion-automation.md) — skill · 4800 installs
- [notion](https://affpapa.org/en/nevibecode/skills/notion.md) — skill · 5600 installs
- [database-query-optimization](https://affpapa.org/en/nevibecode/skills/database-query-optimization.md) — skill · 586 installs
- [notion-meeting-intelligence](https://affpapa.org/en/nevibecode/skills/openai-notion-meeting-intelligence.md) — skill · 3100 installs
- [notion-mcp](https://affpapa.org/en/nevibecode/skills/notion-mcp.md) — skill · 735 installs
- [notion-knowledge-capture](https://affpapa.org/en/nevibecode/skills/notion-knowledge-capture-2.md) — skill · 567 installs

From the same set: [makenotion/cursor-notion-plugin](https://affpapa.org/en/nevibecode/by/makenotion/cursor-notion-plugin.md) — 4 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
