raydac/netbeans-mmd-plugin/mmd-annotations
Claude Code and agent skill by raydac/netbeans-mmd-plugin
- community
Checking that the SKILL.md file is still in the repository.
Mark Java sources with Scia Reto MMD annotations (@MmdFile, @MmdTopic, @MmdFileRef, @HasMmdMarkedElements) so the annotation processor generates mind maps. Always attach mind-map-annotations and the processor to the user's project and audit compiler options before marking. Use when the user asks to annotate a project for mind maps, generate .mmd from Java, document architecture as maps for agents, or runs /mmd-annotations:setup or /mmd-annotations:mark.
Install
npx vskill@latest install raydac/netbeans-mmd-plugin/mmd-annotationsSKILL.md
MMD Java annotations
Mark Java so mind-map-annotation-processor generates .mmd maps. Do not freehand-write those maps. After compile, use the `mmd` skill only if you need to parse or check the generated file.
This folder is self-contained: SKILL.md, reference.md, examples.md, commands/. Copy the whole folder.
Package: com.igormaznitsa.mindmap.annotations. Module: com.igormaznitsa.mmd.annotations. Retention is SOURCE — no runtime cost. Java 11+.
When to mark
Build maps that a later agent can read as an index of the system, not a dump of every identifier.
Mark:
- Public types that own a boundary (entry point, service, model root, SPI)
- Methods that encode a policy, lifecycle step, or collaboration
- Fields that are the actual stored state of that type
- Cross-links (
uid/jumpTo) where control or data jumps between types
Do not mark:
- Getters, setters, trivial constructors, equals/hashCode/toString
- Generated sources, tests (unless the map is about test strategy)
- Every local variable — only the rare step that is otherwise invisible
Titles are roles. Notes are why / invariant / gotcha. anchor stays true (default) so generated topics keep a file:line extra back to the source.
Workflow
Do not edit Java sources until Project setup below has passed for every module you will mark. Marks without a wired processor never become maps.
- Read this file. Open reference.md for attributes, processor options, and the build-audit table. Open examples.md for copy-paste shapes.
- Scope: files or modules the user named. If none, ask. Do not annotate the whole tree “just in case”.
- Project setup (mandatory). Attach artifacts and audit compiler options. Fix gaps. See below.
- Choose one `@MmdFile` per map (one bounded context / module). Give it a stable
uidand afileName. Pointfolderor-Ammd.target.folderat a docs folder when generated maps must not sit next to.java. - Annotate types and members. Every topic must resolve to exactly one file (
@MmdFileon the type,@MmdFileRef, orfileUid). Ambiguous files fail the compile. - Compile so the processor writes maps. Fix processor errors; do not invent
.mmdby hand. - If the user wants a sanity check, parse the generated
.mmdwith themmdskill. Commit generated maps only when the user wants them in git (they are regenerated on each compile; overwrite defaults to true).
Project setup (mandatory)
Minimum before any `@Mmd*` on user sources: every module you will mark must compile against mind-map-annotations, and its Java compile must run mind-map-annotation-processor. Then check that compiler options actually let the processor write maps.
Tell the user what you found and what you changed. Do not skip a failing check.
1. Attach artifacts
For each module in scope (Maven pom.xml, Gradle build.gradle / .kts, or javac/build.xml):
| Artifact | How it must be attached | |
|---|---|---|
com.igormaznitsa:mind-map-annotations | Compile classpath, `provided` / `compileOnly`. Needed to import @MmdFile / @MmdTopic. Never runtime / shipped in the app. | |
com.igormaznitsa:mind-map-annotation-processor | Annotation-processor path only (annotationProcessorPaths or Gradle annotationProcessor). Do not put it on the app runtime classpath. |
Version: reuse the version already in the project. This repository uses the parent mind-map version (project.version). Otherwise pick one published com.igormaznitsa pair and keep annotations + processor the same version. This skill matches 1.8.0: both jars need a Java 11+ compiler, and they are named modules. Do not pair it with 1.7.x jars (those are Java 8 and have no module name).
If the module already depends on mind-map-annotations (this repo’s own modules may), keep that; still add or confirm the processor path. Do not enable the processor on mind-map-annotations, mind-map-annotation-processor, or any module that sets -proc:none on purpose.
If wiring is missing, add it. Do not only mention it in chat.
2. Audit compiler options
Read the effective compile config (module POM plus parent pluginManagement, Gradle compileJava, IDEA annotation-processing panel if that is how they build). Check every row:
| Check | Fail if | Fix | |
|---|---|---|---|
| Processing is on | -proc:none, options.compilerArgs contains -proc:none, Gradle options.annotationProcessorPath empty while processing is disabled, IDE “Enable annotation processing” off for the module they compile in | Remove -proc:none from this module (do not strip it from the processor/annotations modules themselves). Turn processing on. | |
| JDK 23+ | Compiler is 23 or newer and the processor is only on the compile classpath. Those JDKs skip classpath processors. | Keep the processor on the processor path (annotationProcessorPaths, Gradle annotationProcessor, or -processorpath). Use Maven <proc>full</proc> or javac -proc:full only when it must stay on the classpath. | |
| Named module | The marked sources have module-info.java and it does not requires com.igormaznitsa.mmd.annotations | Add that requires. The package stays com.igormaznitsa.mindmap.annotations. Do not requires the processor module. | |
| Processor is selected | Maven annotationProcessorPaths is set but does not list mind-map-annotation-processor (Maven then ignores processors on the compile classpath) | Add the processor path entry, or drop the empty/other-only annotationProcessorPaths and use a dedicated path that includes this processor. | |
| Processor is not on the app classpath | Processor listed as a normal compile/implementation dependency of a shipped module | Move it to processor path; keep annotations provided/compileOnly. | |
| Versions match | Annotations and processor versions differ | Align both. | |
| FILE extras are portable | Anchors stay default true but -Ammd.file.link.base.folder is unset | Set it to the module or project root (${project.basedir} / project.projectDir). | |
| Output folder can be created | -Ammd.target.folder (or @MmdFile.folder outside the source tree) points at a missing dir and -Ammd.folder.create is not true | Add -Ammd.folder.create=true or create the directory. | |
| Comment marks | Sources will use //@MmdTopic but -Ammd.comment.scan is not true | Add -Ammd.comment.scan=true. | |
| Headless PNG/SVG | -Ammd.target.format includes PNG or SVG on CI without -J-Djava.awt.headless=true | Add the JVM flag, or keep format MMD (default). | |
| Write root | Generated path would fall outside -Ammd.file.root.folder / the link-base folder | Point folder / mmd.target.folder inside that root, or widen the option. | |
mmd.dry.start | Set to true | Turn it off unless the user asked for a dry run. |
Default format is MMD. Do not add extra export formats unless the user asked.
Full option list and Maven/Gradle snippets: reference.md.
3. Confirm, then mark
Compile the wired module once after setup (even before new marks). A missing artifact or -proc:none must fail here, not after a pile of annotations.
Then continue the workflow from choosing @MmdFile.
Annotation map
| Annotation | Role | |
|---|---|---|
@MmdFile | Declares an output map on a type. Repeatable as @MmdFiles. | |
@MmdFileRef | Points a type/member at an existing @MmdFile (uid wins over target). | |
@MmdTopic | One topic. Empty title → element simple name. Repeatable as @MmdTopics. | |
@HasMmdMarkedElements | On a method or constructor: also harvest inner @MmdTopic (locals) and, if mmd.comment.scan=true, //@MmdTopic comments. |
@MmdFile / @MmdFiles only on types. @MmdTopic may sit on types, fields, methods, constructors, parameters, locals, packages. @MmdFileRef is not valid on locals.
Defaults that matter
- Output folder: the annotated class’s source folder (
${mmd.src.class.folder}), unlessfolderor-Ammd.target.folderis set. - Output name:
fileName, else the.javafile name without extension. anchor=true: FILE extra = source path + line (needs-Ammd.file.link.base.folderfor portable relative links).fileLinkoverridesanchor.path = {"a","b"}: create/find those ancestors (UID match first, else title). Root topicpathmust be empty.jumpTo: UID of another topic, or its title if no UID matches.order: sibling sort; default-1.substitute=true: replace${name}from JVM system properties, then processor options. Unknown names fail the compile.folderalso understands${mmd.src.class.folder}withoutsubstitute.
File targeting
A topic belongs to a file if, in order:
@MmdTopic(fileUid=…)matches a@MmdFile(uid=…)(or that file’sfileName/ source base name).- Else a
@MmdFileRef/ enclosing@MmdTopic(fileUid)on the type. - Else a single
@MmdFilefound on the type or its ancestors.
If several @MmdFile sit on the same type and the topic has no fileUid, processing fails. Always set fileUid when a type declares more than one map.
In-method marks
Comment marks are harvested only when both @HasMmdMarkedElements and -Ammd.comment.scan=true are set. Only // comments; not inside strings or block comments. Case-insensitive @MmdTopic. See reference.md.
A method without @HasMmdMarkedElements ignores inner locals and comments (the method’s own @MmdTopic still counts).
Maven / Gradle snippets
See reference.md (Maven) and Gradle. Minimum compiler args:
Reference wiring in this repository: mind-map/mind-map-annotation-processor-it/pom.xml.
Agent map style
- One map per story. Depth via
path, not a flat list of class names. - Stable
uidon anything youjumpTolater. Do not jump to a title that will be renamed. - Short
note(contract, thread rule, “do not call from EDT”). Multi-line is allowed. - Small color set if you color at all (
MmdColor). Skip emoticons unless they carry meaning; ids areMmdEmoticonnames. direction = LEFTonly for first-level “other side of the root” groups.collapse = trueon implementation subtrees that agents should open only when needed.
Commands
After this folder is installed as a Cursor skill:
| Command | Does | |
|---|---|---|
/mmd-annotations:setup | Attach artifacts and audit compiler options. No source marks. | |
/mmd-annotations:mark | Setup gate, then mark Java and compile so maps are generated. |
Other agents: name the command or paste commands/<name>.md. Extra words after the command are the module/path scope.
Generated .mmd files are then ordinary maps: use `mmd` (/mmd:read, /mmd:validate).
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/mmd-annotations/SKILL.md
Popularity
- Repository stars
- 405
- Repository forks
- 44
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/raydac/netbeans-mmd-plugin/mmd-annotations)