Systematic Code Refactoring
luongnv89/claude-howto
Guides refactoring in phases based on Martin Fowler's method: research, test coverage check, planning and small tested steps, with your approval at each phase.
Product quality metrics, SonarCloud analysis, technical debt management, code quality gates
$ npx skills add Hack23/cia --skill product-quality-analysis -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install Hack23/cia product-quality-analysis --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/product-quality-analysis .claude/skills/product-quality-analysis && 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 "product-quality-analysis" agent skill from https://github.com/Hack23/cia/tree/master/.github/skills/product-quality-analysis into .claude/skills/product-quality-analysis/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "product-quality-analysis", 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/product-quality-analysisType 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 product-quality-analysis -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install Hack23/cia product-quality-analysis --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/product-quality-analysis .agents/skills/product-quality-analysis && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "product-quality-analysis" agent skill from https://github.com/Hack23/cia/tree/master/.github/skills/product-quality-analysis into .agents/skills/product-quality-analysis/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "product-quality-analysis", 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 product-quality-analysis -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install Hack23/cia product-quality-analysis --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/product-quality-analysis .cursor/skills/product-quality-analysis && 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 "product-quality-analysis" agent skill from https://github.com/Hack23/cia/tree/master/.github/skills/product-quality-analysis into .cursor/skills/product-quality-analysis/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "product-quality-analysis", 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/product-quality-analysis--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 product-quality-analysis -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install Hack23/cia product-quality-analysis --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/product-quality-analysis .gemini/skills/product-quality-analysis && 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 "product-quality-analysis" agent skill from https://github.com/Hack23/cia/tree/master/.github/skills/product-quality-analysis into .gemini/skills/product-quality-analysis/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "product-quality-analysis", 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 product-quality-analysisInstalls 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 product-quality-analysis -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/product-quality-analysis .github/skills/product-quality-analysis && 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 "product-quality-analysis" agent skill from https://github.com/Hack23/cia/tree/master/.github/skills/product-quality-analysis into .github/skills/product-quality-analysis/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "product-quality-analysis", 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 product-quality-analysis -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 product-quality-analysis --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/product-quality-analysis .opencode/skills/product-quality-analysis && 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 "product-quality-analysis" agent skill from https://github.com/Hack23/cia/tree/master/.github/skills/product-quality-analysis into .opencode/skills/product-quality-analysis/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "product-quality-analysis", 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.
product-quality-analysisProduct quality metrics, SonarCloud analysis, technical debt management, code quality gates
Product Quality Analysis is an agent skill from Hack23/cia. Product quality metrics, SonarCloud analysis, technical debt management, code quality gates
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 Development, covering Technical debt, Code quality and Quality gates. 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 and xml).
From the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
docs.sonarcloud.iojacoco.orgoreilly.comgithub.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.
Product Quality Analysis loads about 1.9k tokens when it runs. Until then it costs about 29 tokens; SKILL.md has 279 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). 279 words, ~1,851 tokens.
.claude/skills/product-quality-analysis/SKILL.md (or your agent's skills folder).This skill provides guidance for measuring, monitoring, and improving product quality in the CIA platform using SonarCloud analysis, code quality gates, technical debt management, and quality metrics. It ensures the political intelligence platform maintains high reliability and maintainability.
Apply this skill when:
Do NOT use for:
Quality Gate: CIA Platform Standard
│
├─ NEW CODE (changes since last version)
│ ├─ Coverage ≥ 80% on new code
│ ├─ Duplicated lines ≤ 3%
│ ├─ Maintainability rating = A
│ ├─ Reliability rating = A
│ ├─ Security rating = A
│ ├─ Security hotspots reviewed = 100%
│ └─ No new blocker or critical issues
│
└─ OVERALL CODE
├─ Coverage ≥ 70% (target: 80%)
├─ Duplicated lines ≤ 5%
├─ Technical debt ratio ≤ 5%
├─ Maintainability rating ≥ B
├─ Reliability rating ≥ B
└─ Security rating ≥ BPull Request Quality Check
│
├─→ SonarCloud analysis passes?
│ ├─ YES → Continue
│ └─ NO → Block merge, fix issues
│
├─→ Code coverage meets threshold?
│ ├─ YES → Continue
│ └─ NO → Add missing tests
│
├─→ No new critical/blocker issues?
│ ├─ YES → Continue
│ └─ NO → Fix before merge
│
├─→ Security hotspots reviewed?
│ ├─ YES → Continue
│ └─ NO → Review and classify
│
└─→ Approve PR for merge| Metric | Description | Target | Action if Below |
|---|---|---|---|
| Bugs | Reliability issues | 0 new | Fix before merge |
| Vulnerabilities | Security flaws | 0 new | Fix immediately |
| Code smells | Maintainability issues | A rating | Refactor in sprint |
| Coverage | Test coverage % | ≥ 80% new | Add unit tests |
| Duplications | Copy-paste code % | ≤ 3% new | Extract shared code |
| Complexity | Cyclomatic complexity | < 10/method | Decompose methods |
| Cognitive complexity | Readability measure | < 15/method | Simplify logic |
| Technical debt | Effort to fix issues | < 5% ratio | Plan debt sprints |
SonarCloud Rating Scale:
A = 0 issues (excellent)
B = at least 1 minor issue
C = at least 1 major issue
D = at least 1 critical issue
E = at least 1 blocker issue
CIA Platform Minimum: B for overall, A for new codeTechnical Debt Categories
│
├─ DESIGN DEBT
│ ├─ Circular dependencies between modules
│ ├─ Missing abstraction layers
│ └─ Tight coupling between services
│
├─ CODE DEBT
│ ├─ Duplicated code across modules
│ ├─ Complex methods (high cyclomatic complexity)
│ ├─ Missing or outdated documentation
│ └─ Inconsistent naming conventions
│
├─ TEST DEBT
│ ├─ Missing unit tests for critical paths
│ ├─ Flaky integration tests
│ ├─ No E2E tests for user flows
│ └─ Low branch coverage in complex logic
│
└─ DEPENDENCY DEBT
├─ Outdated library versions
├─ Unused dependencies in POMs
├─ Known vulnerability in dependencies
└─ License compatibility issues| Impact | Effort: Low | Effort: Medium | Effort: High |
|---|---|---|---|
| High | Fix immediately | Plan for next sprint | Schedule dedicated sprint |
| Medium | Fix during feature work | Add to backlog | Evaluate ROI |
| Low | Boy scout rule | Track in backlog | Defer |
// ✅ Boy Scout Rule: Leave code cleaner than you found it
// When modifying a method, also:
// - Add missing tests
// - Fix adjacent code smells
// - Update outdated JavaDoc
// - Remove unused imports
// ✅ Extract Method for complex logic
// BEFORE: Method with cyclomatic complexity > 10
public String analyzeVotingPattern(List<Vote> votes) {
// 50+ lines of complex logic
}
// AFTER: Decomposed into focused methods
public String analyzeVotingPattern(List<Vote> votes) {
VoteStatistics stats = calculateStatistics(votes);
String trend = identifyTrend(stats);
return formatAnalysis(stats, trend);
}CIA Platform Module Quality Targets:
│
├─ model.* modules
│ ├─ Coverage: ≥ 70% (generated code excluded)
│ ├─ Complexity: Low (POJOs, entities)
│ └─ Focus: Correct JPA annotations, equals/hashCode
│
├─ service.* modules
│ ├─ Coverage: ≥ 85% (business logic)
│ ├─ Complexity: Medium (application logic)
│ └─ Focus: Transaction boundaries, error handling
│
├─ web-widgets module
│ ├─ Coverage: ≥ 75% (UI logic)
│ ├─ Complexity: Medium (view logic)
│ └─ Focus: Accessibility, responsive design
│
└─ citizen-intelligence-agency module
├─ Coverage: ≥ 80% (integration)
├─ Complexity: Low (configuration, wiring)
└─ Focus: Security configuration, startup<!-- JaCoCo coverage enforcement -->
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<configuration>
<rules>
<rule>
<element>BUNDLE</element>
<limits>
<limit>
<counter>LINE</counter>
<value>COVEREDRATIO</value>
<minimum>0.80</minimum>
</limit>
<limit>
<counter>BRANCH</counter>
<value>COVEREDRATIO</value>
<minimum>0.70</minimum>
</limit>
</limits>
</rule>
</rules>
</configuration>
</plugin>Code Quality Review:
□ SonarCloud quality gate passes
□ No new bugs or vulnerabilities
□ Code coverage ≥ 80% on new code
□ No duplicated blocks > 10 lines
□ Cyclomatic complexity < 10 per method
□ Cognitive complexity < 15 per method
□ JavaDoc on public APIs
□ Consistent naming conventions
□ No TODO/FIXME without linked issueRelease Quality Assessment:
□ Overall coverage trending upward
□ Technical debt ratio ≤ 5%
□ Zero blocker or critical issues
□ All security hotspots reviewed
□ Dependency updates applied
□ Performance regression tests pass
□ E2E test suite passes© 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/product-quality-analysis of Hack23/cia.
Open the folder on GitHubat commit 6a9797b
Product Quality Analysis 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 |
|---|---|---|---|---|---|---|
| Product Quality Analysis this skillHack23/cia | 239 | — | ~1.9k | Automated safety check: Pass | Apache-2.0 | |
| Systematic Code Refactoringluongnv89/claude-howto | 42k | — | ~3k | Automated safety check: Pass | MIT | |
| Constraint-Driven Developmentaddyosmani/agent-skills | 102k | 2 repos | ~5.2k | Automated safety check: Pass | MIT | |
| Code Refactoring Workflowluongnv89/claude-howto | 42k | — | ~3.1k | Automated safety check: Pass | MIT | |
| Tech Debt Analyzerailabs-393/ai-labs-claude-skills | 454 | 2 repos | ~3.9k | Automated safety check: Pass | MIT | |
| FIXME Resolvertailcallhq/forgecode | 7.6k | — | ~1.1k | Automated safety check: Pass | Apache-2.0 |
luongnv89/claude-howto
Guides refactoring in phases based on Martin Fowler's method: research, test coverage check, planning and small tested steps, with your approval at each phase.
addyosmani/agent-skills
Records a project's quality bar in CONSTRAINTS.md and watches diffs for signs an agent quietly weakened it, such as suppressions, skipped tests or lowered thresholds.
luongnv89/claude-howto
Guides systematic, test-backed refactoring in the style of Martin Fowler, moving through research, planning and small incremental changes with your approval at each phase.
ailabs-393/ai-labs-claude-skills
This skill should be used when analyzing technical debt in a codebase, documenting code quality issues, creating technical debt registers, or assessing code maintainability.
tailcallhq/forgecode
Finds every FIXME comment in a codebase, groups related ones across files into one task, implements the work they describe and removes the comments once it is done.
Git-on-my-level/codex-autorunner
Codebase health scanner and technical debt tracker. An agent skill from Git-on-my-level/codex-autorunner.
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
Categories
Product quality metrics, SonarCloud analysis, technical debt management, code quality gates. Product Quality Analysis is an agent skill from Hack23/cia.
Product Quality Analysis fits situations like: tasks that involve Technical debt; tasks that involve Code quality; tasks that involve Quality gates.
Run `npx skills add Hack23/cia --skill product-quality-analysis -a claude-code`. Or copy the skill folder (.github/skills/product-quality-analysis in Hack23/cia) into .claude/skills/product-quality-analysis in your project. Claude Code loads it when a task matches its description.
Run `npx skills add Hack23/cia --skill product-quality-analysis -a codex`. Or copy the skill folder (.github/skills/product-quality-analysis in Hack23/cia) into .agents/skills/product-quality-analysis 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 product-quality-analysis -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/product-quality-analysis, .gemini/skills/product-quality-analysis, .github/skills/product-quality-analysis and .opencode/skills/product-quality-analysis in your project.
SKILL.md names no scripts, command-line tools or credentials: Product Quality Analysis is instructions for the agent only.
SKILL.md names 4 domains. As links in the text: docs.sonarcloud.io, jacoco.org, oreilly.com and github.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.
Product Quality Analysis 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.4k 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 Product Quality Analysis: Systematic Code Refactoring (luongnv89/claude-howto, 42k stars), Constraint-Driven Development (addyosmani/agent-skills, 102k stars), Code Refactoring Workflow (luongnv89/claude-howto, 42k stars) and Tech Debt Analyzer (ailabs-393/ai-labs-claude-skills, 454 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.