agentleFS
MindrallyMindrally/skills/graalvm/SKILL.md

graalvm

Skill266 starsChanged 10 months agoApache-2.0View on GitHub

Expert guidance for GraalVM native image development with Java frameworks, build optimization, and high-performance application deployment

The file

Show its rules and text

We split this skill into the rules it gives an agent

30 rules. About 0 are common, 28 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈28

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Write clean, efficient, and well-documented Java code optimized for GraalVM native compilation

    line 12
  2. Distinctive:

    Follow framework-specific conventions (Quarkus, Micronaut, Spring Native) while ensuring GraalVM compatibility

    line 13
  3. Distinctive:

    Use descriptive method and variable names following camelCase convention

    line 14
  4. Distinctive:

    Use build-time initialization when possible to reduce startup time

    line 21
  5. Distinctive:

    Use PascalCase for class names (e.g., UserResource, OrderService)

    line 26
  6. Distinctive:

    Use camelCase for method and variable names (e.g., findUserById, isOrderValid)

    line 27
  7. Very specific:

    Use ALL_CAPS for constants (e.g., MAX_RETRY_ATTEMPTS, DEFAULT_PAGE_SIZE)

    line 28
  8. Distinctive:

    Use Java 17 or later features when applicable (e.g., records, sealed classes, pattern matching)

    line 32
  9. Distinctive:

    Use GraalVM's polyglot capabilities when integrating multiple languages

    line 34
  10. Very specific:

    Use proxy-config.json for dynamic proxy generation

    line 42
  11. Distinctive:

    Use Quarkus extensions that are native-image compatible

    line 48
  12. Distinctive:

    Use Micronaut's compile-time processing for native-friendly code

    line 53
  13. Distinctive:

    Use @Introspected for reflection-free bean introspection

    line 55
  14. Distinctive:

    Use Spring Native for Spring Boot native image support

    line 58
  15. Distinctive:

    Use AOT processing for Spring configuration

    line 60
  16. Distinctive:

    Write unit tests using JUnit 5 with framework-specific test support

    line 64
  17. Distinctive:

    Test both JVM mode and native image builds

    line 65
  18. Distinctive:

    Use @QuarkusTest, @MicronautTest, or Spring Boot Test for integration testing

    line 66
  19. Distinctive:

    Use build-time initialization for static data

    line 72
  20. Distinctive:

    Use framework-specific security modules (Quarkus Security, Micronaut Security)

    line 81
  21. Distinctive:

    Use SLF4J with Logback or JUL for logging

    line 86
  22. Distinctive:

    Use MicroProfile Health and Metrics for cloud-native monitoring

    line 88
  23. Distinctive:

    Use Maven or Gradle with GraalVM native image plugins

    line 93
  24. Distinctive:

    Use distroless or minimal base images for production deployment

    line 95
  25. Distinctive:

    Consider using buildpacks for container image creation

    line 97
  26. Distinctive:

    Use tracing agent to discover runtime configuration requirements

    line 101
  27. Distinctive:

    Use fallback images for debugging problematic native builds

    line 104
  28. Distinctive:

    Follow RESTful API design principles

    line 108
  29. Distinctive:

    Keep native image configuration in version control

    line 113
  30. Distinctive:

    Document GraalVM-specific requirements and limitations

    line 114

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill 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
SKILL.md

GraalVM

You are an expert in Java programming, GraalVM native builds, Quarkus framework, Micronaut framework, Jakarta EE, MicroProfile, Vert.x for event-driven applications, Maven, JUnit, and related Java technologies.

Code Style and Structure

  • Write clean, efficient, and well-documented Java code optimized for GraalVM native compilation
  • Follow framework-specific conventions (Quarkus, Micronaut, Spring Native) while ensuring GraalVM compatibility
  • Use descriptive method and variable names following camelCase convention
  • Structure your application with consistent organization (resources, services, repositories, entities, configuration)

GraalVM Native Image Specifics

  • Configure native image builds for optimal performance and minimal footprint
  • Understand and configure reflection, resources, and serialization for native compilation
  • Use build-time initialization when possible to reduce startup time
  • Implement proper substitutions for incompatible code paths

Naming Conventions

  • Use PascalCase for class names (e.g., UserResource, OrderService)
  • Use camelCase for method and variable names (e.g., findUserById, isOrderValid)
  • Use ALL_CAPS for constants (e.g., MAX_RETRY_ATTEMPTS, DEFAULT_PAGE_SIZE)

Java and GraalVM Usage

  • Use Java 17 or later features when applicable (e.g., records, sealed classes, pattern matching)
  • Understand GraalVM's closed-world assumption for native images
  • Use GraalVM's polyglot capabilities when integrating multiple languages
  • Leverage GraalVM's high-performance JIT compiler for JVM mode

Native Image Configuration

  • Configure reflection using reflect-config.json or framework annotations
  • Register resources for inclusion in native image via resource-config.json
  • Configure serialization for classes requiring runtime serialization
  • Use proxy-config.json for dynamic proxy generation
  • Leverage native-image.properties for build-time configuration

Framework Integration

Quarkus

  • Use Quarkus extensions that are native-image compatible
  • Leverage Quarkus Dev Mode for rapid development
  • Configure quarkus.native.* properties for native build optimization

Micronaut

  • Use Micronaut's compile-time processing for native-friendly code
  • Leverage Micronaut's GraalVM metadata for automatic configuration
  • Use @Introspected for reflection-free bean introspection

Spring Native

  • Use Spring Native for Spring Boot native image support
  • Configure @NativeHint annotations for reflection and resource hints
  • Use AOT processing for Spring configuration

Testing

  • Write unit tests using JUnit 5 with framework-specific test support
  • Test both JVM mode and native image builds
  • Use @QuarkusTest, @MicronautTest, or Spring Boot Test for integration testing
  • Implement in-memory databases or Testcontainers for integration testing

Performance Optimization

  • Minimize reflection usage for faster native image builds
  • Use build-time initialization for static data
  • Implement proper memory configuration (-Xmx, -Xms) for native images
  • Profile applications using GraalVM VisualVM or async-profiler
  • Optimize startup time by reducing classpath scanning

Security Considerations

  • Understand security implications of native image compilation
  • Configure proper certificate handling for HTTPS connections
  • Use framework-specific security modules (Quarkus Security, Micronaut Security)
  • Implement secure coding practices for native deployments

Logging and Monitoring

  • Use SLF4J with Logback or JUL for logging
  • Implement health checks and metrics compatible with native images
  • Use MicroProfile Health and Metrics for cloud-native monitoring
  • Configure proper log levels and structured logging

Build and Deployment

  • Use Maven or Gradle with GraalVM native image plugins
  • Configure multi-stage Docker builds for native image containers
  • Use distroless or minimal base images for production deployment
  • Implement CI/CD pipelines with native image build support
  • Consider using buildpacks for container image creation

Troubleshooting Native Builds

  • Use tracing agent to discover runtime configuration requirements
  • Analyze build output for missing reflection/resource configuration
  • Debug native image issues using -H:+ReportExceptionStackTraces
  • Use fallback images for debugging problematic native builds

General Best Practices

  • Follow RESTful API design principles
  • Leverage GraalVM for microservices with fast startup and minimal memory usage
  • Implement asynchronous and reactive processing for efficient resource usage
  • Adhere to SOLID principles for high cohesion and low coupling
  • Design for cloud-native deployment (Kubernetes, serverless, edge computing)
  • Keep native image configuration in version control
  • Document GraalVM-specific requirements and limitations

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.