360 Secure SkillHub
360 安全技能中心

Document Manager

该 Skill 提供文档集中管理能力:按时间戳创建文档目录,生成 README.md 元数据、content.md 正文与 index.json 跟踪文件,维护可检索的 INDEX.md 总索引,支持列出、更新(生成新版本目录)与归档文档,并返回文档访问地址。依赖本地 Python 脚本与固定端口的 Markdown 服务器。

171622474
171622474
热度 78.30
最近更新 2026-05-20 03:33:19
分类:知识依赖:读写文件 / 代码执行应用场景:报告撰写 / 工作流 / 模板 / 笔记整理

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add doc-manager
Metadata
name
doc-manager
description
Manage document generation, storage, and tracking with automatic URL generation. Use when creating professional documents, reports, analyses, guides, or any content that needs to be stored with metadata, indexed, and accessed via URL. Automatically creates timestamped document folders, metadata files, maintains searchable index, and returns direct access URLs.

Document Manager

Centralized document management system for creating, storing, tracking, and accessing professional documents with automatic URL generation.

Quick Start

When generating a document:

  1. Specify document type (Report, Analysis, Guide, etc.)
  2. Provide title and content
  3. System creates folder with metadata automatically
  4. Return URL for immediate preview

Core Workflow

Document Creation

Each document gets a timestamped folder:

docs/
└── doc-{YYYYMMDD}-{slug}/
    ├── README.md          # Metadata & description
    ├── content.md         # Main content (markdown)
    └── index.json         # Tracking data (JSON)

Metadata Format (README.md)

# Document Title

**Type:** Report / Analysis / Guide / etc.
**Created:** 2026-03-30 15:50 GMT+8
**Purpose:** What this document is about
**Status:** Draft / Final / Archived

## Quick Summary
- Key point 1
- Key point 2

URL Access Pattern

All documents accessible via:

http://45.197.148.41:18792/docs/doc-{YYYYMMDD}-{slug}/content.md

Example:

http://45.197.148.41:18792/docs/doc-20260330-deployment-guide/content.md

Master Index

View all documents at:

http://45.197.148.41:18792/docs/INDEX.md

Common Tasks

Generate New Document

Tell me:

  • Document type (Report, Analysis, Guide, Proposal, etc.)
  • Title
  • Content

I will:

  1. Create timestamped folder
  2. Generate README.md with metadata
  3. Store content in content.md
  4. Create index.json for tracking
  5. Update INDEX.md
  6. Return the URL

List All Documents

Ask: "你目前都有哪些文档?"

I will read docs/INDEX.md and show all available documents with direct links.

Update Existing Document

Request changes to any document. I will:

  1. Create a new version folder (new timestamp)
  2. Apply changes
  3. Update INDEX.md
  4. Return new URL

Archive Old Documents

Move outdated documents to docs/archive/ and remove from INDEX.md.

Best Practices

  • Metadata is mandatory - Every document needs clear README.md
  • Descriptive slugs - Use meaningful names (e.g., quarterly-report-q1, not doc1)
  • Keep index current - INDEX.md updated immediately after creation
  • Version by timestamp - New versions get new timestamps, old versions stay accessible
  • Archive regularly - Move outdated docs to archive folder

File Structure

/home/node/clawd/
├── docs/
│   ├── INDEX.md                         # Master index
│   ├── doc-20260330-deployment-guide/
│   │   ├── README.md                    # Metadata
│   │   ├── content.md                   # Main content
│   │   └── index.json                   # Tracking
│   ├── doc-20260330-test/
│   │   ├── README.md
│   │   ├── content.md
│   │   └── index.json
│   └── archive/                         # Old versions
├── skills/doc-manager/
│   ├── SKILL.md                         # This file
│   └── scripts/doc-manager.py           # Management script
└── md-server.js                         # Markdown server (port 18792)

Server Configuration

Integration Points

When you request a document:

  1. I create the folder structure
  2. Generate all metadata files
  3. Write content
  4. Update master index
  5. Send you the direct URL

You can:

  • Click URL to preview immediately
  • Ask for document list anytime
  • Request updates to any document
  • Archive old versions