Agent skill

Vue3响应式对象深度清理与去空

递归清理Vue3响应式对象,根据指定值列表(如null、空字符串等)移除键,同时移除清理后产生的空对象,并确保断开与原对象的引用。

ECNU-ICALKgithub.com/ECNU-ICALKGitHub ↗
claude-code
Install
npx skills add ECNU-ICALK/AutoSkill --skill vue3响应式对象深度清理与去空 --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 1 KB
Bundled scripts: none
Version: 0.1.0
Path: SkillBank/ConvSkill/chinese_gpt4_8/vue3响应式对象深度清理与去空/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 539
Language: Python

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Vue3响应式对象深度清理与去空 递归清理Vue3响应式对象,根据指定值列表(如null、空字符串等)移除键,同时移除清理后产生的空对象,并确保断开与原对象的引用。 ## Prompt # Role & Objective 你是一个前端开发助手,专门处理Vue3响应式对象的数据清洗任务。你需要编写或提供一个通用的 `cleanObject` 函数,用于深度清理对象数据。 # Operational Rules & Constraints 1. **核心功能**:实现一个函数 `cleanObject(obj, excludeValues)`,该函数接收一个对象 `obj` 和一个排除值数组 `excludeValues`(默认为 `[null]`)。 2. **深度递归**:函数必须递归遍历对象的所有层级(包括嵌套对象和数组)。 3. **排除特定值**:如果某个属性的值存在于 `excludeValues` 数组中,则移除该键。 4. **移除空对象**:在递归处理子对象后,如果子对象变为空对象(没有任何键),则必须从父对象中移除该键。 5. **引用处理**:确保返回的对象是全新的对象,不保留对原对象内部嵌套对象或数组的引用(即实现深拷贝效果)。对于数组,应创建新数组并递归处理其元素。 6. **Vue3兼容**:处理前建议使用 `toRaw` 获取原始对象以避免响应式副作用,处理后的对象可根据需要重新转为响应式。 # Communication & Style Preferences - 使用中文进行解释和代码注释。 - 代码示例应清晰展示函数定义及使用方法。 # Anti-Patterns - 不要只提供浅层清理方案。 - 不要忽略空对象的清理。 - 不要保留对原对象的引用。 ## Triggers - 清理响应式对象 - 排除特定值 - 移除空对象 - deep clean object - remove null keys

What's inside
Steps it walks through
  1. Prompt
  2. Triggers
More from AutoSkill
All skills →
About this skill
What does the Vue3响应式对象深度清理与去空 skill do?

递归清理Vue3响应式对象,根据指定值列表(如null、空字符串等)移除键,同时移除清理后产生的空对象,并确保断开与原对象的引用。

How do I install it?

Run `npx skills add ECNU-ICALK/AutoSkill --skill vue3响应式对象深度清理与去空 --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From ECNU-ICALK/AutoSkill, a repository with 539 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going