Database Optimizer
Jeffallan/claude-skills
Tunes PostgreSQL and MySQL performance by analyzing slow queries and execution plans, designing indexes, rewriting queries and adjusting configuration, one validated change at a time.
Application performance tuning, JVM optimization, database query tuning, Vaadin UI performance
$ npx skills add Hack23/cia --skill performance-optimization -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install Hack23/cia performance-optimization --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/Hack23/cia.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.github/skills/performance-optimization .claude/skills/performance-optimization && rm -rf skills-srcUse ~/.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/
Install the "performance-optimization" agent skill from https://github.com/Hack23/cia/tree/master/.github/skills/performance-optimization into .claude/skills/performance-optimization/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "performance-optimization", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/Hack23/cia/tree/master/.github/skills/performance-optimizationType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add Hack23/cia --skill performance-optimization -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install Hack23/cia performance-optimization --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Hack23/cia.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.github/skills/performance-optimization .agents/skills/performance-optimization && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "performance-optimization" agent skill from https://github.com/Hack23/cia/tree/master/.github/skills/performance-optimization into .agents/skills/performance-optimization/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "performance-optimization", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add Hack23/cia --skill performance-optimization -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install Hack23/cia performance-optimization --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Hack23/cia.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.github/skills/performance-optimization .cursor/skills/performance-optimization && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "performance-optimization" agent skill from https://github.com/Hack23/cia/tree/master/.github/skills/performance-optimization into .cursor/skills/performance-optimization/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "performance-optimization", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/Hack23/cia.git --path .github/skills/performance-optimization--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add Hack23/cia --skill performance-optimization -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install Hack23/cia performance-optimization --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Hack23/cia.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.github/skills/performance-optimization .gemini/skills/performance-optimization && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "performance-optimization" agent skill from https://github.com/Hack23/cia/tree/master/.github/skills/performance-optimization into .gemini/skills/performance-optimization/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "performance-optimization", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install Hack23/cia performance-optimizationInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add Hack23/cia --skill performance-optimization -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/Hack23/cia.git skills-src && mkdir -p .github/skills && cp -r skills-src/.github/skills/performance-optimization .github/skills/performance-optimization && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "performance-optimization" agent skill from https://github.com/Hack23/cia/tree/master/.github/skills/performance-optimization into .github/skills/performance-optimization/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "performance-optimization", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add Hack23/cia --skill performance-optimization -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install Hack23/cia performance-optimization --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Hack23/cia.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.github/skills/performance-optimization .opencode/skills/performance-optimization && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "performance-optimization" agent skill from https://github.com/Hack23/cia/tree/master/.github/skills/performance-optimization into .opencode/skills/performance-optimization/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "performance-optimization", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
performance-optimizationApplication performance tuning, JVM optimization, database query tuning, Vaadin UI performance
Performance Optimization is an agent skill from Hack23/cia. Application performance tuning, JVM optimization, database query tuning, Vaadin UI performance
Its SKILL.md is about 1.9k 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 Performance optimization, Query optimization and Web performance. It works with PostgreSQL and Spring Boot. 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.
Read from SKILL.md and the folder at commit 6a9797b. It shows what the files ask for, not the result of running them.
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.
No scripts in the folder and no shell commands in SKILL.md (its code samples are java, sql and bash).
From the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
postgresql.orgvaadin.comdocs.spring.iodocs.oracle.comFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Performance Optimization loads about 1.9k tokens when it runs. Until then it costs about 30 tokens; SKILL.md has 285 words of instructions outside code blocks.
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.
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.
The full file from Hack23/cia at commit 6a9797b, republished under its Apache-2.0 licence (© Hack23). 285 words, ~1,917 tokens.
.claude/skills/performance-optimization/SKILL.md (or your agent's skills folder).This skill provides performance optimization guidance for the CIA platform across JVM tuning, PostgreSQL query optimization, Vaadin UI rendering, and Spring Framework efficiency. It ensures the political intelligence platform delivers responsive analysis to users.
Apply this skill when:
Do NOT use for:
| Metric | Target | Measurement |
|---|---|---|
| Page load time | < 3 seconds | Lighthouse, browser DevTools |
| API response time | < 500ms (p95) | CloudWatch metrics |
| Database query time | < 100ms (p95) | PostgreSQL pg_stat_statements |
| JVM heap usage | < 80% of max | JMX / CloudWatch |
| Vaadin push latency | < 200ms | Client-side measurement |
| Startup time | < 30 seconds | Application logs |
# Production JVM flags for CIA platform (Java 21+)
JAVA_OPTS="-server \
-Xms2g -Xmx4g \
-XX:+UseG1GC \
-XX:MaxGCPauseMillis=200 \
-XX:+UseStringDeduplication \
-XX:+OptimizeStringConcat \
-XX:MetaspaceSize=256m \
-XX:MaxMetaspaceSize=512m \
-XX:+HeapDumpOnOutOfMemoryError \
-XX:HeapDumpPath=/var/log/cia/heapdump.hprof \
-Djava.security.egd=file:/dev/./urandom"// ✅ EFFICIENT: Stream processing for large datasets
@Service
public class VotingDataProcessor {
@Transactional(readOnly = true)
public void processVotingRecords(String sessionId) {
try (Stream<VoteData> votes = voteRepository.streamBySession(sessionId)) {
votes.map(this::analyzeVote)
.filter(Objects::nonNull)
.forEach(resultRepository::save);
}
// Stream auto-closes, no memory accumulation
}
}
// ❌ INEFFICIENT: Loading all records into memory
public void processVotingRecords(String sessionId) {
List<VoteData> allVotes = voteRepository.findBySession(sessionId);
// May load millions of records into heap
}-- High-impact indexes for common CIA queries
-- Politician lookup by party and status
CREATE INDEX idx_person_party_status
ON person_data (party, status) WHERE status = 'ACTIVE';
-- Voting record time-series queries
CREATE INDEX idx_vote_date_committee
ON vote_data (vote_date DESC, committee_id);
-- Document search optimization
CREATE INDEX idx_document_search
ON document_content USING gin(to_tsvector('swedish', content));
-- Materialized view refresh tracking
CREATE INDEX idx_mv_refresh_status
ON materialized_view_log (view_name, last_refresh DESC);// ❌ N+1 Query Problem
@Entity
public class Committee {
@OneToMany(fetch = FetchType.LAZY)
private List<CommitteeMember> members;
}
// Accessing committee.getMembers() in a loop = N+1 queries
// ✅ FIX: Use JOIN FETCH or EntityGraph
@Query("SELECT c FROM Committee c JOIN FETCH c.members WHERE c.id = :id")
Committee findWithMembers(@Param("id") Long id);
// ✅ FIX: Use @EntityGraph
@EntityGraph(attributePaths = {"members", "members.person"})
Committee findById(Long id);-- Concurrent refresh to avoid locks during read
REFRESH MATERIALIZED VIEW CONCURRENTLY view_riksdagen_politician_summary;
-- Schedule refresh based on data freshness requirements
-- High priority: refresh every 15 minutes during business hours
-- Low priority: refresh daily during off-peak// ✅ EFFICIENT: Lazy loading with DataProvider
Grid<PoliticianSummary> grid = new Grid<>(PoliticianSummary.class);
grid.setDataProvider(
DataProvider.fromCallbacks(
query -> politicianService.fetch(query.getOffset(), query.getLimit()),
query -> politicianService.count()
)
);
// ❌ INEFFICIENT: Loading all items upfront
grid.setItems(politicianService.findAll()); // Loads everything// ✅ Use virtual scrolling for long lists
grid.setPageSize(50);
grid.setMultiSort(true);
// ✅ Minimize push updates
@Push(transport = Transport.WEBSOCKET_XHR)
public class MainView extends AppLayout {
// Only push critical real-time updates
}
// ✅ Defer non-critical UI updates
UI.getCurrent().access(() -> {
notificationComponent.update(newData);
});@CssImport instead of inline styles for reusevaadin.productionMode=true)@ClientCallable methods@Service
public class PoliticianService {
// Cache frequently accessed, rarely changing data
@Cacheable(value = "politicians", key = "#personId",
unless = "#result == null")
public PoliticianSummary getPolitician(String personId) {
return repository.findSummaryById(personId);
}
// Evict cache when data is updated
@CacheEvict(value = "politicians", key = "#personId")
public void updatePolitician(String personId, PoliticianUpdate update) {
repository.update(personId, update);
}
}// ✅ Read-only transactions for queries (no dirty checking)
@Transactional(readOnly = true)
public List<VotingSummary> getVotingSummaries(String sessionId) {
return votingRepository.findSummariesBySession(sessionId);
}
// ✅ Batch operations for bulk inserts
@Transactional
public void importVotingData(List<VoteData> votes) {
int batchSize = 50;
for (int i = 0; i < votes.size(); i++) {
entityManager.persist(votes.get(i));
if (i % batchSize == 0) {
entityManager.flush();
entityManager.clear(); // Release memory
}
}
}@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.MILLISECONDS)
@State(Scope.Benchmark)
public class PoliticianLookupBenchmark {
@Benchmark
public void benchmarkPoliticianSearch() {
politicianService.searchByName("test");
}
}pg_stat_statements for query analysis© 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
Just SKILL.md in .github/skills/performance-optimization of Hack23/cia.
Open the folder on GitHubat commit 6a9797b
Performance Optimization 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Performance Optimization this skillHack23/cia | 239 | — | ~1.9k | Automated safety check: Pass | Apache-2.0 | |
| Database OptimizerJeffallan/claude-skills | 12k | — | ~1.6k | Automated safety check: Pass | MIT | |
| Mz ProfileMaterializeInc/materialize | 6.4k | — | ~480 | Automated safety check: Pass | Custom licence | |
| SQL Optimizationgithub/awesome-copilot | 40k | 2 repos | ~2.3k | Automated safety check: Pass | MIT | |
| Odoo Performance Tunersickn33/agentic-awesome-skills | 47k | 2 repos | ~1.2k | Automated safety check: Pass | MIT | |
| SQL Optimizationtotvs/engpro-advpl-tlpp-skills | 141 | — | ~1.2k | Automated safety check: Pass | MIT |
Jeffallan/claude-skills
Tunes PostgreSQL and MySQL performance by analyzing slow queries and execution plans, designing indexes, rewriting queries and adjusting configuration, one validated change at a time.
MaterializeInc/materialize
Trigger: "profile Materialize", "check memory usage", "analyze binary size", "debug performance", or mentions profiling, samply, heaptrack, flame graphs, memory checking, binary size, slow queries…
github/awesome-copilot
Universal SQL performance optimization assistant for comprehensive query tuning, indexing strategies, and database performance analysis across all SQL databases (MySQL, PostgreSQL, SQL Server…
sickn33/agentic-awesome-skills
Expert guide for diagnosing and fixing Odoo performance issues: slow queries, worker configuration, memory limits, PostgreSQL tuning, and profiling tools.
totvs/engpro-advpl-tlpp-skills
Universal SQL performance optimization assistant for comprehensive query tuning, indexing strategies, and database performance analysis across SQL databases (PostgreSQL, SQL Server, Oracle).
kid-sid/claude-spellbook
A skill your agent uses when diagnosing a slow HTTP endpoint or high-latency service — profiling, adding an application-level cache, offloading CPU-bound work to threads or workers, or defining a…
Hack23/cia
WCAG 2.1 AA compliance, ARIA attributes, keyboard navigation, screen reader optimization for accessible political data platforms
Hack23/cia
Advanced chart types, D3.js/Vaadin Charts patterns, political data visualization, time series analysis
Hack23/cia
AI governance, EU AI Act compliance, OWASP LLM security, responsible AI practices for GitHub Copilot agents
Hack23/cia
External API integration patterns, retry logic, circuit breakers, caching, rate limiting for government data APIs
Hack23/cia
AWS CloudWatch metrics, alarms, dashboards, log insights, and application monitoring for the CIA platform
Hack23/cia
AWS security best practices, VPC security, IAM, KMS, CloudTrail, GuardDuty for CIA platform deployment
Works with
Categories
Application performance tuning, JVM optimization, database query tuning, Vaadin UI performance. Performance Optimization is an agent skill from Hack23/cia.
Performance Optimization fits situations like: tasks that involve Performance optimization; tasks that involve Query optimization; tasks that involve Web performance.
Run `npx skills add Hack23/cia --skill performance-optimization -a claude-code`. Or copy the skill folder (.github/skills/performance-optimization in Hack23/cia) into .claude/skills/performance-optimization in your project. Claude Code loads it when a task matches its description.
Run `npx skills add Hack23/cia --skill performance-optimization -a codex`. Or copy the skill folder (.github/skills/performance-optimization in Hack23/cia) into .agents/skills/performance-optimization in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Hack23/cia --skill performance-optimization -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/performance-optimization, .gemini/skills/performance-optimization, .github/skills/performance-optimization and .opencode/skills/performance-optimization in your project.
SKILL.md names no scripts, command-line tools or credentials: Performance Optimization is instructions for the agent only.
SKILL.md names 4 domains. As links in the text: postgresql.org, vaadin.com, docs.spring.io and docs.oracle.com. This is read from the text; nothing was executed.
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.
Performance Optimization 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.
About 1.9k tokens (SKILL.md is roughly 7.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Performance Optimization: Database Optimizer (Jeffallan/claude-skills, 12k stars), Mz Profile (MaterializeInc/materialize, 6.4k stars), SQL Optimization (github/awesome-copilot, 40k stars) and Odoo Performance Tuner (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.
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 6, 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.