SkillAtlasSkill 详情

sweep

Language: English | 繁體中文 | 简体中文

审核状态:已审核Quality 80Security 80

复制安装命令

用 Codex 或 Claude 安装复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它先审查 Skill 页面再帮你安装。

复制前请先查看来源、License 和安全提示。

项目 README

来源文件:README.md

抓取于 2026年7月29日

Universal Development Standards

npm version License: MIT + CC BY 4.0 Node.js

Language: English | 繁體中文 | 简体中文

Version: 6.1.1 | Released: 2026-07-18 | License: Dual License (CC BY 4.0 + MIT)

Language-agnostic, framework-agnostic development standards for software projects. Ensure consistency, quality, and maintainability across diverse technology stacks with AI-native workflows.


🚀 Quick Start

Install via npm (Recommended)

# Install globally (stable)
npm install -g universal-dev-standards

# Initialize your project
uds init

Looking for beta or RC versions? See Pre-release Versions.

Or use npx (No installation required)

npx universal-dev-standards init

Note: Copying standards alone won't enable AI assistance. Use uds init to automatically configure your AI tool or manually reference standards in your tool's configuration file.

🗺️ What's Next?

I want to...Command
Understand an existing codebase/discover
Build a new feature with specs/sdd
Work with legacy code/reverse
Choose a development methodology/methodology
Make a clean commit/commit

Tip: Type /dev-workflow for a complete guide to all development phases and available commands.

See also: Daily Workflow Guide

📚 Documentation

I want to...Document
New to UDS? Set up in 5 minutesdocs/user/GETTING-STARTED.md
Browse all 55 skills by Tier & Categorydocs/user/SKILLS-INDEX.md
See all slash commandsdocs/user/COMMANDS-INDEX.md
Quick reference carddocs/user/CHEATSHEET.md
Common questionsdocs/user/FAQ.md
Troubleshoot problemsdocs/user/TROUBLESHOOTING.md
Understand UDS terminologydocs/user/GLOSSARY.md

✨ Features

CategoryCountDescription
Core Standards149Universal development guidelines
AI Skills55Interactive skills
Slash Commands51Quick actions
CLI Commands21Project setup & maintenance

What's New in 5.0? See Pre-release Notes for details on new features.


🏗️ Architecture

UDS content is organised along two independent axes. They answer different questions, and conflating them is the most common way to misread the layout — so they are stated separately.

Axis 1 — Depth: how much must always be loaded

This axis is a behavioural contract: it tells an AI agent what to read up front and what to leave until asked. It is the axis that matters for context cost.

graph TD
    A[AI Agent / Developer] --> R["<b>Rules</b><br/>core/*.md<br/><b>Always Read</b>"]
    R -- "needs explanation or a worked example" --> G["<b>Guides</b><br/>core/guides/*.md<br/>Read on Demand Only"]
    R -- "needs a full methodology (TDD, BDD, …)" --> M["<b>Methodologies</b><br/>methodologies/guides/*.md<br/>Read on Demand Only"]
