Token导航 LogoToken导航TokenDH.com
研究检索敏感数据clawhub未标认证来源可访问clear审计通过

workspace-governance工作区治理

Agent Skill

workspace-governance 用于查找、检索和筛选相关信息,适合在 OpenClaw 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

1,788

周安装

76

GitHub Stars

公开资料未说明

下载量

626
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:workspace-governance(工作区治理)
来源仓库:https://github.com/mars2003/workspace-governance
安装命令:
openclaw skills install workspace-governance
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install workspace-governance

简介

工作区治理聚焦方法论优先的原则框架设计。

  • 强调决策模式和安全执行机制。workspace-governance 属于研究检索类 Skill,可作为该场景下的辅助能力补充。
  • 不采用固定规则而是动态适配场景。适用宿主包括 OpenClaw,接入前应确认版本、权限和运行环境要求。
  • 适合需要灵活治理策略的项目环境。
  • 建议结合实际案例理解其运作逻辑。

SKILL.md

name
workspace-governance
description
>

Workspace Governance

Methodology-first workspace governance for AI agents.

Chinese Guide

For Chinese readers:

  • Quick entry: README.zh-CN.md
  • Detailed manual: references/治理手册.zh-CN.md

Purpose

This skill teaches an agent how to design a workspace management strategy that fits its own runtime, platform, and user preferences.

This is not a single directory template and not a rigid SOP. The agent should adapt based on context, then execute safely.

Core Principles

  1. Boundary before structure: define what can be touched first.
  2. Plan before action: generate a governance plan before file operations.
  3. Reversible before optimized: preserve rollback paths and avoid irreversible changes.
  4. Fit current system first: reuse existing conventions when they are workable.
  5. User control at key points: destructive operations require explicit confirmation.
  6. Evidence-driven decisions: only propose actions based on real scan results.

When to Use

  • Workspace is messy and needs cleanup or reorganization.
  • User asks to archive/close finished work.
  • User asks to create a new project with clear boundaries.
  • User asks for workspace audit/health check.
  • Agent needs to establish sustainable file governance rules.

Required Capabilities and Preconditions

Before execution, the agent should verify runtime capabilities:

  1. File/dir inspection and manipulation (ls, move, rename, archive, delete).
  2. Logging output capability (file or structured output sink).
  3. User confirmation capability for ambiguous/destructive actions.

Preconditions:

  • workspace_root must be defined (user-provided or default current directory).
  • If workspace_root is broad/high-risk, require explicit confirmation before scanning.
  • If confirmation capability is unavailable, ask-user items are blocking items.

Scope and Boundaries

The agent must define these before execution:

  • workspace_root: the manageable boundary for this task.
  • immutable_dirs: directories that must never be moved/deleted/renamed.
  • protected_files: sensitive files (keys, env, certs, VCS metadata).
  • risk_level: low/medium/high based on destructive potential.

If workspace_root is too broad (for example home root), require explicit confirmation before scanning.

Adaptation Model (Platform-Agnostic)

The agent should adapt strategy using this order:

  1. User explicit constraints and preferences.
  2. Current repository/project conventions.
  3. Platform/runtime restrictions.
  4. Conservative fallback defaults.

Do not force a fixed folder structure unless the user requests standardization.

Optional Adapt Block

SKILL_ADAPT:
  workspace_root: <path>
  immutable_dirs: [dir1, dir2]
  protected_files: [pattern1, pattern2]
  cache_policy: separate # separate | consolidate
  naming_policy: inherit # inherit | enforce

Adapt Loading Rules (Mandatory)

If SKILL_ADAPT.yaml exists, the agent must read it before planning and execution. If platform profiles exist (for example tools/adapt-profiles/openclaw.yaml), the agent should load the matching profile as an overlay.

Configuration precedence:

  1. User explicit instruction in current session.
  2. SKILL_ADAPT config.
  3. Repository conventions detected from files.
  4. Conservative defaults from this skill.

If SKILL_ADAPT parsing fails:

  • Do not silently ignore.
  • Fall back to conservative defaults.
  • Record a warning in governance logs.

Profile merge semantics:

  • immutable_dirs: union (security items only increase)
  • protected_files: union (protection only increases)
  • destructive_guard: override allowed only when strictness is not reduced

Decision Framework

Before any move/delete action, produce a governance plan with:

  1. Current State Summary

- What is cluttered - What is ambiguous - What is sensitive

  1. Target Strategy

- Keep, move, rename, archive, delete policy - Naming and lifecycle policy - Cache/temp policy

  1. Risk and Rollback

- Risks per action class - Rollback method and checkpoints

  1. User Confirmation Items

- Items that need user decision - Items excluded from automation

Plan Output Template

ItemCurrentProposed ActionTargetRiskReason
example.tmprootdeletemediumtemporary artifact
report-final.docxrootask userdocs or archivelowdestination ambiguous

Execution Pattern (Generic)

