Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add alexmond/alexmskills --skill pmdgit clone --depth 1 https://github.com/alexmond/alexmskillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/alexmond/alexmskills/pmd)<a href="https://agentmods.dev/skills/alexmond/alexmskills/pmd"><img src="https://agentmods.dev/badge/skills/alexmond/alexmskills/pmd.svg" alt="Measured on agentmods" height="20"></a>- NVIDIA SkillSpector warn
SkillSpector: 2 findings, up to high
These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →
- high YARA Match · line 3 YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).Fix: Remove offensive tool references and exploit code. Legitimate agent skills should not contain penetration testing tools, exploit frameworks, or reconnaissance utilities.
- high Prompt Injection · line 152 Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.Fix: Audit all comments and invisible characters. Remove any instructions that direct the agent to perform unauthorized actions. Use plain, reviewable content.
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00110 | $0.02782 |
| Opus 5 | $0.00055 | $0.01391 |
| Sonnet 5 | $0.00022 | $0.00556 |
| Haiku 4.5 | $0.00011 | $0.00278 |
Grade A, and why
pmd scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 251 lines — stays where its author put it; the contents beside it link to each section on GitHub.
PMD static analysis for Maven/Java
Try it:
/maven-quality:pmd payment-service— or say "what's PMD complaining about?".
PMD finds defects and design smells, which is a different job from formatting.
Keep it distinct from the codestyle skill: spring-javaformat and Checkstyle
decide how code should look, PMD decides whether it is likely wrong.
Defaults below target a project with maven-pmd-plugin bound to validate,
producing target/pmd.xml. Adjust module names, phases, and paths to match.
Adjusting for your project
- Maven invocation: examples use the wrapper
./mvnw. Without one, substitute yourmvnbinary. - Multi-module: scope with
-pl <module>; each module writes its owntarget/pmd.xml. $ARGUMENTS(when present) is either a module name (Steps 1–3) or a rule name to explain and suppress (Step 6).
Step 1: Run it
./mvnw pmd:check -q # whole project, fails on violation
./mvnw pmd:check -pl $ARGUMENTS -q # one module
./mvnw pmd:pmd -q # report only, never fails the build
pmd:check re-runs the analysis, so there is no need to run pmd:pmd first.
When the build is already wired to validate, ./mvnw validate does the same.
Step 2: Read the report, not the console
The console output truncates and reorders. target/pmd.xml is the whole truth.
The namespace is the trap. The report is namespaced
(http://pmd.sourceforge.net/report/2.0.0), so a plain findall("file")
silently returns nothing and the report looks clean. Match on local names
instead — that also survives PMD changing the namespace between majors:
Stdlib ElementTree is deliberate — these skills add no dependencies. It refuses
external entities outright, so XXE does not apply; it is susceptible to entity-
expansion blowup, which is irrelevant for a file your own build just wrote. If you
ever point this at a report from an untrusted source, use defusedxml instead.
import xml.etree.ElementTree as ET, sys, collections, pathlib
def local(el): # '{ns}violation' -> 'violation'
return el.tag.rsplit('}', 1)[-1]
rows = []
for report in pathlib.Path('.').glob('**/target/pmd.xml'):
for f in ET.parse(report).getroot():
if local(f) != 'file':
continue
name = f.get('name', '').split('/src/main/java/')[-1]
for v in f:
if local(v) != 'violation':
continue
rows.append((int(v.get('priority', 5)), v.get('rule'),
v.get('ruleset'), name, v.get('beginline'),
' '.join((v.text or '').split())))
if not rows:
print(' no violations'); sys.exit()
print(f' {len(rows)} violations\n')
for rule, n in collections.Counter(r[1] for r in rows).most_common():
pri = min(r[0] for r in rows if r[1] == rule)
print(f' p{pri} {n:>4} {rule}')
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 8d ago First seen · 251 lines · 110 tokens per session scan A 21e8858d55c1
pmd is a skill published in the GitHub repository alexmond/alexmskills (6 stars, last pushed today), licensed MIT. It adds 110 tokens to every session and 2,782 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
manage-skills
A maintenance workflow for checking whether project verification skills still cover the code and rules that changed during a session.
performance-smell-detection
Detect potential code-level performance smells in Java - streams, collections, boxing, regex, object creation. Provides awareness, not absolutes - always measure before optimizing. For JPA/database performance, use jpa-patterns instead.
systematic-debugging
Structured debugging methodology — use before proposing fixes for any error or failure. Covers: code bugs, build errors, deploy failures, config conflicts, dependency issues, infra problems. Also use when previous fix attempts failed or root cause is unclear.
review-loop
Run the adversarial verification loop — implement, then hand the change to a fresh checker that did not write it, fix what it finds, and re-dispatch until APPROVE. Use before claiming any behavioural change is done, and on requests like "review loop", "adversarial review", "independent review", "get this verified"…
python-memory-safe-scripts
Memory-safe Python script patterns for long-running processes under systemd MemoryMax constraints. Covers allocator purge (mimalloc/glibc malloctrim), HTTP response lifecycle, DataFrame cleanup, thread-local connection reuse, and periodic GC cadence. Battle-tested through 5 OOM optimization cycles on production GPU…
spring-cloud-openfeign
Declarative HTTP client for microservices communication with Spring Cloud OpenFeign. Covers @FeignClient, error handling, interceptors, and circuit breaker integration. USE WHEN: user mentions "feign", "openfeign", "@FeignClient", "declarative HTTP client", "service-to-service communication", "microservices client" DO…