LayerLocationContainsAI behaviour
Rulescore/*.mdActionable rules, checklists, thresholdsAlways Read
Guidescore/guides/*.mdExplanations, tutorials, examplesRead on Demand Only
Methodologiesmethodologies/guides/*.mdFull methodology guidesRead on Demand Only

Axis 2 — Format: how the same standard is encoded

This axis carries no depth claim. A standard's .ai.yaml and .md forms are two encodings of the same material, chosen by who is reading.

Aspectai/standards/*.ai.yamlcore/*.md
EncodingStructured YAMLProse Markdown
Best forDeterministic machine lookupHuman reading and review
Relative size~69% of the Markdown form — a reformat, not a compaction tier†baseline

† Measured 2026-07-23 across the 135 standards that have both forms: 872,380 bytes of YAML against 1,271,471 bytes of Markdown. Reproduce with the commands in Content Architecture §7.

📐 The depth contract, where it is enforced across integrations, and the measured gap between the contract and the current tree are documented in docs/reference/CONTENT-ARCHITECTURE.md.


🤖 AI Tool Support

UDS ships integrations for 11 live tools. 1 of them is behaviourally verified.

Those are two different numbers on purpose. Status says how complete the integration we wrote is. Verified says whether anyone has confirmed the tool actually reads it and behaves accordingly — by running probes and recording the output. Until today the second question had never been asked, so no answer to it can be assumed. See XSPEC-357 for the probe design and the verification queue (Antigravity → Codex → Claude Code → the rest).

AI ToolStatusVerifiedSkillsSlash CommandsConfiguration
Claude Code✅ Complete🔬 —◆5551CLAUDE.md
OpenCode✅ Complete🔬 —5551AGENTS.md
Cursor✅ Complete🔬 —CoreSimulated.cursorrules
Roo Code✅ Complete🔬 —CoreWorkflow.roo/rules/
Cline🔶 Partial🔬 —CoreWorkflow.clinerules
Windsurf🔶 Partial🔬 —CoreRulebook.windsurfrules
GitHub Copilot🔶 Partial🔬 —CorePrompts.github/copilot-instructions.md
OpenAI Codex🔶 Partial✅ 2026-07-23Core—AGENTS.md
Aider🔶 Partial🔬 ———AGENTS.md
Continue.dev🔶 Partial🔬 ———.continue/config.json
Google Antigravity⚠️ Minimal🔬 ——‡—.antigravity/rules.md
Gemini CLI⛔ Discontinued†———GEMINI.md (frozen)

Status Legend (how complete the integration we wrote is): ✅ Complete | 🔶 Partial | ⚠️ Minimal | ⏳ Planned | ⛔ Discontinued

Verified Legend (whether a probe run confirmed the tool behaves accordingly): ✅ date verified | 🔬 — not yet verified | ⌛ expired | ❌ failed

◆ Claude Code is in daily production use by the maintainer, which is why the integration is the most complete — but daily use is not a recorded verification, and a tool cannot be the judge of itself. It sits in the queue like everything else.

† Google sunset Gemini CLI on 2026-06-18 (announced at I/O 2026-05-19, 30-day migration window), succeeded by Antigravity CLI. The integrations/gemini-cli/ and .gemini/ trees are frozen — kept for reference, excluded from sync checks, and no longer maintained. See .gemini/DEPRECATED.md.

‡ Antigravity supports skills, but the correct install path is not yet verified against a real Antigravity CLI. Two candidates conflict: ~/.gemini/antigravity-cli/plugins/<name>/skills/ (official plugin docs) and .agent/skills/ (UDS's own 2026-02 spec, written in the Gemini CLI era). uds init therefore does not install skills for this target until one is confirmed — an unverified path fails silently, which is worse than not installing.


📦 Installation Methods

CLI Tool (Primary)

npm (Recommended)

npm install -g universal-dev-standards
uds init        # Interactive initialization
uds check       # Check adoption status
uds update      # Update to latest version
uds config      # Manage preferences (language, mode)
uds uninstall   # Remove standards from project

⚙️ Configuration

Use uds config to manage your preferences:

ParameterCommandDescription
Commit Languageuds config --lang zh-TWSet preferred language for AI commits
Standardsuds initInstall all available standards
Tool Modeuds config --mode skillsChoose between Skills, Standards, or Both

👥 Contributing

  1. Suggest Improvements: Open an issue with problem and solution.
  2. Add Examples: Submit real-world usage examples.
  3. Extend Standards: Contribute language/framework extensions.

See CONTRIBUTING.md for detailed guidelines.


📄 License

ComponentLicense
DocumentationCC BY 4.0
CLI ToolMIT

Acknowledgments

UDS draws architectural inspiration from these outstanding open-source projects:

ProjectInspirationLicense
SuperpowersSystematic debugging, agent dispatch, verification evidenceMIT
GSDStructured task definition, traceability matrix, verification loop capMIT
PAULPlan-Apply-Unify loop, acceptance-driven developmentMIT
CARLContext-aware loading, dynamic rule injectionMIT
CrewAIMulti-agent communication protocol, context budget trackingMIT
LangGraphWorkflow state protocol, HITL interrupt checkpointsMIT
OpenHandsEvent sourcing, action-observation stream patternsMIT
DSPyAgent signatures, structured I/O contractsMIT

Note: UDS adopts concepts and methodologies only — no source code from these projects is included.


Maintained with ❤️ by the open-source community

其他

中风险

  • 来源需自行核对维护者身份。
  • 包含脚本或命令调用,安装前请复核。
  • 未检测到明显外部权限要求。
  • 未检测到高风险命令。
  • 扫描发现:2 条。

Codex — Git Clone 安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 克隆仓库:git clone https://github.com/AsiaOstrich/universal-dev-standards.git
  3. 将 "skills/sweep" 文件夹复制到 Codex 的 skills 目录中。
  4. 重启 Codex 让新的 skill 生效。

Codex — 手动复制安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 从源仓库下载 SKILL.md 及相关文件。
  3. 在 Codex 的 skills 目录中创建新文件夹。
  4. 将所有 skill 文件复制到新文件夹中。
  5. 重启 Codex 让新的 skill 生效。

Claude Code — Git Clone 安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 克隆仓库:git clone https://github.com/AsiaOstrich/universal-dev-standards.git
  3. 将 "skills/sweep" 文件夹复制到 Claude Code 的 skills 目录中。
  4. 重启 Claude Code 让新的 skill 生效。

Claude Code — 手动复制安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 从源仓库下载 SKILL.md 及相关文件。
  3. 在 Claude Code 的 skills 目录中创建新文件夹。
  4. 将所有 skill 文件复制到新文件夹中。
  5. 重启 Claude Code 让新的 skill 生效。

Cursor — Git Clone 安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 克隆仓库:git clone https://github.com/AsiaOstrich/universal-dev-standards.git
  3. 将 "skills/sweep" 文件夹复制到 Cursor 的 skills 目录中。
  4. 重启 Cursor 让新的 skill 生效。

Cursor — 手动复制安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 从源仓库下载 SKILL.md 及相关文件。
  3. 在 Cursor 的 skills 目录中创建新文件夹。
  4. 将所有 skill 文件复制到新文件夹中。
  5. 重启 Cursor 让新的 skill 生效。

GitHub Copilot — Git Clone 安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 克隆仓库:git clone https://github.com/AsiaOstrich/universal-dev-standards.git
  3. 将 "skills/sweep" 文件夹复制到 GitHub Copilot 的 skills 目录中。
  4. 重启 GitHub Copilot 让新的 skill 生效。

GitHub Copilot — 手动复制安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 从源仓库下载 SKILL.md 及相关文件。
  3. 在 GitHub Copilot 的 skills 目录中创建新文件夹。
  4. 将所有 skill 文件复制到新文件夹中。
  5. 重启 GitHub Copilot 让新的 skill 生效。

Windsurf — Git Clone 安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 克隆仓库:git clone https://github.com/AsiaOstrich/universal-dev-standards.git
  3. 将 "skills/sweep" 文件夹复制到 Windsurf 的 skills 目录中。
  4. 重启 Windsurf 让新的 skill 生效。

Windsurf — 手动复制安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 从源仓库下载 SKILL.md 及相关文件。
  3. 在 Windsurf 的 skills 目录中创建新文件夹。
  4. 将所有 skill 文件复制到新文件夹中。
  5. 重启 Windsurf 让新的 skill 生效。
查看 SKILL.md 原文
name: sweep
scope: universal
description: |
  Scan codebase for debug artifacts and code quality issues; optionally auto-fix safe patterns.
  Use when: before committing, during PR review, or periodic codebase cleanup.
  Keywords: sweep, debug cleanup, console.log, debugger, TODO, ts-any, code quality.
allowed-tools: Read, Grep, Glob, Bash(find:*), Edit, Write
argument-hint: "[--fix] [--report] [--path <dir>] [--exclude <pattern>]"

Sweep Assistant | 掃碼助手

Language: English | 繁體中文

Scan the codebase for debug artifacts, code quality issues, and technical debt markers. Optionally auto-fix safe patterns (console.log, debugger statements).


Scan Patterns | 掃描模式

Pattern IDLabelAuto-fixableDescription
console-logconsole.log / console.debug / console.trace✅ YesDebug output left in production code
debuggerdebugger statement✅ YesDebugger breakpoints left in code
todo-fixmeTODO / FIXME / HACK / XXX❌ Report onlyTechnical debt markers
ts-anyTypeScript any type❌ Report onlyType safety violations

Usage | 使用方式

/sweep                        # Scan current directory, report findings
/sweep --fix                  # Scan and auto-fix fixable patterns
/sweep --report               # Scan and save report to .uds/sweep-report.json
/sweep --path src/            # Scan specific directory
/sweep --exclude "**/*.test.ts"  # Exclude patterns (glob)

