Productivity
cosense avatar

cosense

A comprehensive automation skill for Cosense (formerly Scrapbox) enabling page reading, searching, creating, and safe editing via API.

Introduction

The cosense skill is a robust toolkit designed for users of the Cosense (formerly Scrapbox) knowledge management platform. It facilitates seamless interaction between an AI agent and your project data by wrapping the Cosense API into an easy-to-use command-line interface. This skill is ideal for power users and developers looking to automate personal knowledge base maintenance, synchronize documentation, or integrate Cosense into broader research and note-taking workflows. It requires the configuration of environment variables like COSENSE_SID and COSENSE_PROJECT to authenticate and target specific projects.

  • Perform granular page operations including reading entire pages as JSON or plain text and listing project content.

  • Search across your entire project using keywords directly through the agent interface.

  • Create new pages safely by automatically checking for title conflicts before execution.

  • Update existing pages using the secure safe-import protocol, which enforces full-content handling to prevent accidental data loss.

  • Execute automated backups before every write operation and store them in a designated directory for easy restoration.

  • Generate diff-style previews before modifications, allowing you to review changes and obtain explicit user approval.

  • The skill relies on the secure import API, which treats page content as a complete overwrite; users must ensure all lines are preserved when editing to avoid deletions.

  • API request sizes are limited to 30MB, which covers the vast majority of standard page imports.

  • Ensure that COSENSE_SID and COSENSE_PROJECT are correctly exported in your shell environment files like ~/.zshenv or ~/.zshrc for consistent agent access.

  • The tool uses the Cosense project structure where the first line of an import is treated as the page title; adherence to this syntax is critical for valid operations.

  • Frequent backups are highly recommended and are automated via the built-in backup and list-backups commands to ensure project integrity.

Repository Stats

Stars
0
Forks
0
Open Issues
0
Language
Python
Default Branch
main
Sync Status
Idle
Last Synced
May 3, 2026, 10:52 PM
View on GitHub