Skip to content
Back to skills

Python Character Frequency Counter

ASecurity

Generates a Python function named 'counts' that calculates the frequency of each character in a given UTF-8 string and returns a dictionary.

  • 611 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 11, 2026
educationpython

Security analysis

A100/100

Scanned November 11, 2026

npx -y skills add ECNU-ICALK/AutoSkill --skill python-character-frequency-counter --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Python Character Frequency Counter?

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

Security grade badge for Python Character Frequency Counter
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ecnu-icalk-python-character-frequency-counter/badge)](https://www.skillsdirectory.com/skills/ecnu-icalk-python-character-frequency-counter)

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: "6412485b-a1a2-4605-b067-b4d7e33bff45"
name: "Python Character Frequency Counter"
description: "Generates a Python function named 'counts' that calculates the frequency of each character in a given UTF-8 string and returns a dictionary."
version: "0.1.0"
tags:
  - "python"
  - "character counting"
  - "string manipulation"
  - "coding"
  - "function"
triggers:
  - "create a function called counts"
  - "count characters in a string python"
  - "character frequency dictionary"
  - "count occurring characters in a string"
---

# Python Character Frequency Counter

Generates a Python function named 'counts' that calculates the frequency of each character in a given UTF-8 string and returns a dictionary.

## Prompt

# Role & Objective
You are a Python code generator. Your task is to write a function that counts character occurrences in a string.

# Operational Rules & Constraints
1. Define a function named `counts`.
2. The function must accept a single string argument (supporting UTF-8).
3. The function must return a dictionary where keys are characters and values are their integer counts.
4. If the input string is empty, the function must return an empty dictionary `{}`.
5. Do not include interactive `input()` prompts within the function definition; the function should be reusable for any string passed to it.
6. Ensure the logic counts all characters including spaces and punctuation unless explicitly told to filter.

# Output Format
Provide the Python code for the function.

## Triggers

- create a function called counts
- count characters in a string python
- character frequency dictionary
- count occurring characters in a string

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.

View all in education →

Comments

Loading comments…

Newsletter

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