Skip to content

Commit 36e48a7

Browse files
authored
doc: add skills documentation (#73)
* doc: add skills documentation * doc: add skills documentation
1 parent 786b1ec commit 36e48a7

4 files changed

Lines changed: 171 additions & 44 deletions

File tree

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
---
2+
sidebar_position: 3
3+
---
4+
5+
# Skills
6+
7+
Hindsight provides an Agent Skill that gives AI coding assistants persistent memory across sessions. Skills are reusable prompt templates that agents can load when needed to gain specialized capabilities.
8+
9+
## Supported Platforms
10+
11+
| Platform | Skills Directory |
12+
|----------|-----------------|
13+
| [Claude Code](https://docs.anthropic.com/en/docs/claude-code) | `~/.claude/skills/` |
14+
| [OpenCode](https://github.com/opencode-ai/opencode) | `~/.opencode/skills/` |
15+
| [Codex CLI](https://github.com/openai/codex) | `~/.codex/skills/` |
16+
17+
## Quick Install
18+
19+
```bash
20+
curl -fsSL https://hindsight.vectorize.io/get-skill | bash
21+
```
22+
23+
The installer will:
24+
1. Prompt you to select your AI coding assistant
25+
2. Run the LLM provider configuration
26+
3. Install the skill to the appropriate directory
27+
28+
### Install for a Specific Platform
29+
30+
```bash
31+
# Claude Code
32+
curl -fsSL https://hindsight.vectorize.io/get-skill | bash -s -- --app claude
33+
34+
# OpenCode
35+
curl -fsSL https://hindsight.vectorize.io/get-skill | bash -s -- --app opencode
36+
37+
# Codex CLI
38+
curl -fsSL https://hindsight.vectorize.io/get-skill | bash -s -- --app codex
39+
```
40+
41+
## What the Skill Provides
42+
43+
Once installed, your AI assistant gains the ability to:
44+
45+
- **Retain** - Store user preferences, learnings, and procedure outcomes
46+
- **Recall** - Search for relevant context before starting tasks
47+
- **Reflect** - Synthesize memories into contextual answers
48+
49+
The skill uses the `hindsight-embed` CLI which runs a lightweight local daemon with an embedded database.
50+
51+
## How Skills Work
52+
53+
Skills are **model-invoked**, meaning the AI assistant automatically decides when to use them based on the context of your conversation. You don't need to explicitly trigger the skill.
54+
55+
The assistant will:
56+
- **Store** when you share preferences, when tasks succeed/fail, or when learnings emerge
57+
- **Recall** before starting non-trivial tasks to get relevant context
58+
59+
### What Gets Stored
60+
61+
The skill is optimized to store:
62+
63+
| Category | Examples |
64+
|----------|----------|
65+
| **User Preferences** | Coding style, tool preferences, language choices |
66+
| **Procedure Outcomes** | Commands that worked, configurations that resolved issues |
67+
| **Learnings** | Bug solutions, workarounds, architecture decisions |
68+
69+
## Architecture
70+
71+
```
72+
AI Coding Assistant
73+
74+
75+
Hindsight Skill (SKILL.md)
76+
77+
78+
hindsight-embed CLI
79+
80+
81+
Local Daemon (auto-started)
82+
83+
84+
Embedded PostgreSQL (~/.pg0/hindsight-embed/)
85+
```
86+
87+
All data stays on your machine. The daemon auto-starts when needed and shuts down after inactivity.
88+
89+
## Configuration
90+
91+
The skill uses configuration stored in `~/.hindsight/config.env`. Reconfigure anytime:
92+
93+
```bash
94+
uvx hindsight-embed configure
95+
```
96+
97+
## Troubleshooting
98+
99+
### Skill not activating
100+
101+
The skill activates based on its description matching your request. Try being explicit:
102+
- "Remember that..." triggers storage
103+
- "What do you know about..." triggers recall
104+
105+
### Daemon issues
106+
107+
```bash
108+
uvx hindsight-embed daemon status
109+
uvx hindsight-embed daemon logs
110+
```
111+
112+
### Reconfigure
113+
114+
```bash
115+
uvx hindsight-embed configure
116+
```
117+
118+
## Requirements
119+
120+
- Python 3.10+ (for `uvx`)
121+
- An LLM API key (OpenAI, Anthropic, Groq, etc.)

hindsight-docs/sidebars.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,11 @@ const sidebars: SidebarsConfig = {
172172
id: 'sdks/integrations/litellm',
173173
label: 'LiteLLM',
174174
},
175+
{
176+
type: 'doc',
177+
id: 'sdks/integrations/skills',
178+
label: 'Skills',
179+
},
175180
],
176181
},
177182
],

hindsight-docs/static/get-skill

Lines changed: 40 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -65,77 +65,78 @@ print_banner() {
6565
# Embedded SKILL.md content
6666
SKILL_CONTENT='---
6767
name: hindsight
68-
description: Give your agent persistent memory that works like human memory. Store facts, preferences, and context that persist across sessions.
68+
description: Store user preferences, learnings from tasks, and procedure outcomes. Use to remember what works and recall context before new tasks.
6969
---
7070
7171
# Hindsight Memory Skill
7272
73-
You have access to persistent memory via the `hindsight-embed` CLI. Use it to remember important information about the user and recall it when relevant.
74-
75-
## Setup (first time only)
76-
77-
Run: `uvx hindsight-embed configure`
78-
79-
This will configure your LLM provider and start a local daemon that manages your memory bank.
73+
You have persistent memory via the `hindsight-embed` CLI. **Proactively store learnings and recall context** to provide better assistance.
8074
8175
## Commands
8276
83-
The CLI uses a bank ID to organize memories. Use `default` for general memories or create project-specific banks.
84-
8577
### Store a memory
8678
87-
Use `memory retain` to store important facts, preferences, decisions, or context:
79+
Use `memory retain` to store what you learn:
8880
8981
```bash
90-
uvx hindsight-embed memory retain default "User prefers dark mode for all UIs"
91-
uvx hindsight-embed memory retain default "Project uses Python 3.11 with FastAPI" --context work
92-
uvx hindsight-embed memory retain myproject "API uses JWT authentication"
82+
uvx hindsight-embed memory retain default "User prefers TypeScript with strict mode"
83+
uvx hindsight-embed memory retain default "Running tests requires NODE_ENV=test" --context procedures
84+
uvx hindsight-embed memory retain default "Build failed when using Node 18, works with Node 20" --context learnings
9385
```
9486
9587
### Recall memories
9688
97-
Use `memory recall` to search for relevant memories before starting tasks:
89+
Use `memory recall` BEFORE starting tasks to get relevant context:
9890
9991
```bash
100-
uvx hindsight-embed memory recall default "What are the user'"'"'s UI preferences?"
101-
uvx hindsight-embed memory recall default "What tech stack does this project use?"
92+
uvx hindsight-embed memory recall default "user preferences for this project"
93+
uvx hindsight-embed memory recall default "what issues have we encountered before"
10294
```
10395
10496
### Reflect on memories
10597
106-
Use `memory reflect` for contextual answers that synthesize multiple memories:
98+
Use `memory reflect` to synthesize context:
10799
108100
```bash
109-
uvx hindsight-embed memory reflect default "How should I set up the dev environment?"
101+
uvx hindsight-embed memory reflect default "How should I approach this task based on past experience?"
110102
```
111103
112-
### Other commands
104+
## IMPORTANT: When to Store Memories
113105
114-
```bash
115-
uvx hindsight-embed bank list # List all memory banks
116-
uvx hindsight-embed daemon status # Check daemon status
117-
uvx hindsight-embed --help # Full CLI help
118-
```
106+
**Always store** after you learn something valuable:
107+
108+
### User Preferences
109+
- Coding style (indentation, naming conventions, language preferences)
110+
- Tool preferences (editors, linters, formatters)
111+
- Communication preferences
112+
- Project conventions
113+
114+
### Procedure Outcomes
115+
- Steps that successfully completed a task
116+
- Commands that worked (or failed) and why
117+
- Workarounds discovered
118+
- Configuration that resolved issues
119119
120-
## When to Use
120+
### Learnings from Tasks
121+
- Bugs encountered and their solutions
122+
- Performance optimizations that worked
123+
- Architecture decisions and rationale
124+
- Dependencies or version requirements
121125
122-
### Store memories when you learn:
123-
- User preferences (coding style, tools, UI preferences)
124-
- Project context (tech stack, architecture decisions)
125-
- Personal information the user shares (name, role, company)
126-
- Important decisions or outcomes
126+
## IMPORTANT: When to Recall Memories
127127
128-
### Recall memories when:
129-
- Starting a new task (get relevant context first)
130-
- Making decisions that should consider user preferences
131-
- Working on a project where past context would help
128+
**Always recall** before:
129+
- Starting any non-trivial task
130+
- Making decisions about implementation
131+
- Suggesting tools, libraries, or approaches
132+
- Writing code in a new area of the project
132133
133134
## Best Practices
134135
135-
1. **Be specific**: Store "User prefers 2-space indentation" not "User has preferences"
136-
2. **Recall first**: Before starting tasks, recall relevant context
137-
3. **Use context tags**: Organize with `--context` (work, personal, preferences)
138-
4. **Use project banks**: Create separate banks for different projects
136+
1. **Store immediately**: When you discover something, store it right away
137+
2. **Be specific**: Store "npm test requires --experimental-vm-modules flag" not "tests need a flag"
138+
3. **Include outcomes**: Store what worked AND what did not work
139+
4. **Recall first**: Always check for relevant context before starting work
139140
'
140141

141142
# Get skills directory for app (bash 3.x compatible)

uv.lock

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)