Workflow | 執行工作流程

Step 1: Discover Files

Use Glob tool to find all source files under the target path. Default excludes: node_modules/, dist/, .git/, *.min.js, coverage/.

Step 2: Scan Each Pattern

For each pattern, use Grep to find matches across all files. Collect findings: { file, line, column, pattern_id, label, fixable, content }.

Step 3: Report Findings

Output a structured summary:

📊 Sweep Results
─────────────────────────────────────
console-log:   12 findings  (auto-fixable)
debugger:       2 findings  (auto-fixable)
todo-fixme:    28 findings  (report only)
ts-any:         5 findings  (report only)
─────────────────────────────────────
Total: 47 findings  |  Fixable: 14

Step 4: HITL Gate (if --fix and findings > 20)

If --fix flag is set AND total fixable findings exceed 20: Pause and require explicit user confirmation before applying fixes. Show the list of files that will be modified.

Step 5: Apply Fixes (if --fix confirmed)

For each fixable finding:

  • console-log: Remove the line if it contains only the console statement
  • debugger: Remove the line if it contains only the debugger statement

Use Edit tool to apply changes file by file. Report: "Fixed N findings in M files."

Step 6: Save Report (if --report)

Write findings to .uds/sweep-report.json:

{
  "timestamp": "<ISO8601>",
  "total_findings": 47,
  "fixable": 14,
  "fixed": 14,
  "findings_by_pattern": { "console-log": 12, "debugger": 2, "todo-fixme": 28, "ts-any": 5 },
  "files_modified": ["src/auth.ts", "src/utils.ts"]
}

Configuration | 設定

Configure via uds.project.yaml:

sweep:
  default_path: "src/"
  exclude_patterns:
    - "**/*.test.ts"
    - "**/*.spec.ts"
    - "**/fixtures/**"
  hitl_threshold: 20       # Require confirmation if fixable findings exceed this
  patterns:
    enabled:
      - console-log
      - debugger
      - todo-fixme
      - ts-any

Next Steps Guidance | 下一步引導

After /sweep completes, suggest:

  • Run /checkin to verify overall code quality before committing
  • Run /code-review to review the cleaned-up changes
  • Run /commit to commit the fixes

Related Standards | 相關標準


Version History | 版本歷程

VersionDateChanges
1.0.02026-04-28Initial release — XSPEC-097 Phase 1 (從上游遷移)

License | 授權

This skill is released under MIT License and CC BY 4.0.

发现问题?提交给管理员复核

评分:

评论 (0)

暂无评论,成为第一个评论者吧!