Add postgresai agent skill

What does this MR do and why?

I added the postgresai skill (EXPLAIN and index experiments on Database Lab thin clones) to this repo, so it becomes the source of truth. The ai/skills project will sync it from here, which keeps the two copies from drifting. The content is unchanged apart from the contributing note and the version.

Testing

The doctor integration spec passes and so does the skill's shell test, and shellcheck is clean on both scripts. The parity, version-bump and doctor checks pass too.

Performance Analysis

  • This merge request does not introduce any performance regression. If a performance regression is expected, explain why.
Agent context: source, sync path, doctor change, test rationale, validation, follow-ups
  • Source: the files are identical to gitlab-org/ai/skills at a5b7cab2dde0a5fc90e6f8ba12736f123699263f, except the Contributing section (now points at this repo) and version (1.0.1 to 1.0.2, so the sync MR passes the ai/skills version check).
  • The skill lives in .claude/skills/postgresai/. The sync source path is .claude/skills/postgresai. The repository tree API doesn't follow the .agents/skills symlink, so .agents/skills/postgresai won't work.
  • I added the directory to the AI harness doctor allowlist in tooling/ai_harness/config.yml, since the doctor rejects tracked files under .claude/ otherwise. I also added a matching case to the doctor integration spec.
  • I kept tests/test_joe.sh. It stubs the postgresai CLI and needs no network. The sync deletes files missing upstream, so dropping it here would remove the test from ai/skills.
  • /.claude/ already belongs to ai-harness in CODEOWNERS, so I left that file alone.
  • Validation I ran: scripts/check-skills-parity.sh, BASE_REF=origin/master scripts/lint/check-skills-version-bump.sh, scripts/ai_harness/doctor, bundle exec rspec spec/tooling/ai_harness/doctor/integration_spec.rb, bash .claude/skills/postgresai/tests/test_joe.sh, plus the lefthook pre-commit and pre-push hooks. I skipped the openapi_docs pre-push hook because this worktree has no config/database.yml. I didn't run markdownlint, it isn't installed locally.

Follow-ups:

  • Reconcile references/db-review-flow.md with the distilled database principles in .ai/principles/.
  • Add a monolith gate for the skill's shell test (shellcheck and tests/test_joe.sh). Nothing here runs it today, only ai/skills does.
  • Add a database co-owner for /.claude/skills/postgresai/ in CODEOWNERS.
  • references/gitlab.md mentions the gitlab-psql skill, which exists in ai/skills but not here.
Edited by Dmitry Gruzd

Merge request reports

Loading
Loading