agentleFS
DanSessionsDanSessions/security-posture-skill/CLAUDE.md

security-posture-skill

CLAUDE.md1 starsChanged 5 months agoMITView on GitHub

A standalone Claude Code skill (/security-posture) that aggregates security findings from SonarQube and Snyk into a single prioritised report. It is designed to be used across projects, not tied to any specific codebase. The skill lives in skills/security-posture/. The design spec is in docs/specs/2026-06-16-security-posture-skill-design.md and is the authoritative reference for intended behaviour. Claude Code skills are markdown files that Claude reads at invocation time. The skill file for this project goes in skills/security-posture/SKILL.md. When writing the skill file: - Prerequisites…

The file

We split this CLAUDE.md into the rules it gives an agent

3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    When writing the skill file:

    line 15
  2. Very specific:

    Only security-related quality gate conditions are shown (metricKey contains security).

    line 18
  3. Distinctive:

    After the report, the user can drill into any numbered item for full context and remediation guidance.

    line 20

≈ “Common” is an estimate: at least 1 in 5 of the 26,980 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

What This Repository Is

A standalone Claude Code skill (/security-posture) that aggregates security findings from SonarQube and Snyk into a single prioritised report. It is designed to be used across projects, not tied to any specific codebase.

The skill lives in skills/security-posture/. The design spec is in docs/specs/2026-06-16-security-posture-skill-design.md and is the authoritative reference for intended behaviour.

Skill File Conventions

Claude Code skills are markdown files that Claude reads at invocation time. The skill file for this project goes in skills/security-posture/SKILL.md.

When writing the skill file:

  • Prerequisites are checked first — if SonarQube MCP tools or Snyk CLI are unavailable, the skill stops immediately with setup instructions. No partial report.
  • The report covers findings from SonarQube (security-only quality gate conditions, security hotspots, and confirmed vulnerability issues) and Snyk (OSS dependency CVEs and container image CVEs per Docker Compose service). All findings are merged into a single prioritised action list.
  • Only security-related quality gate conditions are shown (metricKey contains security). Reliability, maintainability, coverage, and duplication are out of scope.
  • Critical and High findings are shown in full detail; Medium and Low are suppressed to a count summary.
  • After the report, the user can drill into any numbered item for full context and remediation guidance.

Tool Sources

SectionSource
Security Quality Gatemcp__sonarqube__get_project_quality_gate_status
Security Hotspotsmcp__sonarqube__search_security_hotspots
SonarQube Vulnerabilitiesgather-sonar-issues.sh + filter-sonar-vulnerabilities.py
Snyk OSS CVEsgather-snyk-oss.sh + deduplicate-snyk-oss.py + extract-snyk-recommendations.py
Snyk Containerdiscover-docker-targets.py + scan-all-container-images.py + deduplicate-container-findings.py + extract-snyk-recommendations.py

The SonarQube project key is always resolved from sonar-project.properties (sonar.projectKey) in the target project — it is never a required argument.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.