Use this pattern regardless of platform:

  1. Detect context and runtime capabilities.
  2. Load SKILL_ADAPT (if present) and resolve effective policy by precedence.
  3. Detect boundaries (workspace_root, immutable/protected scope).
  4. Scan inside workspace_root only.
  5. Classify findings: keep/move/rename/archive/delete/ask-user.
  6. Generate plan table with reasons, risks, and rollback checkpoints.
  7. Get confirmation for destructive or ambiguous actions.
  8. Execute in small batches with checkpoint logs.
  9. Report results and failures.
  10. Record governance log for traceability.

If multiple user intents exist, process sequentially and reconfirm between destructive batches.

Non-Interactive Safety Policy (Mandatory)

For non-interactive runtimes (cron, background subagent, execute-only environments):

  • If any item is classified as ask-user, the agent must stop with status blocked.
  • The agent must output a pending_decisions list and required user input.
  • The agent must not silently skip, auto-approve, or auto-delete ambiguous items.
  • Destructive actions without confirmation capability must be refused (fail-fast).

Recommended blocked output:

ItemProposed ActionBlock ReasonNeeded Input
report-final.docxask-userno confirmation channelchoose destination

Classification Heuristics (Flexible)

Use heuristics, not hard-coded folders:

  • Project artifacts: source code, configs, tests, docs tied to one project.
  • Reusable assets: media or references used across projects.
  • Ephemeral data: cache/tmp/build artifacts/log leftovers.
  • Agent/runtime state: tool configs, sessions, internal runtime files.
  • Ambiguous items: unclear ownership or destination.

Rules:

  • Ambiguous items must be escalated to user decisions.
  • Never silently rename if semantic meaning may change.
  • Never overwrite existing files on move.

Safety Baseline (Mandatory)

Never Touch Without Explicit User Approval

  • Version control metadata (.git/, .svn/, .hg/)
  • Secret material (*.key, *.pem, *.p12, private credentials)
  • Environment files (.env and equivalents)
  • Agent/runtime configuration directories

Destructive Action Guardrails

  • Always show dry-run plan first.
  • Require explicit confirmation for delete and bulk move.
  • Use collision-safe naming on move.
  • Keep operation logs and failure reasons.
  • Stop and ask user if unexpected high-risk patterns are detected.

Standard Operation Modes

1) Organize

Goal: improve discoverability and reduce clutter with minimal disturbance.

2) Create Project

Goal: initialize a new work area aligned with existing conventions.

3) Archive Project

Goal: transition inactive work into retrievable cold storage with metadata.

4) Hygiene Check

Goal: audit quality signals and output fix recommendations.

Note: The agent should choose implementation details based on local system constraints, not this document's examples.

Skill Interoperability (Optional)

workspace-governance can run standalone, but some scenarios may benefit from companion skills/tools:

  • Git or GitHub-related archive verification: use Git/GitHub skill/tooling.
  • Cloud/object storage archive lifecycle: use cloud storage skills/tools.
  • Team approval workflow before destructive batches: use workflow/approval skills/tools.

Interoperability rule:

  • Never assume companion skills are present.
  • If a companion capability is required by user intent but unavailable, report blocked with required dependency.

Quality Signals for Audit

Recommended checks:

  • Boundary clarity (what is managed vs protected)
  • Root clutter level
  • Naming consistency
  • Build/cache residue
  • Archive lifecycle completeness
  • Recoverability (rollback/readability of logs)

Output style:

  • Pass items with clear evidence.
  • Violations with fix suggestion and risk level.
  • Summary with actionable next steps.

Logging and Traceability

The agent should keep a lightweight operation record, including:

  • Date (YYYY-MM-DD)
  • Intent type (organize/create/archive/audit)
  • Planned changes vs executed changes
  • Success/failure counts
  • Unresolved decisions pending user input

Rollback and Checkpoint Schema (Minimum)

Each execution should create:

  1. A pre-execution checkpoint (checkpoint_before).
  2. A checkpoint per batch (checkpoint_batch_<n>).
  3. A final checkpoint (checkpoint_after).

Minimum log fields:

  • timestamp (YYYY-MM-DD HH:mm:ss)
  • intent (organize/create/archive/audit)
  • batch_id
  • action (move/rename/archive/delete)
  • source_path
  • target_path
  • result (success/failure/blocked)
  • reversible (yes/no)
  • rollback_ref (checkpoint id or recovery note)

Anti-Patterns to Avoid

  • Forcing a universal directory layout on every system
  • Performing bulk cleanup without a dry-run plan
  • Treating unknown files as disposable
  • Optimizing structure while ignoring user workflow habits
  • Mixing agent state and user business content without explicit mapping

Minimal Example (Reference Only)

Example principles in action:

  1. Detect workspace boundary and immutable dirs.
  2. Scan only within boundary.
  3. Mark ambiguous files as ask-user.
  4. Confirm plan before delete/move.
  5. Execute and log.

This example is illustrative, not normative.

Author

  • 作者: Mars2003 (GitHub)
  • 日期: 2026-04-28

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

80.19%
按下载量换算502

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills