.claude/skills/querying-positron/SKILL.md
Transforms natural language input into valid MongoDB queries for interrogating Positron's database, issues them to our Mongo cluster, retrieves and optionally analyzes or transforms the results. Use when the user wants to know about Positron's actual data about articles, authors, channels, verticals etc.
npx skillsauth add artsy/positron querying-positronInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Construct valid MongoDB queries, issue them and present or analyze or transform the results.
Use the wrapper script at .claude/skills/querying-positron/scripts/exec.sh to execute queries.
The script handles connection setup and validates that mongosh is installed.
.claude/skills/querying-positron/scripts/exec.sh "db.articles.countDocuments({ published: true })"
.claude/skills/querying-positron/scripts/exec.sh 'db.articles.find( { published: true, layout: "video" } ).sort({ published_at: 1 }).limit(1)'
.claude/skills/querying-positron/scripts/exec.sh 'db.articles.aggregate([ { $match: { published: true } }, { $group: { _id: "$layout", count: { $sum: 1 } } }, { $sort: { count: -1 } }, { $project: { _id: 0, layout: "$_id", count: 1 } } ])'
Prefer simple queries when they will suffice, but use aggregation pipelines when necessary
Format your queries as one-liners, to help avoid shell issues
But if asked by the user to show your query, do so pretty-printed with concise comments ESPECIALLY for aggregation pipeline stages
Transform Mongo's results into VALID json
--json flag as this often fails to serialize correctlyWhen querying by id, remember to wrap the id in Mongo's ObjectId function
db.articles.findOne({ _id: "696921ff5c8bc6fecf779dad" })db.articles.findOne({ _id: ObjectId("696921ff5c8bc6fecf779dad") })When asked for urls, note the following patterns:
https://www.artsy.net/article/{ARTICLE_SLUG}/edithttps://writer.artsy.net/articles/{ARTICLE_ID}/edithttps://www.artsy.net/artwork/{ARTWORK_ID_OR_SLUG}/editSee the example article to understand the shape of a typical document from the articles collection
This will be the subject of most queries.
Article-specific rules:
published: true, unless they explicitly tell you otherwise.slug field is not reliable, instead we want to treat the final entry in the slugs array as the canonical slug.featured_artwork_ids), DO NOT conflate that with featured artists (primary_featured_artist_ids)Articles contain multiple author-related fields that serve different purposes:
author: Object containing the organizational/editorial account (typically "Artsy Editorial")
author.name: Display name (e.g., "Artsy Editorial")author.id: Gravity user ID for this accountcontributing_authors: Array of individual writer(s) who should be credited on the article
name and id (Gravity user ID)Articles store author references using multiple ID systems:
author_ids (array): Positron's internal author record IDs from the authors collection
authors collection to get actual author namesauthor.id and contributing_authors[].id: Gravity user IDs
author_id (singular): Legacy field, purpose varies
To get correct author attribution, use an aggregation pipeline with $lookup to join with the authors collection:
db.articles.aggregate([
{ $match: { published: true } },
{
$lookup: {
from: "authors",
localField: "author_ids",
foreignField: "_id",
as: "author_records",
},
},
// Then use this priority for display:
// 1. contributing_authors[0].name (if array is non-empty)
// 2. author_records[0].name (from the lookup)
// 3. author.name (fallback)
])
Do NOT rely solely on contributing_authors or author.name - they may not reflect the actual article author. Always join with the authors collection using author_ids.
It is a known problem that a handful of partners continue to publish articles themselves, even though we officially stopped supporting this capability years ago.
Before querying for articles authored by partners you MUST refer to Partner-authored Article Problem
IMPORTANT: Do not conflate Partner-authored articles (where partner_channel_id is present) with Artsy-authored articles (where partner_channel_id is null).
When needed refer to the following documents:
Here is a list of all collections in Positron’s MongoDB.
Most of the time you will be interested in articles, but these others are available as well:
articles
authors
channels
curations
organizations
sections
sessions
tags
users
verticals
You can inspect any of these collections’ document shapes by requesting the most recent documents, e.g:
.claude/skills/querying-positron/scripts/exec.sh 'db.authors.find().sort({ _id: -1 }).limit(3)'
development
Maintainer-only workflow for handling GitHub Secret Scanning alerts on OpenClaw. Use when Codex needs to triage, redact, clean up, and resolve secret leakage found in issue comments, issue bodies, PR comments, or other GitHub content.
development
Maintainer workflow for OpenClaw releases, prereleases, changelog release notes, and publish validation. Use when Codex needs to prepare or verify stable or beta release steps, align version naming, assemble release notes, check release auth requirements, or validate publish-time commands and artifacts.
development
Run, watch, debug, and extend OpenClaw QA testing with qa-lab and qa-channel. Use when Codex needs to execute the repo-backed QA suite, inspect live QA artifacts, debug failing scenarios, add new QA scenarios, or explain the OpenClaw QA workflow. Prefer the live OpenAI lane with regular openai/gpt-5.4 in fast mode; do not use gpt-5.4-pro or gpt-5.4-mini unless the user explicitly overrides that policy.
development
End-to-end Parallels smoke, upgrade, and rerun workflow for OpenClaw across macOS, Windows, and Linux guests. Use when Codex needs to run, rerun, debug, or interpret VM-based install, onboarding, gateway smoke tests, latest-release-to-main upgrade checks, fresh snapshot retests, or optional Discord roundtrip verification under Parallels.