oc-structure

oc-structure is a command for Claude Code from TheophilusChinomona/claude-openclaw-plugin. It costs 15 tokens per session (927 once invoked), scanned A, original, MIT.

A command for inspecting the OpenClaw workspace, the directory where its configuration, agents, messages, and shared data are stored.

In plain words
What is it for?
Use it to audit the workspace, list agent workspaces, inspect communication channels, or examine shared memory data.
Why use it?
It helps reveal missing files, workspace contents, agent workspaces, communication data, and authentication-file permissions in one check.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions CLAUDE.md; built for openclaw.

Part of the openclaw plugin — 31 skills, 22 commands, 4 agents, 3 hooks shipped together

Good fit Use it to audit the workspace, list agent workspaces, inspect communication channels, or examine shared memory data.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/theophiluschinomona/claude-openclaw-plugin/oc-structure
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/TheophilusChinomona/claude-openclaw-plugin

Made for: Claude Code.

Or install openclaw, the plugin that ships this one along with the rest of its 31 skills, 22 commands, 4 agents, 3 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for oc-structure

README.md
[![agentmods](https://agentmods.dev/badge/commands/theophiluschinomona/claude-openclaw-plugin/oc-structure/github.svg)](https://agentmods.dev/commands/theophiluschinomona/claude-openclaw-plugin/oc-structure)
Your own site
<a href="https://agentmods.dev/commands/theophiluschinomona/claude-openclaw-plugin/oc-structure"><img src="https://agentmods.dev/badge/commands/theophiluschinomona/claude-openclaw-plugin/oc-structure/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for oc-structure

Your own site · 80×15
<a href="https://agentmods.dev/commands/theophiluschinomona/claude-openclaw-plugin/oc-structure"><img src="https://agentmods.dev/badge/commands/theophiluschinomona/claude-openclaw-plugin/oc-structure.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 15 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 927 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00015 $0.00927
Opus 5 $0.00008 $0.00464
Sonnet 5 $0.00003 $0.00185
Haiku 4.5 $0.00002 $0.00093

Measured 9d ago against content hash e9f2be0529a8, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

oc-structure scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootlowPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

3. Flag auth files with incorrect permissions (should be chmod 600)

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

plugins/openclaw/commands/oc-structure.md · 112 lines

How it starts

The opening of the file, as written. The whole thing — 112 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/oc-structure Command

Inspect the OpenClaw workspace directory layout at ~/.openclaw/.

Arguments

Parse from $ARGUMENTS:

  • audit (default): Full workspace structure overview and health check
  • agents: List agent workspaces and their contents
  • comms: Show communication channels and recent messages
  • memory: Inspect memory/lancedb and shared knowledge

Execution

audit (default)

# Show top-level structure
ls -la ~/.openclaw/ 2>/dev/null || echo "~/.openclaw/ not found — run /oc-setup first"

# Show workspace contents
ls -la ~/.openclaw/workspace/ 2>/dev/null

# Count agent workspaces
echo "Agent workspaces:"
ls ~/.openclaw/workspace/agents-workspaces/ 2>/dev/null || echo "  (none)"

# Check key files exist
echo ""
echo "Core files:"
for f in openclaw.json models.json workspace/CLAUDE.md workspace/TASKS.json workspace/SPRINT_CURRENT.json workspace/SHARED_KNOWLEDGE.json workspace/IMPROVEMENT_BACKLOG.json; do
  [ -f ~/.openclaw/$f ] && echo "  OK: $f" || echo "  MISSING: $f"
done

# Check auth file permissions
echo ""
echo "Auth file permissions:"
find ~/.openclaw/workspace/agents-workspaces/ -name "auth-profiles.json" -exec stat -c '%a %n' {} \; 2>/dev/null || echo "  (no auth files found)"

Present a summary of what exists, what's missing, and any permission issues.

agents

# List all agent workspaces
ls -la ~/.openclaw/workspace/agents-workspaces/ 2>/dev/null || echo "No agent workspaces found"

# For each agent, show key files
for dir in ~/.openclaw/workspace/agents-workspaces/*/; do
  agent=$(basename "$dir")
  echo ""
  echo "--- $agent ---"
  ls "$dir" 2>/dev/null
  # Show role from IDENTITY.md first line
  head -3 "$dir/IDENTITY.md" 2>/dev/null
done

Present a table of agents with their roles and available files.

comms

# Show communication structure
echo "Communication channels:"
find ~/.openclaw/workspace/comms/ -type f 2>/dev/null || echo "  (none)"

# Show broadcast messages
echo ""
echo "Broadcast:"
cat ~/.openclaw/workspace/comms/broadcast.md 2>/dev/null || echo "  (no broadcast messages)"

# Show recent inbox messages per agent
for dir in ~/.openclaw/workspace/comms/*/inbox/; do
  agent=$(basename "$(dirname "$dir")")
  count=$(ls "$dir" 2>/dev/null | wc -l)
  [ "$count" -gt 0 ] && echo "  $agent inbox: $count message(s)"
done

Read the full file on GitHub · 112 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 112 lines · 15 tokens per session scan A e9f2be0529a8

Subscribe to this mod's changes

oc-structure is a command published in the GitHub repository TheophilusChinomona/claude-openclaw-plugin (2 stars, last pushed 5mo ago), licensed MIT. It adds 15 tokens to every session and 927 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.