logseq article archive

Dev Tools

Build and maintain a persistent Logseq data architecture, based on the characteristics of bidirectional link technology, divided into three layers: raw data, index files, and rule files.

Install

openclaw skills install logseq-article-archive

Logseq Data Architecture Maintainer

Overview

This skill helps users build and maintain a persistent Logseq data architecture. Based on Logseq's bidirectional link technology, data is divided into three layers: raw materials, index files, and rule files. It enables users to systematically manage knowledge, ensuring data consistency and accessibility.

Feature Highlights

  1. Three-layer Architecture Management: Maintain hierarchical structure of raw materials, index files, and rule files
  2. Document Writing Process: Read raw materials, generate index files such as summaries, entity pages, and concept pages
  3. Smart Query Functionality: Answer questions based on index files, generate various forms of answers
  4. Health Check: Regularly check the health status of the wiki, identify and fix issues
  5. Knowledge Accumulation: Transform query results and analysis into new index pages, continuously accumulate knowledge base

Architecture Design

1. Raw Materials Layer

  • Definition: User-curated collection of original files, including articles, papers, images, data files, etc.
  • Characteristics: Immutable, read by LLM but never modified, serving as the source of truth for data
  • Storage Location: Recommended to store in a dedicated raw materials directory, such as logseq/pages/

2. Index Files Layer

  • Definition: Markdown file indexes generated by LLM, including summaries, entity pages, concept pages, comparisons, overviews, syntheses, etc.
  • Characteristics: Fully owned by LLM, responsible for creation, update, and maintenance
  • Functions: Create pages, update content, maintain cross-references, ensure consistency
  • Storage Location: Stored in Logseq's pages/ directory

3. Rule Files Layer

  • Definition: Configuration files guiding LLM behavior, defining structure, conventions, and workflows
  • Characteristics: Key configuration files that enable LLM to become a disciplined index maintainer
  • Storage Location: Recommended to store in the skill's directory alongside this SKILL.md file

Usage

Input Requirements

When calling this skill, you can:

  1. Direct Question: No need to specify operation type, directly input your question, and the skill will automatically identify and process it
  2. Specify Operation Type: If specific operations are required, explicitly specify (document writing, query, health check)
  3. Provide Material Path: For document writing operations, provide the path to raw materials
  4. Specify Check Scope: For health checks, specify the scope to check

Output Content

Document Writing Operation

  • Summary Pages: Summarize the core content of raw materials
  • Entity Pages: Extract and create independent pages for related entities
  • Concept Pages: Extract and create independent pages for related concepts
  • Cross-references: Create links between related pages
  • Log Entries: Record processing steps and important findings

Query Operation

  • Comprehensive Answers: Comprehensive answers based on index files
  • Source Citations: Indicate information sources, including cited article titles and links
  • Visual Output: Generate mark pages, comparison tables, slides, etc., as needed
  • New Pages: Archive valuable answers as new index pages, following this format:
    • Frontmatter: Contains title, tags, date, etc.
    • Title: Auto-generated based on the question
    • Question Section: Clearly list user questions
    • Answer Section: Detailed answer content with hierarchical headings and lists
    • Answer Basis: Note the theoretical foundation, reference materials, and technical methods for the answer
    • Article Information: Includes category, creation time, source, and tags
  • Article Category Distinction: Clearly distinguish question-type articles from other article categories, marked in Frontmatter and article information

Health Check Operation

  • Issue Reports: Identify contradictions between pages, outdated statements, etc.
  • Improvement Suggestions: Provide specific recommendations for fixing issues
  • Resource Recommendations: Recommend resources to fill data gaps

Workflow

Document Writing Workflow

  1. LLM reads raw materials
  2. Discuss key points with user
  3. Create summary page in the index
  4. Update index pages
  5. Create/update related entity and concept pages
  6. Add processing entry to the log

Query Workflow

  1. User asks directly without specifying operation type
  2. LLM automatically identifies query content and searches related pages
  3. Read and synthesize information, generate detailed answers
  4. Cite sources and provide cross-references to related pages, noting the articles the answer is based on
  5. Generate different forms of output as needed (e.g., comparison tables, mark pages)
  6. Archive valuable answers as new pages in question-answer format, clearly distinguishing question-type articles from other categories
  7. Update relevant indexes to ensure proper categorization of new pages

Health Check Workflow

  1. LLM scans the entire index structure
  2. Identifies contradictions between pages, outdated statements, etc.
  3. Finds orphan pages with no incoming links
  4. Identifies important concepts mentioned but lacking independent pages
  5. Checks for missing cross-references
  6. Discovers data gaps that can be filled by web search
  7. Generates health check report and improvement suggestions

Best Practices

  • Absorb one material at a time: Stay engaged, read summaries, guide LLM to emphasize key points
  • Develop personal workflow: Establish a workflow that suits your style
  • Regular health checks: Ensure the index remains healthy as it grows
  • Continuously optimize rules: Evolve the rule file together with LLM over time
  • Utilize visual output: Use different forms of output as needed (mark pages, comparison tables, etc.)

Example Scenarios

Document Writing Example

User Input: "Process raw material raw-data/AI Ethics Paper.pdf, generate relevant index pages"

Output:

  • Create summary page AI Ethics Paper Summary.md
  • Create entity pages AI Ethics.md, Machine Learning Ethics.md, etc.
  • Create concept pages Algorithmic Bias.md, Privacy Protection.md, etc.
  • Update index page AI Ethics Research Index.md
  • Update main index page contents.md
  • Add processing entry to the log

Query Example

User Input: "Compare different AI ethics theories"

Output:

  • Generate comparison table AI Ethics Theories Comparison.md
  • Synthesize core viewpoints of different theories
  • Provide cross-references to related pages
  • Archive comparison results as a new page

