local-db-qa

Arranges MongoDB test data and asserts outcomes for local quality testing.

Updated May 2, 2024
One-click install
npx skills add https://github.com/cman131/EatSomethingSourWhenYoureTired --skill local-db-qa-cman131
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: local-db-qa
Source: https://github.com/cman131/EatSomethingSourWhenYoureTired/tree/main/.claude/skills/local-db-qa
Command: npx skills add https://github.com/cman131/EatSomethingSourWhenYoureTired --skill local-db-qa-cman131

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Verifying code changes against a real database locally is slow and error-prone when done by hand. This Skill automates the arrange-act-assert cycle against a developer's MongoDB sandbox: it derives test scenarios from a PR or local diff, prepares the exact document state needed, and verifies outcomes after the code runs. ## Core Features & Use Cases - Scenario derivation from code changes: Analyzes a PR URL, branch, or uncommitted git diff to enumerate testable code paths and guard conditions. - Automated data arrangement: Queries existing documents, generates missing ones, and upserts them via the MongoDB SDK/CLI without manual console work. - Before/after assertion: Re-queries documents after the user runs the code and reports PASS/FAIL with highlighted state changes. - Use Case: You changed a game-verification endpoint in an Express/Mongoose service. The Skill reads your diff, proposes scenarios (happy path, rejection, invalid input), upserts a matching game document into your sandbox, gives you the curl command to run, then confirms the status field transitioned correctly. ## Quick Start Ask the AI to test your local changes against the MongoDB sandbox, for example by saying "run local-db-qa on my uncommitted changes and test the game verification flow".

Frequently Asked Questions about local-db-qa

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I test local code changes against a MongoDB database?▼

Derive test scenarios from your git diff or PR, arrange matching documents in a sandbox database, run the code locally, then re-query to compare before and after state. This Skill automates that arrange-act-assert loop using MongoDB queries and SDK upserts.

How to create test documents in MongoDB without manual inserts?▼

Write the JSON document to a temp file and upsert it with a Bash command using the MongoDB SDK or CLI, fetching credentials at runtime rather than hardcoding secrets. Always show the proposed document to the user before writing.

Why does my MongoDB query return empty when data should exist?▼

Empty results often mean you are querying the wrong container or collection for that entity type. Confirm the service's startup logs show it reading the same container as your query before suspecting deserialization or partition-key bugs.

Can this Skill delete test records from the database?▼

No, deletes are explicitly not allowed. If cleanup is needed, the user is directed to remove records manually through the database's own console or portal.

What are the limitations of sandbox database testing?▼

This approach only works against a developer's personal sandbox account, never production data. Many query tools are read-only, so writes require a locally installed SDK, and strongly-typed id fields must contain validly formatted values to avoid deserialization errors.