skills$openclaw/project-tree
lachlanglasgow6.3k

by lachlanglasgow

project-tree – OpenClaw Skill

project-tree is an OpenClaw Skills integration for coding workflows. Generate a visual directory tree of the ~/projects folder and update MEMORY.md with the result. Use when the user wants to view, update, or generate a project tree structure, or when they mention "project tree", "tree view", "folder structure", or "show me my projects".

6.3k stars4.8k forksSecurity L1
Updated Feb 7, 2026Created Feb 7, 2026coding

Skill Snapshot

nameproject-tree
descriptionGenerate a visual directory tree of the ~/projects folder and update MEMORY.md with the result. Use when the user wants to view, update, or generate a project tree structure, or when they mention "project tree", "tree view", "folder structure", or "show me my projects". OpenClaw Skills integration.
ownerlachlanglasgow
repositorylachlanglasgow/project-tree
languageMarkdown
licenseMIT
topics
securityL1
installopenclaw add @lachlanglasgow/project-tree
last updatedFeb 7, 2026

Maintainer

lachlanglasgow

lachlanglasgow

Maintains project-tree in the OpenClaw Skills directory.

View GitHub profile
File Explorer
4 files
.
scripts
project-tree.js
5.8 KB
_meta.json
462 B
SKILL.md
2.9 KB
SKILL.md

name: project-tree description: Generate a visual directory tree of the ~/projects folder and update MEMORY.md with the result. Use when the user wants to view, update, or generate a project tree structure, or when they mention "project tree", "tree view", "folder structure", or "show me my projects".

Project Tree

Overview

Generate a visual tree structure of the ~/projects directory and automatically update MEMORY.md with the current project organization. The tree shows folders and .md files only, with smart grouping for consecutive numbered items.

Usage

Run the tree generation script:

node ~/clawd/skills/project-tree/scripts/project-tree.js

Or use the convenience wrapper:

~/clawd/scripts/update-tree

Features

  • Folder-only + .md files: Only displays directories and markdown files, hiding code files and dependencies
  • Smart grouping: Detects consecutive numbered sequences (e.g., script1-video, script2-video...) and collapses them into script[1-28]-video/ (28 items)
  • Auto-updates MEMORY.md: The tree is automatically inserted into the PROJECT_TREE section of MEMORY.md
  • Configurable depth: Default is 3 levels deep (adjustable in script)

Configuration

Edit these values in scripts/project-tree.js:

  • MAX_DEPTH: Number of directory levels to display (default: 3)
  • EXCLUDE_DIRS: Directories to skip (node_modules, .git, etc.)
  • ROOT_DIR: Base directory to scan (default: ~/projects)

Automation (Hook)

You can automate project tree updates to run on every session /reset.

1. Enable Internal Hooks

Add to your clawdbot.json:

{
  "hooks": {
    "internal": {
      "enabled": true
    }
  }
}

2. Create the Hook

Create ~/.clawdbot/hooks/reset-project-tree/HOOK.md:

---
name: reset-project-tree
description: "Generate project tree on session reset"
metadata: {"clawdbot":{"emoji":"🌳","events":["command:reset"],"requires":{"bins":["node"]}}}
---

Generates project tree when /reset is issued.

Create ~/.clawdbot/hooks/reset-project-tree/handler.ts:

import { execSync } from 'child_process';
import type { HookHandler } from '../../../src/hooks/hooks.js';

const handler: HookHandler = async (event) => {
  if (event.type !== 'command' || event.action !== 'reset') return;

  try {
    const scriptPath = `${event.context.workspaceDir}/skills/project-tree/scripts/project-tree.js`;
    execSync(`node ${scriptPath}`, { cwd: event.context.workspaceDir, stdio: 'pipe' });
    console.log('[reset-project-tree] Updated');
  } catch (err) {
    console.error('[reset-project-tree] Failed:', err instanceof Error ? err.message : String(err));
  }
};

export default handler;

3. Enable and Restart

clawdbot hooks enable reset-project-tree
clawdbot gateway restart

Resources

scripts/

  • project-tree.js - Main tree generation script with smart grouping logic
README.md

No README available.

Permissions & Security

Security level L1: Low-risk skills with minimal permissions. Review inputs and outputs before running in production.

Requirements

  • OpenClaw CLI installed and configured.
  • Language: Markdown
  • License: MIT
  • Topics:

Configuration

Edit these values in `scripts/project-tree.js`: - `MAX_DEPTH`: Number of directory levels to display (default: 3) - `EXCLUDE_DIRS`: Directories to skip (node_modules, .git, etc.) - `ROOT_DIR`: Base directory to scan (default: ~/projects)

FAQ

How do I install project-tree?

Run openclaw add @lachlanglasgow/project-tree in your terminal. This installs project-tree into your OpenClaw Skills catalog.

Does this skill run locally or in the cloud?

OpenClaw Skills execute locally by default. Review the SKILL.md and permissions before running any skill.

Where can I verify the source code?

The source repository is available at https://github.com/openclaw/skills/tree/main/skills/lachlanglasgow/project-tree. Review commits and README documentation before installing.