Agent skill

Postgresql Operations

by Hack23 in Hack23/cia

Manage PostgreSQL: schema migrations, performance tuning, backups, monitoring per README-SCHEMA-MAINTENANCE.md

Apache-2.0Auto-check passedDatabases

Install Postgresql Operations

skills CLI
$ npx skills add Hack23/cia --skill postgresql-operations -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Hack23/cia postgresql-operations --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Hack23/cia.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.github/skills/postgresql-operations .claude/skills/postgresql-operations && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
postgresql-operations
GitHub stars
239
Token cost
~467 tokens
SKILL.md length
40 words
Files
1
Skills in repo
78
Repo updated
First seen
Licence
Apache-2.0

At a glance

Manage PostgreSQL: schema migrations, performance tuning, backups, monitoring per README-SCHEMA-MAINTENANCE.md

  • Tasks that involve Backup and disaster recovery
  • SKILL.md covers Purpose, When to Use, Liquibase Migrations and Performance Tuning, plus 3 more sections
  • Calls pg_dump
  • Tasks that involve Database migrations

What it does

Postgresql Operations is an agent skill from Hack23/cia. Manage PostgreSQL: schema migrations, performance tuning, backups, monitoring per README-SCHEMA-MAINTENANCE.md

Its SKILL.md is about 470 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Databases, covering Backup and disaster recovery and Database migrations. It works with PostgreSQL. The repository describes itself as: Citizen Intelligence Agency. Open-source intelligence platform analyzing Swedish political activities using AI and data visualization. Tracks politicians, government… The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve Backup and disaster recovery
  • Tasks that involve Database migrations

Example prompts

  • “/postgresql-operations”

What it can do on your machine

Read from SKILL.md and the folder at commit bbed538. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • pg_dump

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • postgresql.org

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Postgresql Operations loads about 467 tokens when it runs. Until then it costs about 33 tokens; SKILL.md has 40 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~33
When it runs · the whole SKILL.md, loaded when a task matches
~467

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Hack23/cia at commit bbed538, republished under its Apache-2.0 licence (© Hack23). 40 words, ~467 tokens.

