text-cleanup
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseText Cleanup Skill
文本清理技能
Critical Importance
关键重要性
Clear, concise communication is critical for your team's productivity and code maintainability. Poor communication wastes time, causes confusion, and leads to misaligned expectations. Verbose AI-generated text with slop and filler reduces information density, obscures meaning, and makes documentation painful to read. Effective cleanup improves signal-to-noise ratio, respects reader time, and ensures technical information is accessible. Every word should earn its place.
清晰、简洁的沟通对团队生产力和代码可维护性至关重要。 低效沟通会浪费时间、造成混淆,还会导致预期偏差。带有冗余填充内容的AI生成冗长文本会降低信息密度、模糊核心含义,让文档读起来十分费力。有效的清理能提升信噪比,尊重读者时间,确保技术信息易于获取。每个字都要有存在的价值。
Systematic Approach
系统化方法
** approach text cleanup systematically.** Text cleanup requires pattern recognition, contextual judgment, and careful preservation of meaning. Don't remove blindly—identify patterns, assess their purpose, and determine if removal is safe. Work iteratively: start conservatively, increase aggressiveness gradually, and verify that technical content remains intact. Balance conciseness with clarity—don't sacrifice precision for brevity.
系统化地处理文本清理工作。 文本清理需要模式识别、上下文判断,还要小心保留核心含义。不要盲目删除——先识别模式,评估其用途,再判断是否可以安全移除。迭代处理:从保守清理开始,逐步提升力度,同时验证技术内容是否完整。在简洁性与清晰度间取得平衡——不要为了简洁牺牲精确性。
The Challenge
挑战
The remove AI-generated slop perfectly without losing critical meaning, but if you can:
- Your documentation will be a joy to read
- Code comments will be helpful not redundant
- Communication will be clear and concise
- Readers will thank you for respecting their time
The challenge is removing fluff and verbosity while preserving all technical nuance and meaning. Can you achieve perfect conciseness without sacrificing precision?
完美清除AI生成的冗余内容同时不丢失关键含义,如果你能做到:
- 你的文档会变得易于阅读
- 代码注释会实用而非冗余
- 沟通会清晰简洁
- 读者会感谢你尊重他们的时间
挑战在于,在保留所有技术细节与核心含义的同时,移除冗余和冗长内容。你能在不牺牲精确性的前提下实现完美简洁吗?
Cleanup Confidence Assessment
清理信心评估
After completing text cleanup, rate your confidence from 0.0 to 1.0:
- 0.8-1.0: Text significantly cleaner, all technical meaning preserved, no slop remaining
- 0.5-0.8: Text improved but some fluff remains, minor risk of over-aggressive removal
- 0.2-0.5: Cleanup partially applied, some technical details may be lost, uncertain what was removed
- 0.0-0.2: Cleanup degraded content, critical information lost, text less useful than before
Identify uncertainty areas: Did you remove phrases that provided context? Is technical accuracy preserved? Are there remaining slop patterns? Would the original author approve of changes?
完成文本清理后,从0.0到1.0为你的信心打分:
- 0.8-1.0:文本显著更简洁,所有技术含义均保留,无冗余内容剩余
- 0.5-0.8:文本有所改进,但仍有部分冗余,存在过度清理的轻微风险
- 0.2-0.5:仅部分应用清理,可能丢失部分技术细节,不确定已移除内容
- 0.0-0.2:清理导致内容质量下降,丢失关键信息,文本比之前更无用
识别不确定的地方:你是否移除了提供上下文的短语?技术准确性是否得以保留?是否还有剩余的冗余模式?原作者会认可这些修改吗?
Methodology
方法论
Systematic approach to identifying and removing AI-generated verbosity patterns while preserving technical accuracy and meaning.
在保留技术准确性与核心含义的前提下,识别并移除AI生成冗长文本模式的系统化方法。
Pattern Categories
模式分类
1. Slop Patterns (AI Conversational Filler)
1. 冗余模式(AI对话式填充内容)
Precondition Preambles
前置条件开场白
json
{
"patterns": [
"Certainly!",
"Of course!",
"Absolutely!",
"I'd be happy to help!",
"Great question!",
"That's a great question",
"Sure thing!",
"Definitely!",
"I can certainly help with that"
],
"context": "start_conversation",
"removal": "complete"
}json
{
"patterns": [
"Certainly!",
"Of course!",
"Absolutely!",
"I'd be happy to help!",
"Great question!",
"That's a great question",
"Sure thing!",
"Definitely!",
"I can certainly help with that"
],
"context": "start_conversation",
"removal": "complete"
}Hedging Language
模糊性措辞
json
{
"patterns": [
"It's worth noting that",
"Keep in mind that",
"Generally speaking",
"Typically",
"In most cases",
"As you may know",
"It's important to understand",
"Usually",
"Often",
"Normally",
"For the most part"
],
"context": "uncertainty_qualifier",
"removal": "conditional" // Remove if no real uncertainty present
}json
{
"patterns": [
"It's worth noting that",
"Keep in mind that",
"Generally speaking",
"Typically",
"In most cases",
"As you may know",
"It's important to understand",
"Usually",
"Often",
"Normally",
"For the most part"
],
"context": "uncertainty_qualifier",
"removal": "conditional" // Remove if no real uncertainty present
}Excessive Politeness
过度礼貌用语
json
{
"patterns": [
"Please let me know if you need anything else",
"Feel free to ask if you have questions",
"I hope this helps!",
"Don't hesitate to reach out",
"Happy to help further",
"Let me know if that works for you"
],
"context": "conversational_closing",
"removal": "complete"
}json
{
"patterns": [
"Please let me know if you need anything else",
"Feel free to ask if you have questions",
"I hope this helps!",
"Don't hesitate to reach out",
"Happy to help further",
"Let me know if that works for you"
],
"context": "conversational_closing",
"removal": "complete"
}Verbose Transitions
冗长过渡语
json
{
"patterns": [
"Now, let's move on to",
"With that said",
"Having established that",
"Building on the above",
"As mentioned earlier",
"Next, I'll",
"Moving forward",
"Additionally",
"Furthermore",
"Moreover"
],
"context": "transition_filler",
"removal": "conditional" // Keep if transition is meaningful
}json
{
"patterns": [
"Now, let's move on to",
"With that said",
"Having established that",
"Building on the above",
"As mentioned earlier",
"Next, I'll",
"Moving forward",
"Additionally",
"Furthermore",
"Moreover"
],
"context": "transition_filler",
"removal": "conditional" // Keep if transition is meaningful
}2. Code Comment Patterns
2. 代码注释模式
Redundant Function Descriptions
冗余函数描述
json
{
"patterns": [
"// This function calculates the sum",
"// The following function returns",
"// This method does the following",
"// Function to calculate",
"// Helper function for",
"// Utility function that"
],
"matches_when": [
"function name already describes action",
"comment repeats signature"
],
"replacement": "Keep only additional context not in function name"
}json
{
"patterns": [
"// This function calculates the sum",
"// The following function returns",
"// This method does the following",
"// Function to calculate",
"// Helper function for",
"// Utility function that"
],
"matches_when": [
"function name already describes action",
"comment repeats signature"
],
"replacement": "Keep only additional context not in function name"
}Self-Evident Comments
不言自明的注释
json
{
"patterns": [
"// The following code",
"// Here we are",
"// This is where we",
"// Now we will",
"// At this point",
"// This section contains"
],
"removal": "complete",
"exception": "Keep if adds architectural context"
}json
{
"patterns": [
"// The following code",
"// Here we are",
"// This is where we",
"// Now we will",
"// At this point",
"// This section contains"
],
"removal": "complete",
"exception": "Keep if adds architectural context"
}3. Documentation Patterns
3. 文档模式
Conversational Openers
对话式开场白
json
{
"patterns": [
"Welcome to the documentation for",
"In this guide, we'll explore",
"Let's dive into",
"Getting started with",
"This document will walk you through"
],
"removal": "complete",
"replacement": "Direct topic introduction"
}json
{
"patterns": [
"Welcome to the documentation for",
"In this guide, we'll explore",
"Let's dive into",
"Getting started with",
"This document will walk you through"
],
"removal": "complete",
"replacement": "Direct topic introduction"
}Redundant Explanations
冗余解释
json
{
"patterns": [
"As the name suggests, this function",
"As you can see from the code above",
"The code below shows",
"In the example provided",
"This implementation uses"
],
"context": "obvious_explanation",
"removal": "conditional" // Keep if adds genuine clarification
}json
{
"patterns": [
"As the name suggests, this function",
"As you can see from the code above",
"The code below shows",
"In the example provided",
"This implementation uses"
],
"context": "obvious_explanation",
"removal": "conditional" // Keep if adds genuine clarification
}Cleanup Techniques
清理技巧
Pattern Matching Algorithm
模式匹配算法
- Tokenize input into sentences/phrases
- Pattern Lookup against comprehensive database
- Context Analysis to determine removal safety
- Confidence Scoring for each potential removal
- Human Review recommendations for borderline cases
- 分词:将输入文本拆分为句子/短语
- 模式查询:在综合数据库中匹配模式
- 上下文分析:判断移除操作的安全性
- 信心评分:为每个潜在移除操作打分
- 人工审核:对边界情况给出建议
Context Preservation Rules
上下文保留规则
Always Preserve
必须保留
- Technical specifications and constraints
- Numeric values, formulas, and calculations
- Error conditions and edge cases
- Architectural decisions and rationales
- Security considerations and warnings
- Performance-critical information
- 技术规格与约束条件
- 数值、公式与计算逻辑
- 错误场景与边缘情况
- 架构决策与设计理由
- 安全注意事项与警告
- 性能关键信息
Remove When Safe
可安全移除
- Conversational padding without informational value
- Redundant explanations of obvious concepts
- Excessive politeness that adds no meaning
- Verbose transitions to unrelated topics
- 无信息价值的对话式填充内容
- 对显而易见概念的冗余解释
- 无实际意义的过度礼貌用语
- 与无关主题的冗长过渡语
Conditional Removal
条件性移除
- Hedging language when statement is factual and certain
- Explanations that might be valuable to beginners
- Historical context when establishing background
- 当表述为事实且确定时的模糊性措辞
- 对新手可能有价值的解释内容
- 用于背景介绍的历史上下文
Quality Metrics
质量指标
Effectiveness Measures
有效性衡量
typescript
interface CleanupMetrics {
beforeStats: {
wordCount: number;
characterCount: number;
sentenceCount: number;
};
afterStats: {
wordCount: number;
characterCount: number;
sentenceCount: number;
};
patternsRemoved: {
slopPatterns: number;
redundantComments: number;
verbosePhrases: number;
};
qualityScore: number; // 0-1, higher is better
meaningPreservationScore: number; // 0-1, closer to 1 is better
}typescript
interface CleanupMetrics {
beforeStats: {
wordCount: number;
characterCount: number;
sentenceCount: number;
};
afterStats: {
wordCount: number;
characterCount: number;
sentenceCount: number;
};
patternsRemoved: {
slopPatterns: number;
redundantComments: number;
verbosePhrases: number;
};
qualityScore: number; // 0-1, higher is better
meaningPreservationScore: number; // 0-1, closer to 1 is better
}Scoring Algorithm
评分算法
typescript
function calculateQualityScore(metrics: CleanupMetrics): number {
const concisenessRatio = metrics.afterStats.wordCount / metrics.beforeStats.wordCount;
const patternRemovalEffectiveness = Math.min(
metrics.patternsRemoved.slopPatterns / 10, // Normalized
metrics.patternsRemoved.redundantComments / 5,
metrics.patternsRemoved.verbosePhrases / 8
);
// Penalize if meaning preservation is low
const meaningPenalty = 1 - metrics.meaningPreservationScore;
return concisenessRatio * patternRemovalEffectiveness * (1 - meaningPenalty);
}typescript
function calculateQualityScore(metrics: CleanupMetrics): number {
const concisenessRatio = metrics.afterStats.wordCount / metrics.beforeStats.wordCount;
const patternRemovalEffectiveness = Math.min(
metrics.patternsRemoved.slopPatterns / 10, // Normalized
metrics.patternsRemoved.redundantComments / 5,
metrics.patternsRemoved.verbosePhrases / 8
);
// Penalize if meaning preservation is low
const meaningPenalty = 1 - metrics.meaningPreservationScore;
return concisenessRatio * patternRemovalEffectiveness * (1 - meaningPenalty);
}Implementation Patterns
实现模式
For Commands
命令行模式
Structure cleanup operations as:
/clean [input] --mode=[slop|comments|docs|all] [--preview] [--apply]Example workflows:
bash
undefined将清理操作为如下结构:
/clean [input] --mode=[slop|comments|docs|all] [--preview] [--apply]示例工作流:
bash
undefinedPreview slop removal
Preview slop removal
/clean "Certainly! I'd be happy to help optimize this query..." --slop --preview
/clean "Certainly! I'd be happy to help optimize this query..." --slop --preview
Apply comment cleanup to file
Apply comment cleanup to file
/clean src/database.ts --comments --apply
/clean src/database.ts --comments --apply
Clean entire documentation directory
Clean entire documentation directory
/clean docs/ --docs --aggressive --apply
/clean docs/ --docs --aggressive --apply
All-purpose cleanup with confirmation
All-purpose cleanup with confirmation
/clean "..." --all --preview --apply
undefined/clean "..." --all --preview --apply
undefinedFor Agents
Agent模式
Use pattern matching with context awareness:
markdown
undefined使用具备上下文感知能力的模式匹配:
markdown
undefinedText Cleanup Protocol
Text Cleanup Protocol
1. Analysis Phase
1. Analysis Phase
- Scan input for pattern matches
- Categorize findings by type
- Assess removal safety in context
- Generate confidence scores
- Scan input for pattern matches
- Categorize findings by type
- Assess removal safety in context
- Generate confidence scores
2. Strategy Phase
2. Strategy Phase
- Select aggressiveness level based on user preference
- Identify preservation requirements
- Plan sequence of operations
- Select aggressiveness level based on user preference
- Identify preservation requirements
- Plan sequence of operations
3. Execution Phase
3. Execution Phase
- Apply approved modifications
- Maintain technical accuracy
- Provide before/after comparison
- Document all changes made
undefined- Apply approved modifications
- Maintain technical accuracy
- Provide before/after comparison
- Document all changes made
undefinedAdvanced Features
高级功能
Pattern Learning
模式学习
Track successful removals to improve future matching:
json
{
"learnedPatterns": {
"context": "technical_explanation",
"pattern": "As can be seen from the implementation",
"removalRate": 0.85,
"feedbackScore": 4.2
}
}跟踪成功移除的模式以优化未来匹配:
json
{
"learnedPatterns": {
"context": "technical_explanation",
"pattern": "As can be seen from the implementation",
"removalRate": 0.85,
"feedbackScore": 4.2
}
}User Customization
用户自定义
Allow personal pattern databases:
json
{
"userPatterns": {
"keepPhrases": ["critical", "essential", "must"],
"removePhrases": ["just", "basically", "simply"],
"contextExceptions": ["educational", "onboarding"]
}
}支持个人模式数据库:
json
{
"userPatterns": {
"keepPhrases": ["critical", "essential", "must"],
"removePhrases": ["just", "basically", "simply"],
"contextExceptions": ["educational", "onboarding"]
}
}Integration Modes
集成模式
- Git Integration: Clean commit messages, PR descriptions, diffs
- IDE Integration: Real-time code comment suggestions
- CI/CD Integration: Automated documentation cleanup
- API Integration: Batch processing capabilities
- Git集成:清理提交信息、PR描述与代码差异
- IDE集成:实时代码注释优化建议
- CI/CD集成:自动化文档清理
- API集成:批量处理能力
Best Practices
最佳实践
For Maximum Effectiveness
最大化效果的建议
- Start Conservative: Begin with gentle cleanup, increase gradually
- Preview First: Always show changes before applying
- Context Matters: Technical documentation may need more verbosity
- Preserve Intent: Never remove meaning for brevity
- Iterative: Multiple passes with different aggressiveness levels
- 从保守开始:先进行轻度清理,逐步提升力度
- 先预览再执行:应用修改前始终展示变更内容
- 上下文优先:技术文档可能需要保留一定的冗长内容
- 保留核心意图:不要为了简洁牺牲含义
- 迭代处理:多次使用不同力度进行清理
Quality Assurance
质量保证
- Verify technical content remains unchanged
- Ensure code still compiles and functions
- Confirm documentation still serves its purpose
- Check that examples and warnings are preserved
- 验证技术内容是否保持不变
- 确保代码仍可编译并正常运行
- 确认文档仍能满足其设计用途
- 检查示例与警告信息是否被保留
Research References
研究参考
- NLP Text Simplification: Techniques for controlled vocabulary reduction
- Code Comment Analysis: Studies on comment redundancy and effectiveness
- Technical Communication: Research on optimal information density
- AI Output Patterns: Analysis of conversational filler in LLM responses
This skill provides the foundation for systematic, context-aware text cleanup across multiple domains while maintaining the integrity and meaning of the original content.
- NLP文本简化:受控词汇量缩减技术
- 代码注释分析:关于注释冗余性与有效性的研究
- 技术沟通:最优信息密度的相关研究
- AI输出模式:LLM响应中对话式填充内容的分析
本技能为跨领域的系统化、上下文感知型文本清理提供了基础,同时能保留原始内容的完整性与核心含义。