# Send Workspace Analyzer to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "workspace-analyzer",
    "name": "Workspace Analyzer",
    "source": "tencent",
    "type": "skill",
    "category": "效率提升",
    "sourceUrl": "https://clawhub.ai/zendenho7/workspace-analyzer",
    "canonicalUrl": "https://clawhub.ai/zendenho7/workspace-analyzer",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/workspace-analyzer",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=workspace-analyzer",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "SKILL.md",
      "run.sh",
      "scripts/analyzer.py"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "workspace-analyzer",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-01T16:02:09.658Z",
      "expiresAt": "2026-05-08T16:02:09.658Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=workspace-analyzer",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=workspace-analyzer",
        "contentDisposition": "attachment; filename=\"workspace-analyzer-1.1.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "workspace-analyzer"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/workspace-analyzer"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/workspace-analyzer",
    "downloadUrl": "https://openagent3.xyz/downloads/workspace-analyzer",
    "agentUrl": "https://openagent3.xyz/skills/workspace-analyzer/agent",
    "manifestUrl": "https://openagent3.xyz/skills/workspace-analyzer/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/workspace-analyzer/agent.md"
  }
}
```
## Documentation

### Workspace Analyzer

"Scans, analyzes, and reports. The agent decides."

### Overview

A self-improving agent needs a clean workspace. This skill analyzes any OpenClaw workspace to:

Detect core files dynamically (adapts to workspace changes)
Analyze content for issues (bloat, duplicates, broken links)
Validate single source of truth (content in multiple places)
Report actionable insights for the agent to act upon

Key Principle: The script analyzes → the agent decides → the agent acts.

### Installation

# Clone or copy to your skills folder
cp -r workspace-analyzer/ ~/.openclaw/workspace/skills/

### Run Analysis

# Full analysis (default)
python3 skills/workspace-analyzer/scripts/analyzer.py

# Quick scan (structure only, no content analysis)
python3 skills/workspace-analyzer/scripts/analyzer.py --quick

# Specific workspace
python3 skills/workspace-analyzer/scripts/analyzer.py --root /path/to/workspace

# Output to file
python3 skills/workspace-analyzer/scripts/analyzer.py --output report.json

### Output Format

{
  "scan_info": {
    "root": "/home/user/.openclaw/workspace",
    "timestamp": "2026-02-21T18:00:00Z",
    "files_scanned": 291
  },
  "core_files_detected": {
    "kai_core": {
      "files": ["SOUL.md", "OPERATING.md", ...],
      "count": 11
    },
    "mission_control": {...},
    "agent_cores": {...},
    "skills": {...}
  },
  "analysis": {
    "SOUL.md": {
      "category": "kai_core",
      "line_count": 450,
      "sections": [...],
      "wiki_links": [...],
      "issues": [...]
    }
  },
  "single_source_validation": {
    "skill_graph": {
      "status": "PASS/FAIL",
      "locations": ["AGENTS.md", "OPERATING.md", "SOUL.md"],
      "recommendation": "Reference all to SUB_CONSCIOUS.md"
    },
    "memory_architecture": {...},
    "image_handling": {...}
  },
  "recommendations": [
    {"action": "FIX_DUPLICATE_CONTENT", "topic": "skill_graph", "files": ["AGENTS.md", "OPERATING.md"], "severity": "CRITICAL"},
    {"action": "REVIEW_BLOAT", "file": "OPERATING.md", "severity": "WARN"},
    {"action": "CHECK_DUPLICATE", "severity": "WARN"},
    {"action": "CHECK_BROKEN_LINK", "severity": "INFO"}
  ],
  "summary": {
    "total_files": 291,
    "total_issues": 17,
    "total_recommendations": 25
  }
}

### What It Checks

The analyzer validates that each topic exists in exactly ONE place:

TopicExpected Single SourceSkill GraphSUB_CONSCIOUS.mdMemory ArchitectureOPERATING.md or SUB_CONSCIOUS.mdMessage ReactionsSUB_CONSCIOUS.mdImage HandlingOPERATING.mdSession BootstrapAGENTS.md

### Detection Logic

Scan all core files for key section headings
Build content map of where each topic appears
Flag violations where topic appears in 2+ places
Recommend fix by pointing to single source

### Example Output

{
  "single_source_validation": {
    "skill_graph": {
      "status": "FAIL",
      "locations": ["AGENTS.md:285", "OPERATING.md:56", "SOUL.md:52"],
      "severity": "CRITICAL",
      "recommendation": "Consolidate to SUB_CONSCIOUS.md, reference from others"
    },
    "memory_architecture": {
      "status": "FAIL", 
      "locations": ["AGENTS.md:157", "OPERATING.md:74", "OPERATING.md:193"],
      "severity": "CRITICAL",
      "recommendation": "Remove duplicate section at OPERATING.md:193"
    }
  }
}

### Dynamic Core File Detection

Automatically detects core files based on location patterns:

CategoryPatternExampleKAI CoreRoot *.mdSOUL.md, OPERATING.mdMission Controlmission_control/*GUIDELINES.mdMISSION_CONTROL_GUIDELINES.mdAgent Coresmission_control/agents//.mddesigner/SOUL.mdSkillsskills/*/SKILL.mdreact-expert/SKILL.mdSUB_CONSCIOUSRoot SUB_CONSCIOUS.mdSUB_CONSCIOUS.md

### Category-Specific Thresholds

Bloat thresholds vary by category:

CategoryWarningCriticalkai_core400600mission_control500800agent_cores300500skills6001000memory500800docs400600SUB_CONSCIOUS100200

### Issue Detection

BLOAT_WARNING: File exceeds warning threshold
BLOAT_CRITICAL: File exceeds critical threshold
ORPHAN_WARNING: File not modified in 30+ days
DUPLICATE_CONTENT: Same topic in multiple files
BROKEN_WIKI_LINK: Wiki-link may not match any file

### Recommendations

The analyzer generates actionable recommendations:

ActionSeverityDescriptionWhat To DoFIX_DUPLICATE_CONTENTCRITICALSame content in 2+ filesConsolidate to single sourceREVIEW_BLOATWARN/CRITICALFile is too largeReview if legitimate or splitREVIEW_ORPHANINFOFile hasn't been modifiedArchive if no longer neededCHECK_DUPLICATEWARNPotential duplicate filesVerify if intentional or mergeCHECK_BROKEN_LINKINFOWiki-link may be brokenVerify if skill existsCHECK_MISSINGWARNExpected core files not foundCreate if needed

### Fix Instructions for Agents

When duplicate content is detected, follow these steps:

### Step 1: Identify the True Source

Determine which file should be the single source:

TopicShould Be InReflex behaviorsSUB_CONSCIOUS.mdSession bootstrapAGENTS.mdProceduresOPERATING.mdIdentity principlesSOUL.mdKnowledge indexKNOWLEDGE_GRAPH.md

### Step 2: Update Non-Source Files

Replace duplicate content with references:

**Topic:** See [[SUB_CONSCIOUS.md]] for procedures.

### Step 3: Verify Bootstrap Injection

Ensure new files are injected at session start:

Check ~/.openclaw/openclaw.json:

{
  "hooks": {
    "internal": {
      "entries": {
        "bootstrap-extra-files": {
          "enabled": true,
          "paths": ["SUB_CONSCIOUS.md", "self-improving/memory.md"]
        }
      }
    }
  }
}

### Step 4: Commit Changes

git add -A
git commit -m "Fix duplicate content - consolidate to single source"

### How to Use Results

Step 1: Prioritize by Severity

CRITICAL → Review immediately
WARN → Review during next maintenance
INFO → Review during weekly cleanup

Step 2: Check Single Source Validation

FAIL → Fix duplicate content first (most important)
PASS → Move to other issues

Step 3: Understand Context

BLOAT = Informational, not all need fixing

Reference docs (skills//references/.md) can be legitimately large
Research logs are consolidations - consider splitting by date
Session logs - archive old ones



DUPLICATES = Check if intentional

IDENTITY files = Expected (agent templates)
REVIEW files = May need consolidation
LESSONS files = OK (different skills)



BROKEN LINKS = Usually false positives

Links to skills like [[blogwatcher]] ARE valid
Skills have SKILL.md suffix - analyzer doesn't detect this
Only flag if link to core file is truly broken

Step 4: Take Action

Don't auto-fix - review first
Archive old session logs monthly
Split large research logs by topic
Keep reference docs as-is (legitimate)
Fix duplicate content by consolidating to single source

### With Heartbeat

Add to your HEARTBEAT.md maintenance section:

## 7. Memory + Workspace Maintenance

### Run Workspace Analyzer
python3 skills/workspace-analyzer/scripts/analyzer.py --output /tmp/analysis.json

### Review Single Source Validation
- Check for DUPLICATE_CONTENT issues
- Fix by consolidating to single source

### Review Recommendations
- Check recommendations in output
- Prioritize by severity
- Fix issues manually

### Output to Memory

Save analysis results for later review:

python3 skills/workspace-analyzer/scripts/analyzer.py \\
  --output memory/$(date +%Y-%m-%d)-workspace-analysis.json

### Read-Only

Never modifies files
Only reads and analyzes

### No Secrets

Never reads API keys
Never accesses credentials
Only analyzes file metadata and content structure

### Safe Output

Only contains: file paths, sizes, line counts, recommendations
No sensitive data exposed

### Limitations

No auto-fix: Script reports, agent must decide and act
Wiki-link false positives: Links to external skills may appear broken
Date-based duplicate detection: May miss non-date-based duplicates

### Sample Output - Single Source Validation

{
  "single_source_validation": {
    "skill_graph": {
      "status": "FAIL",
      "files": ["AGENTS.md", "OPERATING.md", "SOUL.md"],
      "severity": "CRITICAL",
      "recommendation": "Reference all to SUB_CONSCIOUS.md"
    },
    "memory_architecture": {
      "status": "FAIL",
      "files": ["AGENTS.md", "OPERATING.md"],
      "severity": "CRITICAL", 
      "recommendation": "Remove duplicate in OPERATING.md"
    },
    "message_reactions": {
      "status": "PASS",
      "files": ["SUB_CONSCIOUS.md"],
      "severity": "OK"
    }
  }
}

### Sample Output - Recommendations

[
  {
    "action": "FIX_DUPLICATE_CONTENT",
    "topic": "skill_graph",
    "files": ["AGENTS.md:285", "OPERATING.md:56", "SOUL.md:52"],
    "severity": "CRITICAL",
    "recommendation": "Replace with reference to SUB_CONSCIOUS.md"
  },
  {
    "action": "REVIEW_BLOAT",
    "file": "OPERATING.md",
    "category": "kai_core",
    "reason": "503 lines - consider splitting (threshold: 400)",
    "severity": "WARN"
  }
]

### Skill Graph

This skill is related to:

[[mcporter]] - For MCP server analysis
[[clean-workspace]] - For actual cleanup tasks
[[qmd]] - For memory organization

### v1.1.0 (2026-02-24)

Added single source of truth validation
Added duplicate content detection (same topics in multiple files)
Added FIX_DUPLICATE_CONTENT recommendation type
Added SUB_CONSCIOUS category
Added fix instructions for agents

### v1.0 (2026-02-21)

Initial release
Basic file analysis
Core file detection
Bloat detection

Last updated: 2026-02-24
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: zendenho7
- Version: 1.1.0
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-05-01T16:02:09.658Z
- Expires at: 2026-05-08T16:02:09.658Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/workspace-analyzer)
- [Send to Agent page](https://openagent3.xyz/skills/workspace-analyzer/agent)
- [JSON manifest](https://openagent3.xyz/skills/workspace-analyzer/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/workspace-analyzer/agent.md)
- [Download page](https://openagent3.xyz/downloads/workspace-analyzer)