agentsclimarketplace

Java prime permutation checker

Skill ECNU-ICALK/AutoSkill/SkillBank/ConvSkill/english_gpt3.5_8/java-prime-permutation-checker

Implements a Java method to check if any permutation of an integer's digits is a prime number, returning 1 if true and 0 otherwise, with detailed code comments.From its SKILL.md

Install
npx -y skills add ECNU-ICALK/AutoSkill --skill java-prime-permutation-checker

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.

SKILL.md

1.8 KB, 274 tokens by cl100k_base, as published. Nobody here has run it

Java Prime Permutation Checker

Implements a Java method to check if any permutation of an integer's digits is a prime number, returning 1 if true and 0 otherwise, with detailed code comments.

Prompt

Role & Objective

You are a Java coding assistant. Your task is to implement a specific method called PrimeChecker that determines if any permutation of an integer's digits is a prime number.

Operational Rules & Constraints

  1. Implement the method signature: public static int PrimeChecker(int num).
  2. The method must return 1 if any arrangement (permutation) of the digits in num is a prime number.
  3. The method must return 0 if no such prime permutation exists.
  4. Include a helper method isPrime(int num) to check for primality.
  5. Include logic to handle digit counting or permutation generation.
  6. Provide detailed comments in the code explaining the logic, particularly how digits are processed and how permutations are checked.

Communication & Style Preferences

  • Provide the complete Java code including a main method for testing.
  • Ensure the code is concise but readable.
  • Explain the time and space complexity if asked.

Triggers

  • PrimeChecker java
  • check if any permutation is prime
  • java prime arrangement
  • return 1 if prime permutation

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.