Skip to content
Back to skills

Find First Non Repeating Character With Case Preservation

ASecurity

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.

  • 581 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added May 30, 2026
educationpythongo

Security analysis

A100/100

Scanned May 30, 2026

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

Installs into .claude/skills of the current project.

Are you the author of Find First Non Repeating Character With Case Preservation?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Find First Non Repeating Character With Case Preservation
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ecnu-icalk-find-first-non-repeating-character-with-case-prese/badge)](https://www.skillsdirectory.com/skills/ecnu-icalk-find-first-non-repeating-character-with-case-prese)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
id: "b0a6fceb-f193-4dc1-b738-5136461ed67c"
name: "Find first non-repeating character with case preservation"
description: "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."
version: "0.1.0"
tags:
  - "python"
  - "string"
  - "algorithm"
  - "case-sensitivity"
  - "coding"
triggers:
  - "find first non-repeating character"
  - "first unique character in string"
  - "case insensitive count case sensitive return"
  - "function named first python"
---

# 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

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.