clawdboost
v1.0.6
Published
π ClawdBoost - Smart context injection plugin for Clawdbot/Moltbot. Automatically supercharge your AI conversations with pattern-matched, time-aware context snippets!
Maintainers
Readme
ClawdBoost πβ‘
Supercharge your Clawdbot/Moltbot with smart context injection! β Automatically boost AI conversations with pattern-matched, time-aware context snippets.
π₯ Made for the Clawdbot ecosystem β The ultimate context injection plugin!
β‘ Quick Start (30 seconds)
# Step 1: Install
npm install clawdboost
# Or with pnpm:
pnpm add clawdboost
# Step 2: Initialize with example snippets
npx clawdboost initStep 3: Add to your ~/.clawdbot/moltbot.json:
{
"plugins": {
"entries": {
"clawdboost": { "enabled": true }
},
"load": {
"paths": ["node_modules/clawdboost"]
}
}
}Step 4: Start using!
moltbot cb status # Check it's working
moltbot cb snippets # View your snippets
moltbot cb add "My Info" --content "I'm a developer at Acme Corp" --patterns "work,job"That's it! ClawdBoost will now automatically inject relevant context into your AI conversations. π
π― What is ClawdBoost?
ClawdBoost is a powerful plugin that automatically injects relevant context into your AI conversations based on:
- π Pattern Matching: Inject context when specific keywords or patterns appear
- β° Time Awareness: Different context for morning vs evening, weekdays vs weekends
- π― Smart Rules: Complex trigger conditions with multiple actions
- π Personal Knowledge Base: Quick-access facts, preferences, and reference data
οΏ½ Advanced Configuration
Full Configuration Options
For more control, use the full configuration in ~/.clawdbot/moltbot.json:
{
"plugins": {
"entries": {
"clawdboost": {
"enabled": true,
"config": {
"enableTimeAware": true, // Enable time-based context
"enablePatternMatch": true, // Enable pattern matching
"maxSnippetsPerTurn": 5, // Max snippets per message
"maxSnippetChars": 2000 // Max chars per snippet
}
}
},
"load": {
"paths": ["node_modules/clawdboost"]
}
}
}Development Installation
For local development or testing modifications:
{
"plugins": {
"load": {
"paths": ["/path/to/clawdboost"]
}
}
}Initialize with Examples
moltbot clawdboost init
# or shorthand:
moltbot cb initπ Usage
CLI Commands
# List all snippets
moltbot cb snippets
# Add a new snippet
moltbot cb add "My Context" --content "This is helpful context" --patterns "keyword1,keyword2"
# Add snippet from stdin
echo "My context content" | moltbot cb add "Piped Context"
# Get a snippet
moltbot cb get my-context
# Delete a snippet
moltbot cb delete my-context
# Enable/disable snippets
moltbot cb enable my-context
moltbot cb disable my-context
# List rules
moltbot cb rules
# Add a rule
moltbot cb rule-add "GitHub Helper" \
--pattern "github|pull request|PR" \
--inject-text "Remember to follow commit conventions!"
# Test context matching
moltbot cb test "I need to review this pull request"
# Check status
moltbot cb statusAI Tool Usage
The AI can manage snippets and rules through the clawdboost tool:
User: Create a snippet for code reviews
AI: [uses clawdboost tool with action: add_snippet]Available actions:
list_snippets- List all context snippetsget_snippet- Get a specific snippetadd_snippet- Create a new snippetupdate_snippet- Update an existing snippetdelete_snippet- Delete a snippetlist_rules- List all rulesadd_rule- Create a new ruleupdate_rule- Update a ruledelete_rule- Delete a ruletest_match- Test what context matches a messagestatus- Get plugin status
π Snippets
Snippets are pieces of context that can be automatically injected. Create them in ~/.clawdbot/clawdboost/snippets/:
{
"id": "code-review",
"name": "Code Review Guidelines",
"content": "When reviewing code:\n- Check for security issues\n- Verify error handling\n- Look for performance problems",
"patterns": ["review", "pull request", "PR", "code review"],
"tags": ["development"],
"priority": 60,
"enabled": true,
"createdAt": "2026-01-29T00:00:00Z",
"updatedAt": "2026-01-29T00:00:00Z"
}Pattern-Based Snippets
Inject when specific patterns match the user's message:
{
"id": "meeting-helper",
"name": "Meeting Context",
"content": "For meetings: Review agenda, prepare talking points, note blockers",
"patterns": ["meeting", "sync", "standup", "call"]
}Time-Based Snippets
Inject based on time of day or day of week:
{
"id": "morning-context",
"name": "Morning Productivity",
"content": "Good morning! Best time for focused work. Check calendar for meetings.",
"timeRules": [
{ "type": "hour", "value": [6, 7, 8, 9, 10, 11] }
]
}{
"id": "weekend-context",
"name": "Weekend Mode",
"content": "It's the weekend! Focus on personal projects and rest.",
"timeRules": [
{ "type": "dayOfWeek", "value": [0, 6] }
]
}π Rules
Rules provide more complex trigger-action logic. Stored in ~/.clawdbot/clawdboost/rules.json:
{
"rules": [
{
"id": "github-helper",
"name": "GitHub Context",
"description": "Inject GitHub best practices when discussing repos",
"enabled": true,
"priority": 55,
"triggers": [
{ "type": "keyword", "keywords": ["github", "repository", "commit"] }
],
"actions": [
{ "type": "inject_text", "text": "Remember: Use conventional commits!" },
{ "type": "inject_snippet", "snippetId": "git-workflow" }
]
}
]
}Trigger Types
| Type | Description | Example |
|------|-------------|---------|
| pattern | Regex pattern match | { "type": "pattern", "pattern": "review.*PR" } |
| keyword | Keyword presence | { "type": "keyword", "keywords": ["urgent", "asap"] } |
| time | Time-based | { "type": "time", "timeRule": { "type": "hour", "value": [9,10,11] } } |
| channel | Specific channels | { "type": "channel", "channels": ["telegram", "discord"] } |
| always | Always trigger | { "type": "always" } |
Action Types
| Type | Description | Example |
|------|-------------|---------|
| inject_snippet | Inject a snippet | { "type": "inject_snippet", "snippetId": "my-snippet" } |
| inject_text | Inject raw text | { "type": "inject_text", "text": "Remember this!" } |
| inject_file | Inject file content | { "type": "inject_file", "filePath": "~/notes.md" } |
βοΈ Configuration
Full configuration options in moltbot.json:
{
"plugins": {
"entries": {
"clawdboost": {
"enabled": true,
"config": {
// Enable/disable globally
"enabled": true,
// Custom paths
"snippetsPath": "~/.clawdbot/clawdboost/snippets",
"rulesPath": "~/.clawdbot/clawdboost/rules.json",
// Limits
"maxSnippetsPerTurn": 5,
"maxSnippetChars": 2000,
// Features
"enableTimeAware": true,
"enablePatternMatch": true,
// Debugging
"logInjections": false,
// Timezone for time rules
"timezone": "local"
}
}
}
}
}π§ Use Cases
1. Project-Specific Context
moltbot cb add "Project Alpha" \
--content "Project Alpha uses React, TypeScript, and PostgreSQL. API is at api.alpha.com. Deploy via GitHub Actions." \
--patterns "alpha,project alpha"2. Personal Preferences
moltbot cb add "My Preferences" \
--content "I prefer: TypeScript over JavaScript, tabs over spaces, dark mode, concise responses." \
--patterns "preference,prefer,style"3. Daily Standup Helper
moltbot cb add "Standup Format" \
--content "Standup format: 1) What I did yesterday 2) What I'm doing today 3) Any blockers" \
--patterns "standup,daily,scrum"4. Time-Aware Productivity
Create a snippet for focused work hours:
{
"id": "focus-time",
"name": "Focus Time",
"content": "This is your focus block (9-12). Minimize distractions. Consider: Do Not Disturb mode.",
"timeRules": [
{ "type": "hour", "value": [9, 10, 11] },
{ "type": "dayOfWeek", "value": [1, 2, 3, 4, 5] }
]
}π€ Contributing
Contributions welcome! Please read our contributing guidelines and submit PRs.
π License
MIT License - see LICENSE for details.
ClawdBoost β Making your AI assistant smarter, one context at a time. π§ β¨
