cosense
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCosense Skill 手順書
Cosense Skill Procedure
cosenseUse the CLI to read and research Cosense pages and respond to users. Writing/deleting operations (such as page editing, adding comments, deleting pages or files, etc.) should only be performed when explicitly instructed by the user.
cosenseCosenseとはどういう物か
What is Cosense?
Cosenseは複数のページ同士をリンクさせ、複雑な情報をナレッジグラフとして表現するweb状のWiKiである。
ページ間リンクは というブラケット記法で表現する。
[ページタイトル]Cosense is a web-based Wiki that links multiple pages together to represent complex information as a knowledge graph. Inter-page links are expressed using the bracket notation .
[Page Title]Cosenseを読み解く際のTips
Tips for Understanding Cosense
- キーワード検索だけに頼らず、関連ページリストを眺めて、辿るべきだ。単独のページでは見えなかった文脈が浮かびあがる
- ナレッジグラフ上での被リンク数やページランク値が大きいページは、実質的にフォルダやカテゴリのような階層構造の親としても機能している
- 一見、観念的なページタイトルだけがあり、本文で何も説明されていなくても、他のページの文脈の中で説明されている事がある
- Don't rely solely on keyword searches; instead, browse and follow the list of related pages. Context that wasn't visible on a single page will emerge.
- Pages with a high number of incoming links or page rank values in the knowledge graph also function as parents in hierarchical structures, similar to folders or categories.
- Even if a page only has an abstract title with no explanation in its body, it may be explained in the context of other pages.
こういう時はこうする
Actions for Scenarios
調査したい時、あるいは特定のページを読みたい時
When you want to research or read a specific page
ページの読み方: read-page.md
- プロジェクト名だけ指定された時は、を projectUrl としてCLIに渡す
https://scrapbox.io/<project> - プロジェクト名+ページタイトルが指定された時は、を pageUrl としてCLIに渡す
https://scrapbox.io/<project>/<title> - プロンプト中にURLが書かれている時、URLは から最初の空白文字までが丸ごと一つ。Cosenseのタイトルは長い日本語の文章になりうる(タイトル中の空白はURL上では
https://)ので、日本語・記号・_・_/でに見える助詞も、空白が来るまで全部URLの一部。ASCII→日本語の境目で切ると、ユーザーが意図したのと別のページを読みに行ってしまうを - 記号を含むURLは shell でクォート()で囲んで渡す
'...'
How to read a page: read-page.md
- When only a project name is specified, pass as the projectUrl to the CLI
https://scrapbox.io/<project> - When a project name + page title is specified, pass as the pageUrl to the CLI
https://scrapbox.io/<project>/<title> - When a URL is included in the prompt, the entire URL from to the first whitespace character is treated as one. Cosense titles can be long Japanese sentences (spaces in titles are replaced with
https://in URLs), so Japanese characters, symbols,_, and particles that look like_should all be included as part of the URL until a whitespace is encountered. Cutting at the boundary between ASCII and Japanese will lead to accessing a different page than the user intended/ - URLs containing symbols should be enclosed in quotes () when passed in the shell
'...'
読んでいたページが見つからなくなった時、共同編集者の変更を追いたい時
When the page you were reading disappears or you want to track changes made by collaborators
変更の追い方: read-page.md の「変更を追う」を参照
- 読んでいたページが急に 404 や「未作成の空ページ」になったら、共同編集者がタイトルを変更した可能性がある
- 読んだ時に控えた pageId と commitId を使い、で何が変わったか(リネーム含む)を確認してから読み直す
browsePageChanges
How to track changes: Refer to "Track Changes" in read-page.md
- If the page you were reading suddenly becomes a 404 or an "empty uncreated page", it's possible that a collaborator changed the title
- Use the pageId and commitId you noted when reading the page to check what changed (including renaming) with before re-reading
browsePageChanges
ページを編集したい時、コメントを書き込みたい時
When you want to edit a page or add a comment
ページ編集手順: edit-page.md
- ユーザーが明示的に「書き込んで」「編集して」「コメント追記して」等を指示した時のみ
- 調査・閲覧・要約タスクでは参照しない
Page editing procedure: edit-page.md
- Only when the user explicitly instructs such as "Write", "Edit", "Add a comment", etc.
- Do not refer to this for research, browsing, or summarization tasks
ファイルをアップロードしてページに埋め込みたい時
When you want to upload a file and embed it in a page
ファイルアップロード手順: upload-file.md
- ユーザーが明示的に「この画像をアップロードして」「ファイルを貼って」「レポートに画像を埋め込んで」等を指示した時のみ
- アップロードだけで終わらせず、埋め込みまでがこの手順の範囲
File upload procedure: upload-file.md
- Only when the user explicitly instructs such as "Upload this image", "Paste the file", "Embed the image in the report", etc.
- This procedure includes embedding the file, not just uploading it
ログインしたい時、あるいは認証エラーが返ってきた時
When you want to log in or when an authentication error is returned
ログイン手順: login.md
- ユーザーから「Cosenseにログインして」と明示的に指示された時
- 認証が必要なプロジェクトに 等でアクセスし、HTTP 401 または 403 が返ってきた時
browsePage
Login procedure: login.md
- When the user explicitly instructs "Log in to Cosense"
- When accessing a project that requires authentication with etc., and an HTTP 401 or 403 error is returned
browsePage
CLIの挙動が想定と違う時
When the CLI behavior differs from expectations
バージョン互換性チェック: version-mismatch.md
- /
unknown commandエラーunknown option - 戻り値JSONの構造が手順書と違う
- の出力に手順書で参照しているコマンドが無い
--help
Version compatibility check: version-mismatch.md
- /
unknown commanderrorsunknown option - The structure of the returned JSON differs from the procedure manual
- The command referenced in the procedure manual is not present in the output
--help
CLIコマンド一覧
List of CLI Commands
CLI実行コマンド形式
CLI Execution Command Format
- を実行する
cosense <command> <args...> - 事前に でインストールしておく
npm install -g @helpfeel/cosense-cli - Node 24+ 前提
- Execute
cosense <command> <args...> - Install in advance with
npm install -g @helpfeel/cosense-cli - Requires Node 24+
コマンド一覧
Command List
| command | 用途 |
|---|---|
| login | Personal Access Token または Service Account を設定ファイルに保存する |
| whoami | 現在の認証ユーザーの情報を取得する |
| listProjects | 自分が参加しているprojectの一覧を取得する |
| browsePage | 単一ページを読む。メタデータ+アイコン記法+テロメア+Infobox+本文をAIが読みやすい形式で出力する。行permalink ( |
| browseRelatedPages | 1-hop+2-hopの関連ページタイトル一覧をAIが読みやすい形式で出力する。infobox定義ページでは文芸的データベース(TSV表)を出力する |
| browsePageChanges | ページの編集履歴(commit)をpageId起点で取得し、誰が何をどう変えたかを自然言語で説明する。タイトル変更(リネーム)も検出する |
| readPage | 単一ページを読む |
| readPageSnapshot | snapshotのIDを指定してPage History上の過去の本文を読む |
| readFileInfo | ファイルのメタデータと抽出済みテキストを取得する |
| downloadFile | ファイル本体をダウンロードしてローカルに保存する |
| uploadFile | ファイルをprojectにアップロードして埋め込みURLを取得する |
| deleteFile | ファイルをprojectから削除する |
| readProjectMembers | プロジェクトのメンバー一覧を取得する |
| listPages | プロジェクトのページ一覧を取得する |
| listPageSnapshots | ページのsnapshot一覧(Page History)をpageId起点で取得する |
| list1hopLinks | 1-hop近傍を取得する |
| list2hopLinks | 2-hop近傍を取得する |
| searchVector | ベクトル検索でページを探す(タイトル+本文中リンク記法のみ対象) |
| searchFullText | 本文全文を対象に検索する |
| search1hopLinks | 1-hop近傍を全文検索でフィルタする |
| search2hopLinks | 2-hop近傍を全文検索でフィルタする |
| previewEdit | ページ編集opsをdry-runしてpreviewIdを取得する |
| previewDelete | ページ削除をdry-runしてpreviewIdを取得する |
| submitEdit | previewEdit/previewDeleteで取得したpreviewIdを使ってページ編集・削除を確定する |
| replaceLinks | 旧タイトルへのリンク記法を新しいタイトルに一括置換する |
| command | Purpose |
|---|---|
| login | Save Personal Access Token or Service Account to the configuration file |
| whoami | Retrieve information about the currently authenticated user |
| listProjects | Retrieve a list of projects you are participating in |
| browsePage | Read a single page. Outputs metadata + icon notation + telomere + Infobox + body in a format easy for AI to read. Marks the relevant line if a line permalink ( |
| browseRelatedPages | Outputs a list of 1-hop+2-hop related page titles in a format easy for AI to read. For infobox definition pages, outputs a literary database (TSV table) |
| browsePageChanges | Retrieve the edit history (commits) of a page starting from the pageId, and explain who changed what and how in natural language. Detects title changes (renaming) |
| readPage | Read a single page |
| readPageSnapshot | Read the past body content from Page History by specifying the snapshot ID |
| readFileInfo | Retrieve file metadata and extracted text |
| downloadFile | Download the file itself and save it locally |
| uploadFile | Upload a file to the project and retrieve the embed URL |
| deleteFile | Delete a file from the project |
| readProjectMembers | Retrieve a list of project members |
| listPages | Retrieve a list of project pages |
| listPageSnapshots | Retrieve a list of page snapshots (Page History) starting from the pageId |
| list1hopLinks | Retrieve 1-hop neighbors |
| list2hopLinks | Retrieve 2-hop neighbors |
| searchVector | Search for pages using vector search (only targets titles + link notation in the body) |
| searchFullText | Perform a full-text search of the body content |
| search1hopLinks | Filter 1-hop neighbors with full-text search |
| search2hopLinks | Filter 2-hop neighbors with full-text search |
| previewEdit | Dry-run page edit ops to retrieve a previewId |
| previewDelete | Dry-run page deletion to retrieve a previewId |
| submitEdit | Use the previewId obtained from previewEdit/previewDelete to confirm page edits/deletions |
| replaceLinks | Batch replace link notation to old titles with new titles |
コマンドの詳細を知りたい時
To learn details about commands
- 全コマンド一覧と概要:
cosense --help - 個別コマンドの引数・戻り値スキーマ・HTTPエラー:
cosense <command> --help - 戻り値のJSON構造に確信が持てない時は、必ずヘルプを読んでから使う
- List of all commands and overview:
cosense --help - Arguments, return value schema, and HTTP errors for individual commands:
cosense <command> --help - If you are unsure about the JSON structure of the return value, always read the help before using the command
回答の形式
Response Format
- 情報源(ページURL)を示しながらユーザーの問いに直接答える
- 固定テンプレートは規定しない
- Directly answer the user's question while indicating the source (page URL)
- No fixed template is specified