Health Check Example

User Input: "Perform health check on the entire index"

Output:

  • Generate health check report Index Health Check Report.md
  • Identify contradictions and outdated statements between pages
  • Find orphan pages and missing concept pages
  • Provide improvement suggestions and resource recommendations

Configuration & Maintenance

  • Rule Files: Regularly update the RULES.md file to adjust LLM behavior and workflows
  • Directory Structure: Maintain a clear directory structure for easy management and querying
  • Backup Strategy: Regularly backup raw materials and index files to ensure data security
  • Version Control: Consider using version control tools like Git to manage changes to index files

Conclusion

The Logseq Data Architecture Maintainer skill helps users build and maintain a persistent, consistent, and accessible knowledge system through its three-layer architecture design. It not only enables systematic knowledge management but also ensures the quality and value of the knowledge system through intelligent queries and health checks. As usage deepens, users can evolve together with LLM to create a knowledge management system tailored to their specific field.


Logseq 数据架构维护器(中文介绍)

概述

此技能帮助用户构建和维护一个持久的 Logseq 数据架构。基于 Logseq 的双链技术特点,数据分为三层:原始资料层、目录文件层和规则文件层。它能够帮助用户系统化管理知识,确保数据的一致性和可访问性。

功能特点

  1. 三层架构管理:维护原始资料、目录文件和规则文件的分层结构
  2. 文档写入流程:读取原始资料,生成摘要、实体页、概念页等目录文件
  3. 智能查询功能:基于目录文件回答问题,生成各种形式的答案
  4. 健康检查:定期检查知识库的健康状态,识别和修复问题
  5. 知识积累:将查询结果和分析转化为新的目录页面,持续积累知识库

架构设计

1. 原始资料层

  • 定义:用户精心整理的原始文件收藏,包括文章、论文、图片、数据文件等
  • 特点:不可变,LLM从中读取但从不修改,是数据的真相来源
  • 存储位置:建议存储在专门的原始资料目录中

2. 目录文件层

  • 定义:由LLM生成的Markdown文件目录,包括摘要、实体页、概念页、比较、概述、综合等
  • 特点:LLM完全拥有这一层,负责创建、更新和维护
  • 功能:创建页面、更新内容、维护交叉引用、保持一致性
  • 存储位置:存储在 Logseq 的 pages/ 目录中

3. 规则文件层

  • 定义:指导LLM行为的配置文件,定义结构、惯例和工作流程
  • 特点:关键的配置文件,让LLM成为有纪律的目录维护者
  • 存储位置:建议存储在技能目录中,与 SKILL.md 文件同级

使用方法

输入要求

调用此技能时,您可以:

  1. 直接提问:无需指定操作类型,直接输入您的问题,技能会自动识别并处理
  2. 指定操作类型:如果需要执行特定操作,可以明确指定(文档写入、查询、健康检查)
  3. 提供资料路径:对于文档写入操作,提供原始资料的路径
  4. 指定检查范围:对于健康检查,指定要检查的范围

工作流程

文档写入流程

  1. LLM 阅读原始资料
  2. 与用户讨论关键要点
  3. 在目录中创建摘要页面
  4. 更新索引页面
  5. 创建/更新相关的实体和概念页面
  6. 在日志中添加处理条目

查询流程

  1. 用户直接提问,无需指定操作类型
  2. LLM 自动识别查询内容并搜索相关页面
  3. 阅读并综合信息,生成详细的回答
  4. 引用来源并提供相关页面的交叉引用
  5. 根据需要生成不同形式的输出(如比较表、标记页等)
  6. 将有价值的答案归档为新页面
  7. 更新相关索引,确保新页面被正确分类

健康检查流程

  1. LLM 扫描整个目录结构
  2. 识别页面间矛盾、陈旧说法等问题
  3. 发现无入站链接的孤立页面
  4. 识别提及但缺乏独立页面的重要概念
  5. 检查缺失的交叉引用
  6. 发现可用网络搜索填补的数据空白
  7. 生成健康检查报告和改进建议

最佳实践

  • 一次只吸收一个资料:保持参与,阅读摘要,指导LLM强调重点
  • 制定个人工作流程:根据自己的风格制定适合的工作流程
  • 定期健康检查:确保目录在成长过程中保持健康
  • 持续优化规则:随着时间推移,与LLM共同进化规则文件
  • 利用可视化输出:根据需要使用不同形式的输出(标记页、比较表等)

示例场景

文档写入示例

用户输入: "处理原始资料 raw-data/AI伦理论文.pdf,生成相关目录页面"

输出

  • 创建摘要页面 AI伦理论文摘要.md
  • 创建实体页面 AI伦理.md机器学习伦理.md
  • 创建概念页面 算法偏见.md隐私保护.md
  • 更新索引页面 AI伦理研究索引.md
  • 更新总索引页面 contents.md
  • 在日志中添加处理条目

查询示例

用户输入: "比较不同AI伦理理论的观点"

输出

  • 生成比较表 AI伦理理论比较.md
  • 综合不同理论的核心观点
  • 提供相关页面的交叉引用
  • 将比较结果归档为新页面

健康检查示例

用户输入: "对整个目录进行健康检查"

输出

  • 生成健康检查报告 目录健康检查报告.md
  • 识别页面间矛盾和陈旧说法
  • 发现孤立页面和缺失的概念页面
  • 提出改进建议和资源推荐

结论

Logseq 数据架构维护器技能通过三层架构设计,帮助用户构建和维护一个持久、一致、可访问的知识体系。它不仅能够系统化管理知识,还能够通过智能查询和健康检查,确保知识体系的质量和价值。随着使用的深入,用户可以与LLM共同进化,打造适合自己领域的知识管理系统。