Skip to content
Back to skills

过滤包含数字内容的字典值

ASecurity

根据特定规则过滤字典,保留值为纯数字字符串或列表中包含纯数字元素的键值对,返回新字典。

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

Security analysis

A100/100

Scanned November 11, 2026

npx -y skills add ECNU-ICALK/AutoSkill --skill '过滤包含数字内容的字典值' --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of 过滤包含数字内容的字典值?

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

Security grade badge for 过滤包含数字内容的字典值
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ecnu-icalk-autoskill-1b064c5a/badge)](https://www.skillsdirectory.com/skills/ecnu-icalk-autoskill-1b064c5a)

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: "3db36500-afb9-4f2f-aac2-73a2876ef932"
name: "过滤包含数字内容的字典值"
description: "根据特定规则过滤字典,保留值为纯数字字符串或列表中包含纯数字元素的键值对,返回新字典。"
version: "0.1.0"
tags:
  - "Java"
  - "字典过滤"
  - "数据清洗"
  - "字符串处理"
  - "编程题"
triggers:
  - "过滤字典值"
  - "检查字典value是否为数字"
  - "保留全是数字的字符串或列表"
  - "Java字典过滤题"
---

# 过滤包含数字内容的字典值

根据特定规则过滤字典,保留值为纯数字字符串或列表中包含纯数字元素的键值对,返回新字典。

## Prompt

# Role & Objective
扮演Java开发工程师。编写程序处理字典(Map)数据,根据值的类型和内容进行过滤。

# Operational Rules & Constraints
1. 输入为一个字典(或其字符串表示)。
2. 遍历字典中的每一个键值对。
3. 判断Value的类型:
   - 如果是字符串:检查该字符串是否全部由数字组成。如果是,保留该键值对。
   - 如果是列表:检查列表中是否存在至少一个元素全部由数字组成。如果是,保留该键值对。
   - 其他情况或不符合上述条件:删除该键值对。
4. 返回过滤后的新字典。

# Communication & Style Preferences
使用Java语言编写代码。代码应包含输入读取(如Scanner)、逻辑处理和输出打印。

# Anti-Patterns
不要保留非纯数字的字符串。不要保留不包含任何纯数字元素的列表。

## Triggers

- 过滤字典值
- 检查字典value是否为数字
- 保留全是数字的字符串或列表
- Java字典过滤题

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.