thalo
npx skills add https://github.com/rejot-dev/thalo --skill thalo
Agent 安装分布
Skill 文档
Thalo
Quick start workflow
- Initialize a knowledge base with
thalo initto generateentities.thalo,AGENTS.md, andpersonal-bio.md. - Add or edit entries in
*.thalofiles or fenced code blocks inside Markdown (lang:thalo). - Validate after changes with
thalo checkto catch schema, link, and syntax issues. - Format with
thalo formatwhen preparing a commit or cleanup (or use Prettier with the plugin) - Run
thalo actualizeto materialize syntheses (queries + prompt) for LLM use.
Entry syntax
Follow this structure:
{timestamp} {directive} {entity} "Title" [^link-id] [#tags...]
{key}: {value}
...
# Section
{content}
Guidelines:
- Use ISO 8601 local time with timezone, e.g.
2026-01-05T15:30Z. - Use
createfor new entries andupdatefor modifications. - Provide a stable
^link-idwhen you want to reference the entry elsewhere. - Put all content inside sections; required sections are defined in
entities.thalo. - Entities are typically
journal,opinion,reference, orlore(seeentities.thalo).
Metadata
Metadata fields are indented key-value pairs. Values can be:
- Strings:
author: "Jane Doe"or unquotedauthor: Jane Doe - Links:
subject: ^selforrelated: ^my-other-entry - Dates:
published: 2023-03-16 - Date ranges:
date: 2020 ~ 2021
Sections
Content sections start with # SectionName (indented). All content must be within a section.
Each entity type defines which sections are required/optional in entities.thalo.
Defining entities
Define or update entities in entities.thalo using define-entity blocks. Each entity specifies:
- Metadata fields with types (
string,link,datetime,date-range, enums, arrays, unions). - Sections that determine required/optional content.
After editing or adding entries or entities, generally run thalo check to validate.
If you need the default entity templates, load references/entities.thalo.txt.
Syntheses
Syntheses are queries plus prompts that let you generate structured summaries or narratives.
- Create with
define-synthesisblocks. - Use
sources:to select entries by entity, tag, or metadata filters. - Run
thalo actualizeto output the sources and prompt for downstream LLM use.
Working in Markdown
Thalo can live inside Markdown files. The fenced code block language SHOULD be thalo (don’t use it
in this file as an example because it would be parsed):
```text
...entries...
```
The CLI and LSP will parse fenced thalo blocks in .md files.
Installation
If thalo is not available, install via the user’s package manager (local or global):
# Local (recommended for repo tooling)
npm install --save-dev @rejot-dev/thalo-cli
# Or with your preferred PM:
pnpm add -D @rejot-dev/thalo-cli
yarn add -D @rejot-dev/thalo-cli
# Global (optional)
npm install -g @rejot-dev/thalo-cli
Prettier integration
This repo uses the Thalo Prettier plugin. The config is in prettier.config.mjs and includes:
plugins: ["@rejot-dev/thalo-prettier"];
Use thalo format for CLI formatting, or run Prettier normally and it will format Thalo/Markdown
with the plugin enabled.
CLI reference (condensed)
thalo init [directory](options:--dry-run,--force) createsentities.thalo,AGENTS.md,personal-bio.md.thalo check [paths...]validates syntax, metadata, sections, links, enums. Options include--format,--severity,--max-warnings,--rule,--watch,--file-type.thalo format [paths...]formats.thaloand.md(options:--check,--write,--file-type).thalo actualize [links...]outputs pending synthesis updates and prompts. Supports-ifor custom instructions templates. Tracks changes via git or timestamps.thalo query "<query>" [paths...]filters by entity, tags, links, metadata. Options:--format,--limit.thalo rules listshows validation rules (filter by--severity,--category,--json).thalo lspstarts the language server (stdio).- Global:
--help,--version.
References
- Use
references/entities.thalo.txtfor the default entity definitions fromthalo init. - Use
references/example-entries.thalo.txtfor sample entries. - Use
references/scripting-api.mdfor the scripting API summary. - Use
date -u +"%Y-%m-%dT%H:%MZ"to generate timestamps quickly.