logseq
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseLogseq Skill
Logseq Skill
Overview
概述
Claude can manage your Logseq graph to capture thoughts, build connections, and maintain a local-first knowledge base. An outliner with bidirectional links for networked thinking.
Claude可以管理你的Logseq图谱,捕捉想法、建立关联,并维护一个本地优先的知识库。这是一个支持双向链接的大纲工具,助力网络化思考。
Quick Install
快速安装
bash
curl -sSL https://canifi.com/skills/logseq/install.sh | bashOr manually:
bash
cp -r skills/logseq ~/.canifi/skills/bash
curl -sSL https://canifi.com/skills/logseq/install.sh | bash或者手动安装:
bash
cp -r skills/logseq ~/.canifi/skills/Setup
配置
Configure via canifi-env:
bash
undefined通过canifi-env进行配置:
bash
undefinedFirst, ensure canifi-env is installed:
首先,确保已安装canifi-env:
curl -sSL https://canifi.com/install.sh | bash
curl -sSL https://canifi.com/install.sh | bash
canifi-env set LOGSEQ_EMAIL "your-email@example.com"
undefinedcanifi-env set LOGSEQ_EMAIL "your-email@example.com"
undefinedPrivacy & Authentication
隐私与认证
Your credentials, your choice. Canifi LifeOS respects your privacy.
你的凭证,由你掌控。 Canifi LifeOS尊重你的隐私。
Option 1: Manual Browser Login (Recommended)
选项1:手动浏览器登录(推荐)
If you prefer not to share credentials with Claude Code:
- Complete the Browser Automation Setup using CDP mode
- Login to the service manually in the Playwright-controlled Chrome window
- Claude will use your authenticated session without ever seeing your password
如果你不想与Claude Code共享凭证:
- 使用CDP模式完成浏览器自动化配置
- 在Playwright控制的Chrome窗口中手动登录该服务
- Claude将使用你的已认证会话,全程不会获取你的密码
Option 2: Environment Variables
选项2:环境变量
If you're comfortable sharing credentials, you can store them locally:
bash
canifi-env set SERVICE_EMAIL "your-email"
canifi-env set SERVICE_PASSWORD "your-password"Note: Credentials stored in canifi-env are only accessible locally on your machine and are never transmitted.
如果你愿意共享凭证,可以将其存储在本地:
bash
canifi-env set SERVICE_EMAIL "your-email"
canifi-env set SERVICE_PASSWORD "your-password"注意:存储在canifi-env中的凭证仅能在你的本地机器上访问,绝不会被传输。
Capabilities
功能特性
- Create journal entries and pages
- Build bidirectional links
- Create block references
- Use advanced queries
- Set up flashcards (spaced repetition)
- Create TODO items
- Add properties to blocks
- Use templates
- Build whiteboards
- Create namespaced pages
- View graph overview
- Export and sync content
- 创建日记条目和页面
- 建立双向链接
- 创建块引用
- 使用高级查询
- 设置闪卡(间隔重复)
- 创建待办事项
- 为块添加属性
- 使用模板
- 创建白板
- 创建命名空间页面
- 查看图谱概览
- 导出和同步内容
Usage Examples
使用示例
Example 1: Add to Journal
示例1:添加到日记
User: "Add 'Read chapter 3 of Atomic Habits' to today's Logseq journal"
Claude: Opens journal, adds block with content.
Confirms: "Added to today's journal"用户:“将‘阅读《原子习惯》第3章’添加到今日的Logseq日记中”
Claude:打开日记,添加包含该内容的块。
确认:“已添加到今日日记”Example 2: Create Page
示例2:创建页面
User: "Create a page for [[Project Alpha]] with key details"
Claude: Creates page with title and initial content.
Returns: "Created Project Alpha page"用户:“为[[Project Alpha]]创建一个页面,并添加关键详情”
Claude:创建带有标题和初始内容的页面。
返回:“已创建Project Alpha页面”Example 3: Query Notes
示例3:查询笔记
User: "Find all my TODOs from this month"
Claude: Runs query for TODO items.
Reports: "15 TODOs found: Review proposal, Update docs..."用户:“查找我本月所有的待办事项”
Claude:运行待办事项查询。
反馈:“找到15条待办事项:审核提案、更新文档...”Example 4: Create Flashcard
示例4:创建闪卡
User: "Create a flashcard for the definition of Machine Learning"
Claude: Creates block with flashcard syntax.
Confirms: "Flashcard created for spaced repetition"用户:“为机器学习的定义创建一张闪卡”
Claude:使用闪卡语法创建块。
确认:“已创建用于间隔重复的闪卡”Authentication Flow
认证流程
- Claude navigates to Logseq web/cloud via Playwright MCP
- Enters LOGSEQ_EMAIL for authentication
- Handles 2FA if required (notifies user via iMessage)
- Maintains session for graph operations
- Claude通过Playwright MCP导航至Logseq网页/云端版本
- 输入LOGSEQ_EMAIL进行认证
- 如需处理双因素认证(通过iMessage通知用户)
- 维护会话以进行图谱操作
Selectors Reference
选择器参考
javascript
// Journal page
'.journal'
// Block
'.block-container'
// Block content
'.block-editor'
// Page title
'.page-title'
// Left sidebar
'.left-sidebar'
// Search
'.search-input'
// Graph view
'.graph-view'
// Properties
'.block-properties'
// TODO marker
'.todo-marker'
// Linked references
'.references'javascript
// 日记页面
'.journal'
// 块
'.block-container'
// 块内容
'.block-editor'
// 页面标题
'.page-title'
// 左侧边栏
'.left-sidebar'
// 搜索
'.search-input'
// 图谱视图
'.graph-view'
// 属性
'.block-properties'
// 待办标记
'.todo-marker'
// 关联引用
'.references'Logseq Syntax
Logseq语法
[[Page Link]] // Link to page
((block-id)) // Block reference
#tag // Tag
TODO // Task item
DONE // Completed task
property:: value // Block property
/template // Insert template
{{query [[tag]]}} // Query blocks
{{embed [[page]]}} // Embed page
#card // Flashcard[[Page Link]] // 链接到页面
((block-id)) // 块引用
#tag // 标签
TODO // 任务项
DONE // 已完成任务
property:: value // 块属性
/template // 插入模板
{{query [[tag]]}} // 查询块
{{embed [[page]]}} // 嵌入页面
#card // 闪卡Error Handling
错误处理
- Login Failed: Retry 3 times, notify user via iMessage
- Session Expired: Re-authenticate automatically
- Page Not Found: Create page or ask user
- Query Error: Check query syntax, suggest fix
- Sync Failed: Wait and retry
- Graph Corrupt: Suggest rebuild
- 登录失败:重试3次,通过iMessage通知用户
- 会话过期:自动重新认证
- 页面未找到:创建页面或询问用户
- 查询错误:检查查询语法,建议修复方案
- 同步失败:等待并重试
- 图谱损坏:建议重建
Self-Improvement Instructions
自我优化说明
When you learn a better way to accomplish a task with Logseq:
- Document the improvement in your response
- Suggest updating this skill file with the new approach
- Include specific query patterns
- Note useful template configurations
当你掌握了使用Logseq完成任务的更优方法时:
- 在回复中记录该优化点
- 建议使用新方法更新此技能文件
- 包含具体的查询模式
- 记录实用的模板配置
Notes
注意事项
- Local-first with optional sync
- Outline-based structure
- Bidirectional links automatic
- Advanced queries for filtering
- Flashcards for learning
- Whiteboards for visual thinking
- PDF annotation support
- Plugin ecosystem available
- 本地优先,支持可选同步
- 基于大纲的结构
- 自动生成双向链接
- 高级查询用于筛选
- 闪卡助力学习
- 白板支持可视化思考
- 支持PDF批注
- 拥有插件生态系统