Skip to content

Commit ee7f3d9

Browse files
committed
update adding claude.md
1 parent 5061e0c commit ee7f3d9

11 files changed

Lines changed: 903 additions & 47 deletions

File tree

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/sh
2+
if grep -q "caliber" .git/hooks/pre-commit 2>/dev/null; then
3+
exit 0
4+
fi
5+
FLAG="/tmp/caliber-nudge-$(echo "$PWD" | shasum | cut -c1-8)"
6+
find /tmp -maxdepth 1 -name "caliber-nudge-*" -mmin +120 -delete 2>/dev/null
7+
if [ -f "$FLAG" ]; then
8+
exit 0
9+
fi
10+
touch "$FLAG"
11+
printf '{"decision":"block","reason":"Caliber agent config sync is not set up on this machine. Tell the user: This project uses Caliber to keep agent configs in sync — it is not set up yet. Want me to run /setup-caliber? (~30 seconds)"}'

.claude/settings.json

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
{
2+
"hooks": {
3+
"Stop": [
4+
{
5+
"matcher": "",
6+
"hooks": [
7+
{
8+
"type": "command",
9+
"command": ".claude/hooks/caliber-check-sync.sh",
10+
"description": "Caliber: offer setup if not configured"
11+
}
12+
]
13+
}
14+
],
15+
"PostToolUse": [
16+
{
17+
"matcher": "",
18+
"hooks": [
19+
{
20+
"type": "command",
21+
"command": "caliber learn observe",
22+
"description": "Caliber: recording tool usage for session learning"
23+
}
24+
]
25+
}
26+
],
27+
"PostToolUseFailure": [
28+
{
29+
"matcher": "",
30+
"hooks": [
31+
{
32+
"type": "command",
33+
"command": "caliber learn observe --failure",
34+
"description": "Caliber: recording tool failure for session learning"
35+
}
36+
]
37+
}
38+
],
39+
"UserPromptSubmit": [
40+
{
41+
"matcher": "",
42+
"hooks": [
43+
{
44+
"type": "command",
45+
"command": "caliber learn observe --prompt",
46+
"description": "Caliber: recording user prompt for correction detection"
47+
}
48+
]
49+
}
50+
],
51+
"SessionEnd": [
52+
{
53+
"matcher": "",
54+
"hooks": [
55+
{
56+
"type": "command",
57+
"command": "caliber learn finalize --auto",
58+
"description": "Caliber: finalizing session learnings"
59+
}
60+
]
61+
},
62+
{
63+
"matcher": "",
64+
"hooks": [
65+
{
66+
"type": "command",
67+
"command": "caliber refresh --quiet",
68+
"description": "Caliber: auto-refreshing docs based on code changes"
69+
}
70+
]
71+
}
72+
]
73+
},
74+
"permissions": {
75+
"allow": [
76+
"Bash(git *)"
77+
]
78+
}
79+
}
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
name: find-skills
3+
description: Discovers and installs community skills from the public registry. Use when the user mentions a technology, framework, or task that could benefit from specialized skills not yet installed, asks 'how do I do X', 'find a skill for X', or starts work in a new technology area. Proactively suggest when the user's task involves tools or frameworks without existing skills.
4+
---
5+
6+
# Find Skills
7+
8+
Search the public skill registry for community-contributed skills
9+
relevant to the user's current task and install them into this project.
10+
11+
## Instructions
12+
13+
1. Identify the key technologies, frameworks, or task types from the
14+
user's request that might have community skills available
15+
2. Ask the user: "Would you like me to search for community skills
16+
for [identified technologies]?"
17+
3. If the user agrees, run:
18+
```bash
19+
caliber skills --query "<relevant terms>"
20+
```
21+
This outputs the top 5 matching skills with scores and descriptions.
22+
4. Present the results to the user and ask which ones to install
23+
5. Install the selected skills:
24+
```bash
25+
caliber skills --install <slug1>,<slug2>
26+
```
27+
6. Read the installed SKILL.md files to load them into your current
28+
context so you can use them immediately in this session
29+
7. Summarize what was installed and continue with the user's task
30+
31+
## Examples
32+
33+
User: "let's build a web app using React"
34+
-> "I notice you want to work with React. Would you like me to search
35+
for community skills that could help with React development?"
36+
-> If yes: run `caliber skills --query "react frontend"`
37+
-> Show the user the results, ask which to install
38+
-> Run `caliber skills --install <selected-slugs>`
39+
-> Read the installed files and continue
40+
41+
User: "help me set up Docker for this project"
42+
-> "Would you like me to search for Docker-related skills?"
43+
-> If yes: run `caliber skills --query "docker deployment"`
44+
45+
User: "I need to write tests for this Python ML pipeline"
46+
-> "Would you like me to find skills for Python ML testing?"
47+
-> If yes: run `caliber skills --query "python machine-learning testing"`
48+
49+
## When NOT to trigger
50+
51+
- The user is working within an already well-configured area
52+
- You already suggested skills for this technology in this session
53+
- The user is in the middle of urgent debugging or time-sensitive work
54+
- The technology is too generic (e.g. just "code" or "programming")
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
---
2+
name: save-learning
3+
description: Saves user instructions as persistent learnings for future sessions. Use when the user says 'remember this', 'always do X', 'from now on', 'never do Y', or gives any instruction they want persisted across sessions. Proactively suggest when the user states a preference, convention, or rule they clearly want followed in the future.
4+
---
5+
6+
# Save Learning
7+
8+
Save a user's instruction or preference as a persistent learning that
9+
will be applied in all future sessions on this project.
10+
11+
## Instructions
12+
13+
1. Detect when the user gives an instruction to remember, such as:
14+
- "remember this", "save this", "always do X", "never do Y"
15+
- "from now on", "going forward", "in this project we..."
16+
- Any stated convention, preference, or rule
17+
2. Refine the instruction into a clean, actionable learning bullet with
18+
an appropriate type prefix:
19+
- `**[convention]**` — coding style, workflow, git conventions
20+
- `**[pattern]**` — reusable code patterns
21+
- `**[anti-pattern]**` — things to avoid
22+
- `**[preference]**` — personal/team preferences
23+
- `**[context]**` — project-specific context
24+
3. Show the refined learning to the user and ask for confirmation
25+
4. If confirmed, run:
26+
```bash
27+
caliber learn add "<refined learning>"
28+
```
29+
For personal preferences (not project-level), add `--personal`:
30+
```bash
31+
caliber learn add --personal "<refined learning>"
32+
```
33+
5. Stage the learnings file for the next commit:
34+
```bash
35+
git add CALIBER_LEARNINGS.md
36+
```
37+
38+
## Examples
39+
40+
User: "when developing features, push to next branch not master, remember it"
41+
-> Refine: `**[convention]** Push feature commits to the \`next\` branch, not \`master\``
42+
-> "I'll save this as a project learning:
43+
**[convention]** Push feature commits to the \`next\` branch, not \`master\`
44+
Save for future sessions?"
45+
-> If yes: run `caliber learn add "**[convention]** Push feature commits to the next branch, not master"`
46+
-> Run `git add CALIBER_LEARNINGS.md`
47+
48+
User: "always use bun instead of npm"
49+
-> Refine: `**[preference]** Use \`bun\` instead of \`npm\` for package management`
50+
-> Confirm and save
51+
52+
User: "never use any in TypeScript, use unknown instead"
53+
-> Refine: `**[convention]** Use \`unknown\` instead of \`any\` in TypeScript`
54+
-> Confirm and save
55+
56+
## When NOT to trigger
57+
58+
- The user is giving a one-time instruction for the current task only
59+
- The instruction is too vague to be actionable
60+
- The user explicitly says "just for now" or "only this time"

0 commit comments

Comments
 (0)