elog-copilot-postgres

Executes SQL queries on the ELOG PostgreSQL database via psql with RLS.

Updated Jan 27, 2026
One-click install
npx skills add https://github.com/carbonscott/deploy-opencode --skill elog-copilot-postgres
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: elog-copilot-postgres
Source: https://github.com/carbonscott/deploy-opencode/tree/main/claude/skills/elog-copilot-postgres
Command: npx skills add https://github.com/carbonscott/deploy-opencode --skill elog-copilot-postgres

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Autonomous SQL assistant for researchers analyzing LCLS experiment elog data in PostgreSQL with Row-Level Security. Executes queries via psql, answers database questions, and handles LCLS-specific concepts (run numbers, experiments, questionnaires, detectors, workflows, logbook entries). Results are automatically filtered by the user's experiment permissions via RLS. Use when users ask about LCLS experiments, run data, detector configurations, sample information, logbook entries, analysis workflows, or any question answerable from the elog database.

Core Features & Use Cases

  • Executes SQL queries against the elog PostgreSQL database via psql and returns structured results, honoring RLS restrictions.
  • Answers questions about experiments, runs, detectors, questionnaires, logbook entries, and workflows using the schema described in references/schema.md.
  • Guides on constructing queries and interpreting results for research planning and data discovery.

Quick Start

Query the elog database for a specific experiment’s runs and related logbook entries.

Frequently Asked Questions about elog-copilot-postgres

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

FAQPage Schema
How do I query LCLS elog data in PostgreSQL without violating Row-Level Security?

Use the elog-copilot-postgres assistant to automate SQL queries against the LCLS elog PostgreSQL database. It constructs safe queries that honor RLS restrictions, filtering runs, experiments, and logbook entries based on your specific user permissions.

Can I retrieve detector configurations and run numbers from the LCLS elog database?

Yes, you can retrieve detector configurations and run numbers from the LCLS elog database by asking the SQL assistant natural language questions. It maps your queries to the PostgreSQL schema and returns structured experiment and analysis workflow data.

How does Row-Level Security affect fetching LCLS experiment logbook entries?

Row-Level Security ensures you only fetch LCLS experiment logbook entries you have permission to access. The SQL assistant automatically applies RLS filters when querying the PostgreSQL database, returning only authorized runs and questionnaire data.

What is the best way to construct psql commands for LCLS research workflows?

The best way to construct psql commands for LCLS research workflows is using this autonomous SQL assistant. It provides clear operator guidance for building and executing PostgreSQL-specific queries to safely fetch sample information and analysis data.

Do I need to know SQL to search for LCLS experiment data and questionnaires?

No, you do not need to write SQL manually to search for LCLS experiment data and questionnaires. The assistant automates query construction against the PostgreSQL schema, allowing you to ask direct questions about logbook entries and run data.

What are the limitations of using an autonomous SQL assistant for elog data?

A limitation is that the autonomous SQL assistant is constrained by your Row-Level Security permissions, meaning you cannot fetch elog data or logbook entries for experiments you lack authorization to access within the PostgreSQL database.