skills/c0ntr0lledcha0s/writing-to-logseq/SKILL.md
Expert in writing data to Logseq DB graphs via HTTP API. Auto-invokes when users want to create pages, add blocks, update content, set properties, or sync conversation notes to their Logseq graph. Provides CRUD operations with safety guidelines.
npx skillsauth add aiskillstore/marketplace writing-to-logseqInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill auto-invokes when:
Write Operations: See {baseDir}/scripts/write-operations.py for the API.
| Operation | Description |
|-----------|-------------|
| create_page(title, content) | Create new page |
| create_block(parent, content) | Add block under parent |
| update_block(uuid, content) | Modify block content |
| delete_block(uuid) | Remove block |
| set_property(uuid, key, value) | Set property value |
| add_tag(uuid, tag) | Add tag/class to block |
| append_to_page(title, content) | Add content to existing page |
from write_operations import LogseqWriter
writer = LogseqWriter()
# Create simple page
page = writer.create_page("Meeting Notes 2024-01-15")
# Create page with initial content
page = writer.create_page(
"Project Alpha",
content="Project overview and tasks",
properties={"status": "Active", "priority": "High"}
)
# Add block to a page
block = writer.create_block(
parent="page-uuid-or-title",
content="New task item"
)
# Add nested block
child = writer.create_block(
parent=block["uuid"],
content="Sub-task details"
)
# Update block content
writer.update_block(
uuid="block-uuid",
content="Updated content here"
)
# Append to existing page
writer.append_to_page(
title="Daily Notes",
content="- New item added via API"
)
# Set single property
writer.set_property(
uuid="block-uuid",
key="status",
value="Complete"
)
# Set typed property
writer.set_property(
uuid="block-uuid",
key="rating",
value=5,
type="number"
)
# Set multiple properties
writer.set_properties(
uuid="block-uuid",
properties={
"author": "John Doe",
"rating": 5,
"published": "2024-01-15"
}
)
# Add tag to block
writer.add_tag(uuid="block-uuid", tag="Book")
# Add multiple tags
writer.add_tags(uuid="block-uuid", tags=["Important", "Review"])
{
"method": "logseq.Editor.createPage",
"args": ["PageTitle", {"property": "value"}, {"createFirstBlock": true}]
}
{
"method": "logseq.Editor.insertBlock",
"args": ["parent-uuid", "Block content", {"sibling": false}]
}
{
"method": "logseq.Editor.updateBlock",
"args": ["block-uuid", "New content"]
}
{
"method": "logseq.Editor.upsertBlockProperty",
"args": ["block-uuid", "property-name", "value"]
}
{
"method": "logseq.Editor.removeBlock",
"args": ["block-uuid"]
}
# Logseq supports markdown in blocks
writer.create_block(
parent=page_uuid,
content="""
## Section Header
- Bullet point
- Another point
- Nested item
**Bold** and *italic* work too.
[[Link to Page]] and #tags
"""
)
# Properties can be set in content
writer.create_block(
parent=page_uuid,
content="""
- Task item
status:: In Progress
priority:: High
due:: [[2024-01-20]]
"""
)
# Or via API (preferred for typed values)
writer.set_property(uuid, "rating", 5) # number
writer.set_property(uuid, "done", True) # checkbox
def sync_conversation_to_logseq(title, notes):
"""Sync conversation notes to Logseq page."""
writer = LogseqWriter()
# Create or get page
page = writer.get_or_create_page(f"Claude Notes/{title}")
# Add timestamp header
from datetime import datetime
timestamp = datetime.now().strftime("%Y-%m-%d %H:%M")
writer.append_to_page(
title=f"Claude Notes/{title}",
content=f"""
## {timestamp}
{notes}
---
"""
)
return page
try:
page = writer.create_page("My Page")
except writer.ConnectionError:
print("Cannot connect to Logseq")
except writer.DuplicateError:
print("Page already exists")
except writer.ValidationError as e:
print(f"Invalid data: {e}")
{baseDir}/references/write-operations.md for all operations{baseDir}/references/safety-guidelines.md for safety practices{baseDir}/templates/page-template.md for page templatesdevelopment
Apple Human Interface Guidelines for content display components. Use this skill when the user asks about charts component, collection view, image view, web view, color well, image well, activity view, lockup, data visualization, content display, displaying images, rendering web content, color pickers, or presenting collections of items in Apple apps. Also use when the user says how should I display charts, what's the best way to show images, should I use a web view, how do I build a grid of items, what component shows media, or how do I present a share sheet. Cross-references: hig-foundations for color/typography/accessibility, hig-patterns for data visualization patterns, hig-components-layout for structural containers, hig-platforms for platform-specific component behavior.
tools
Automate HelpDesk tasks via Rube MCP (Composio): list tickets, manage views, use canned responses, and configure custom fields. Always search tools first for current schemas.
testing
Expert Haskell engineer specializing in advanced type systems, pure functional design, and high-reliability software. Use PROACTIVELY for type-level programming, concurrency, and architecture guidance.
tools
GraphQL gives clients exactly the data they need - no more, no less. One endpoint, typed schema, introspection. But the flexibility that makes it powerful also makes it dangerous. Without proper controls, clients can craft queries that bring down your server. This skill covers schema design, resolvers, DataLoader for N+1 prevention, federation for microservices, and client integration with Apollo/urql. Key insight: GraphQL is a contract. The schema is the API documentation. Design it carefully.