Download SKILL.mdSave it as .claude/skills/postgresql-operations/SKILL.md (or your agent's skills folder).
name
postgresql-operations
description
Manage PostgreSQL: schema migrations, performance tuning, backups, monitoring per README-SCHEMA-MAINTENANCE.md
license
Apache-2.0

PostgreSQL Operations Skill

Purpose

Manage PostgreSQL database operations including migrations, performance tuning, and backups.

When to Use

  • ✅ Schema migrations with Liquibase
  • ✅ Performance optimization
  • ✅ Backup and recovery
  • ✅ Monitoring and alerting

Liquibase Migrations

xml
<changeSet id="1" author="developer">
    <createTable tableName="politician">
        <column name="id" type="VARCHAR(12)">
            <constraints primaryKey="true"/>
        </column>
        <column name="first_name" type="VARCHAR(50)">
            <constraints nullable="false"/>
        </column>
        <column name="last_name" type="VARCHAR(50)">
            <constraints nullable="false"/>
        </column>
    </createTable>
</changeSet>

Performance Tuning

sql
-- Add indexes for frequently queried columns
CREATE INDEX idx_politician_party ON politician(party);
CREATE INDEX idx_voting_record_date ON voting_record(vote_date);

-- Analyze query performance
EXPLAIN ANALYZE 
SELECT * FROM politician WHERE party = 'S' AND district = 'Stockholm';

-- Update statistics
ANALYZE politician;

Backup Strategy

bash
# Daily backups
pg_dump -h localhost -U cia_user -d cia_production > backup_$(date +%Y%m%d).sql

# Point-in-time recovery setup
wal_level = replica
archive_mode = on
archive_command = 'cp %p /backup/archive/%f'

Monitoring

sql
-- Check connection count
SELECT count(*) FROM pg_stat_activity;

-- Check slow queries
SELECT query, calls, total_time, mean_time 
FROM pg_stat_statements 
ORDER BY mean_time DESC LIMIT 10;

References

© Hack23, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .github/skills/postgresql-operations of Hack23/cia.

Open the folder on GitHubat commit bbed538

Compare with similar skills

Postgresql Operations next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Postgresql Operations compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Postgresql Operations this skillHack23/cia239—~467Automated safety check: PassApache-2.0
DB AdminEliasOulkadi/shokunin114—~2kAutomated safety check: NotesMIT
Cognee Database Migrationstopoteretes/cognee32k—~2.6kAutomated safety check: NotesApache-2.0
Postgrestimescale/pg-aiguide1.9k—~941Automated safety check: PassApache-2.0
Database Backupssickn33/agentic-awesome-skills47k2 repos~3.1kAutomated safety check: NotesMIT
GCP Cloud SQLsickn33/agentic-awesome-skills47k2 repos~2.4kAutomated safety check: PassMIT

Similar skills

  • DB Admin

    EliasOulkadi/shokunin

    PostgreSQL database administration — backup/restore (pgdump, PITR, WAL archiving), health monitoring (connections, bloat, cache hit ratio, dead tuples), connection pooling (PgBouncer), replication…

    114 GitHub stars~2k tokensUpdated 3 days ago
    DatabasesAuto-check: notes
  • Cognee Database Migrations

    topoteretes/cognee

    Explains how cognee's two migration chains run, how to check and repair migration state with cognee-cli, and how to write new Alembic or graph and vector migrations.

    32k GitHub stars~2.6k tokensUpdated today
    DatabasesAuto-check: notes
  • Postgres

    timescale/pg-aiguide

    A skill your agent uses for any PostgreSQL database work — table design, indexing, data types, constraints, extensions (pgvector, PostGIS, TimescaleDB), search, and migrations.

    1.9k GitHub stars~941 tokensUpdated today
    DatabasesAuto-check passed
  • Database Backups

    sickn33/agentic-awesome-skills

    Implement database backup strategies. An agent skill from sickn33/agentic-awesome-skills.

    47k GitHub starsUsed in 2 repos~3.1k tokens
    DatabasesAuto-check: notes
  • GCP Cloud SQL

    sickn33/agentic-awesome-skills

    Provision Cloud SQL and Spanner databases. An agent skill from sickn33/agentic-awesome-skills.

    47k GitHub starsUsed in 2 repos~2.4k tokens
    DatabasesAuto-check passed
  • Alloydb Basics

    google/skills

    Official

    Manages clusters, instances, and backups for AlloyDB for PostgreSQL, and integrates with AlloyDB Model Context Protocol (MCP) tools for automated database operations.

    21k GitHub stars~1.7k tokensUpdated today
    DatabasesAuto-check passed

More from Hack23/cia

All 78 skills in this repo
  • WCAG 2.1 AA compliance, ARIA attributes, keyboard navigation, screen reader optimization for accessible political data platforms

    239 GitHub stars~2.7k tokensUpdated today
    Auto-check passed
  • Advanced chart types, D3.js/Vaadin Charts patterns, political data visualization, time series analysis

    239 GitHub stars~1.5k tokensUpdated today
    Auto-check passed
  • AI Governance

    Hack23/cia

    AI governance, EU AI Act compliance, OWASP LLM security, responsible AI practices for GitHub Copilot agents

    239 GitHub stars~1.4k tokensUpdated today
    Auto-check passed
  • API Integration

    Hack23/cia

    External API integration patterns, retry logic, circuit breakers, caching, rate limiting for government data APIs

    239 GitHub stars~1.9k tokensUpdated today
    Auto-check passed
  • AWS CloudWatch metrics, alarms, dashboards, log insights, and application monitoring for the CIA platform

    239 GitHub stars~1.9k tokensUpdated today
    Auto-check passed
  • AWS security best practices, VPC security, IAM, KMS, CloudTrail, GuardDuty for CIA platform deployment

    239 GitHub stars~2.3k tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about Postgresql Operations

What does Postgresql Operations do?

Manage PostgreSQL: schema migrations, performance tuning, backups, monitoring per README-SCHEMA-MAINTENANCE.md. Postgresql Operations is an agent skill from Hack23/cia.

When should I use Postgresql Operations?

Postgresql Operations fits situations like: tasks that involve Backup and disaster recovery; tasks that involve Database migrations.

How do I install Postgresql Operations in Claude Code?

Run `npx skills add Hack23/cia --skill postgresql-operations -a claude-code`. Or copy the skill folder (.github/skills/postgresql-operations in Hack23/cia) into .claude/skills/postgresql-operations in your project. Claude Code loads it when a task matches its description.

How do I install Postgresql Operations in Codex?

Run `npx skills add Hack23/cia --skill postgresql-operations -a codex`. Or copy the skill folder (.github/skills/postgresql-operations in Hack23/cia) into .agents/skills/postgresql-operations in your project. Codex loads it when a task matches its description.

Can I use Postgresql Operations in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Hack23/cia --skill postgresql-operations -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/postgresql-operations, .gemini/skills/postgresql-operations, .github/skills/postgresql-operations and .opencode/skills/postgresql-operations in your project.

What does Postgresql Operations need to run?

Going by SKILL.md and its folder, Postgresql Operations needs the command-line tools its instructions call (pg_dump).

Does Postgresql Operations access the network?

SKILL.md names 1 domain. As links in the text: postgresql.org. This is read from the text; nothing was executed.

Is Postgresql Operations safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Postgresql Operations use?

Postgresql Operations is published under the Apache-2.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Postgresql Operations use?

About 467 tokens (SKILL.md is roughly 1.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Postgresql Operations?

Skills that share tags, products or a category with Postgresql Operations: DB Admin (EliasOulkadi/shokunin, 114 stars), Cognee Database Migrations (topoteretes/cognee, 32k stars), Postgres (timescale/pg-aiguide, 1.9k stars) and Database Backups (sickn33/agentic-awesome-skills, 47k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Postgresql Operations?

Hack23 (a GitHub organization) maintains it in Hack23/cia, which has 239 GitHub stars. The repository holds 78 skills in this directory. The repository was last updated on October 7, 2026.

Source: Hack23/cia on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.