From devolens
Work on the Cryptolens Java SDK and Java-specific software licensing integrations. Use when Codex needs to inspect, modify, review, test, or explain the `Cryptolens/cryptolens-java` repository, especially license key verification, key activation, get-key flows, offline license verification, offline license strings, floating licenses, trial licenses, machine binding, node-locking, user-verification integrations, license-server routing, data objects, analytics events, Maven packaging, or migration away from deprecated `io.cryptolens.legacy.*` classes.
How this skill is triggered — by the user, by Claude, or both
Slash command
/devolens:cryptolens-javaThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Use this skill for work in the Cryptolens Java SDK repository: [github.com/Cryptolens/cryptolens-java](https://github.com/Cryptolens/cryptolens-java).
Use this skill for work in the Cryptolens Java SDK repository: github.com/Cryptolens/cryptolens-java.
Treat GitHub as the primary source of truth. If a local checkout is also available, use it as a convenience for editing and validation, but do not assume cryptolens-java/ exists on disk.
Treat src/main/java/io/cryptolens/methods and src/main/java/io/cryptolens/models as the supported API surface. Treat src/main/java/io/cryptolens/legacy as compatibility-only code: io.cryptolens.legacy.Cryptolens is explicitly @Deprecated, and new code should not import or extend anything from that package unless the task is specifically about backward compatibility.
Before adding or explaining machine-binding checks, read the shared rule in licensing-invariants.md.
Before adding or explaining floating licensing, read the shared rule in floating-licenses.md.
Before recommending offline caching or local license files, read offline-fallback.md.
If an API call returns a populated APIError.message, read the shared error table in api-error-messages.md before diagnosing the issue.
Before writing examples, troubleshooting steps, or support guidance for product workflows, read official-workflows.md so the generated guidance matches the official Cryptolens docs, not just the repository README.
Start with official-workflows.md, then repo-map.md, then java-workflows.md for current Java-specific guidance and machine-code/version choices.
Open methods/Key.java, methods/Helpers.java, models/ActivateModel.java, models/GetKeyModel.java, models/DeactivateModel.java, and models/LicenseKey.java.
Preserve these invariants unless the task explicitly changes them:
Key.Activate(...) and Key.GetKey(...) force signed responses and return null on failure while populating APIError.LicenseKey.LoadFromString(...) verifies the RSA signature before returning a license object.LicenseKey.SaveAsString() / LicenseKey.LoadFromString(...) are the supported offline-license serialization path.Helpers.IsOnRightMachine(...) is only a meaningful validity gate when the license actually tracks machines. If MaxNoOfMachines == 0, machine-binding is not active and the check should not be presented as a general validity test.Key.Activate, Helpers.GetMachineCode, and fields such as LicenseServerUrl are public API and should not be renamed casually.When writing sample code, wrappers, or integration snippets:
io.cryptolens.legacy.*.io.cryptolens.methods.* plus io.cryptolens.models.*.3349 or other sample product ids from docs. Make product id, token, RSA public key, and license key configurable or clearly labeled placeholders.APIError error = new APIError(); and surfacing error.message in examples that are intended for troubleshooting.Open methods/Helpers.java, src/test/java/io/cryptolens/HelpersTest.java, and the current README/example app before changing platform guidance.
Use these rules:
io.cryptolens.legacy.MachineCodeComputer and any other io.cryptolens.legacy.* helper as obsolete for new code.Helpers.GetMachineCode() is the original default fingerprint path.Helpers.GetMachineCode(2) is the UUID-based Windows compatibility path used by existing docs and tests when callers want .NET/Python-aligned matching or fewer optional runtime dependencies.Helpers.GetMachineCode(3) is the newer multi-OS desktop path implemented in the current source. If you move examples or docs to v=3, update platform notes and tests in the same change instead of mixing recommendations.Helpers.IsOnRightMachine(license, machineCode, ...).isFloatingLicense / allowOverdraft flags to IsOnRightMachine(...), and default overdraft to zero unless the user explicitly wants it.Use the method classes in src/main/java/io/cryptolens/methods/:
Data.java for data objects on keys and machine codes.AI.java for RegisterEvent.Message.java for broadcast messages.ProductMethods.java for GetProducts.Subscription.java for metered usage recording.RequestModel.LicenseServerUrl on request models when routing through a self-hosted license server.When editing docs or examples, preserve the model-based calling convention instead of rebuilding raw HTTP requests by hand.
For analytics and event-registration guidance, follow official-workflows.md:
AI.RegisterEvent.FeatureName and either Key or MachineCode.ProductId when multiple products exist.Value and Currency for transaction-style events.Use official-workflows.md as the primary source for supported flows and product-level guidance, then use the repo README, example-app/src/Main.java, and the Java method/model classes to translate that guidance into current Java SDK usage.
The official docs currently cover:
Apply these rules when turning the docs into Java guidance:
LicenseKey.SaveAsString() and LicenseKey.LoadFromString(...), and remember that LoadFromString(...) does not validate ProductId.Key.CreateTrialKey(...) followed by normal activation, and keep the machine-binding check.If the task touches src/main/java/io/cryptolens/legacy:
Key, Helpers, and models.LicenseKey.io.cryptolens.models.LicenseKey is the supported model, while io.cryptolens.legacy.LicenseKey is compatibility-only.Use pom.xml as the source of truth for artifact metadata and dependencies.
Keep in mind:
io.cryptolens:cryptolens.gson is a runtime dependency.oshi-core is optional and only affects some machine-code helper paths.If a local checkout is available, prefer the smallest proof that matches the change:
mvn -q -DskipTests compile for API or packaging editsBe careful with the existing test suite:
KeyTest and some other tests use apikeys.json and live API calls, so they are not safe as unconditional offline validation.HelpersTest is the best starting point for machine-code and feature-helper changes.If no local checkout is available, limit the task to review, explanation, GitHub-based code changes, or documentation guidance unless a writable repository context is provided.
Read official-workflows.md for the official documentation-backed flows, caveats, and adjacent-platform notes.
Read repo-map.md for the file map and task routing.
Read java-workflows.md for Java-specific guidance, current method/class choices, and migration notes.
Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub cryptolens/skills --plugin devolens