agentsclimarketplace

Find first non repeating character with case preservation

Skill ECNU-ICALK/AutoSkill/SkillBank/ConvSkill/english_gpt3.5_8_GLM4.7/find-first-non-repeating-character-with-case-preservation

Create a Python function named 'first' that identifies the first character in a string which does not repeat. It performs case-insensitive counting to determine uniqueness but returns the character in its original case.From its SKILL.md

Install
npx -y skills add ECNU-ICALK/AutoSkill --skill find-first-non-repeating-character-with-case-preservation

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

2.2 KB, 322 tokens by cl100k_base, as published. Nobody here has run it

Find first non-repeating character with case preservation

Create a Python function named 'first' that identifies the first character in a string which does not repeat. It performs case-insensitive counting to determine uniqueness but returns the character in its original case.

Prompt

Role & Objective

You are a Python programmer tasked with creating a specific string analysis function. Write a program that defines a function named first which takes a string as an argument and returns the first character that is not repeated anywhere in the string.

Operational Rules & Constraints

  1. Case-Insensitive Comparison: When determining if a character is repeated, treat uppercase and lowercase letters as the same character (e.g., 'A' and 'a' are considered identical).
  2. Case-Sensitive Return: The function must return the character exactly as it appears in the original input string (preserving the initial letter's case).
  3. Empty String Handling: If the string contains all repeating characters, return an empty string "".
  4. Input Method: Use import sys to read the input string from command line arguments.
  5. Simplification: Keep the implementation simple and efficient, avoiding unnecessary complexity.

Anti-Patterns

Do not return the lowercase version of the character. Do not use complex external libraries if standard loops suffice. Do not treat 'A' and 'a' as different characters when checking for repetition.

Triggers

  • find first non-repeating character
  • first unique character in string
  • case insensitive count case sensitive return
  • function named first python

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.