Skip to content

Commit 0544ee6

Browse files
committed
Add vardoger-analyze skill
Made-with: Cursor
1 parent 63d08d5 commit 0544ee6

1 file changed

Lines changed: 113 additions & 0 deletions

File tree

skills/vardoger-analyze/SKILL.md

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
---
2+
name: vardoger-analyze
3+
description: "Use when the user asks to personalize the GitHub Copilot CLI assistant, adapt Copilot to their style, use vardoger, or analyze their Copilot CLI conversation history. Reads the local session directory at `~/.copilot/history-session-state/`, extracts recurring preferences and conventions, and writes a fenced personalization block into `~/.copilot/copilot-instructions.md`. Runs entirely on the user's machine via the local `vardoger` CLI (`pipx install vardoger`); no network calls and no uploads. Triggers: 'personalize my copilot', 'analyze my copilot history', 'tailor copilot to me', 'run vardoger', 'update my copilot instructions from history', 'make copilot learn my style'."
4+
license: Apache-2.0
5+
---
6+
7+
# Analyze Copilot CLI history and generate personalized instructions
8+
9+
Drive the local `vardoger` CLI to read the user's GitHub Copilot CLI conversation history, extract behavioral patterns, and write a personalization block into `~/.copilot/copilot-instructions.md`.
10+
11+
## How it works
12+
13+
`vardoger` prepares the history in batches. You (the assistant) summarize each batch for behavioral signals, then synthesize all summaries into a final personalization. `vardoger` writes the result, fenced by `<!-- vardoger:start -->` / `<!-- vardoger:end -->` markers so any hand-authored rules in the same file are preserved.
14+
15+
## Sandbox note (read before running any command)
16+
17+
`vardoger` reads and writes files **outside** the current workspace:
18+
19+
- Reads Copilot CLI history from `~/.copilot/history-session-state/`.
20+
- Writes a checkpoint state file to `~/.vardoger/state.json` (created on first run).
21+
- Writes the final personalization to `~/.copilot/copilot-instructions.md`.
22+
23+
When the host asks to approve a `vardoger` command, grant it write access beyond the workspace. Otherwise the first `vardoger prepare` call will fail with `PermissionError: ... ~/.vardoger/state.tmp` because the sandbox blocks writes outside the current working directory.
24+
25+
## Steps
26+
27+
### 1. Verify vardoger is installed
28+
29+
```bash
30+
if ! command -v vardoger >/dev/null 2>&1; then
31+
cat <<'INSTALL_EOF'
32+
vardoger CLI is not installed.
33+
34+
This skill calls the `vardoger` CLI to read your Copilot CLI history and
35+
write a personalization file, so the CLI must be on PATH.
36+
37+
Install options:
38+
39+
# Recommended:
40+
pipx install vardoger
41+
42+
# Or run without installing:
43+
uvx vardoger --help
44+
45+
If you do not have pipx, see https://pipx.pypa.io/stable/installation/.
46+
47+
Project page: https://github.com/dstrupl/vardoger
48+
49+
After installing, re-run the personalization request.
50+
INSTALL_EOF
51+
exit 1
52+
fi
53+
```
54+
55+
### 2. Check if a refresh is needed
56+
57+
```bash
58+
vardoger status --platform copilot --json
59+
```
60+
61+
If the output shows `"is_stale": false`, tell the user their personalization is up to date and ask if they want to re-run anyway. If stale or never generated, continue with the analysis.
62+
63+
### 3. Get batch metadata
64+
65+
```bash
66+
vardoger prepare --platform copilot
67+
```
68+
69+
This prints JSON like `{"batches": 3, "total_conversations": 29}`. Note the number of batches. Tell the user: "Found N conversations in M batches. Analyzing..."
70+
71+
### 4. Summarize each batch
72+
73+
For each batch number from 1 to N, run:
74+
75+
```bash
76+
vardoger prepare --platform copilot --batch 1
77+
```
78+
79+
The output contains a summarization prompt followed by conversation data. Read the output carefully and produce a concise bullet-point summary of the behavioral signals you observe in that batch. Keep your summary for later.
80+
81+
Tell the user which batch you are processing: "Analyzing batch 1 of N..."
82+
83+
Repeat for all batches (`--batch 2`, `--batch 3`, etc.).
84+
85+
### 5. Get the synthesis prompt
86+
87+
```bash
88+
vardoger prepare --platform copilot --synthesize
89+
```
90+
91+
### 6. Synthesize the personalization
92+
93+
Following the synthesis prompt, combine all your batch summaries into a single personalization. The output should be clean markdown with actionable instructions for an AI assistant.
94+
95+
### 7. Write the result
96+
97+
Pipe your personalization to `vardoger`:
98+
99+
```bash
100+
echo "YOUR_PERSONALIZATION_HERE" | vardoger write --platform copilot --scope global
101+
```
102+
103+
Replace `YOUR_PERSONALIZATION_HERE` with the actual personalization markdown you generated. `--scope global` writes to `~/.copilot/copilot-instructions.md`; use `--scope project --project <path>` to scope the write to a specific repository instead.
104+
105+
### 8. Report to the user
106+
107+
Tell the user what was written and where. Mention they can ask you to re-run vardoger any time to update the personalization, and that writes are idempotent (the fenced block is replaced; anything outside it is preserved).
108+
109+
## When to use
110+
111+
- When the user asks to personalize their Copilot CLI assistant.
112+
- When the user asks to analyze their Copilot CLI conversation history.
113+
- When the user mentions "vardoger".

0 commit comments

Comments
 (0)