Loading
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.
Related Issues
- Origin discussion: !258924 (comment 3963912878)
- Companion MR: gitlab-org/ai/skills!152 (merged)
- Merge order: !260040 (merged) first, then gitlab-org/ai/skills!152 (merged)
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/skillsata5b7cab2dde0a5fc90e6f8ba12736f123699263f, except the Contributing section (now points at this repo) andversion(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/skillssymlink, so.agents/skills/postgresaiwon'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 thepostgresaiCLI 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 theopenapi_docspre-push hook because this worktree has noconfig/database.yml. I didn't run markdownlint, it isn't installed locally.
Follow-ups:
- Reconcile
references/db-review-flow.mdwith 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.mdmentions thegitlab-psqlskill, which exists in ai/skills but not here.
Edited by Dmitry Gruzd