Claude
Skills
Sign in
Back

lore-knowledge

Included with Lifetime
$97 forever

Query project-specific knowledge for conventions, patterns, architecture decisions, gotchas, and domain context. Use when starting a new task, touching unfamiliar code, making architectural decisions, reviewing code patterns, or needing context about how things are done in this project.

Productivity

What this skill does


# Lore Knowledge System

This skill provides access to the project's Lore knowledge database - a curated collection of conventions, patterns, architecture decisions, gotchas, and domain knowledge specific to this codebase.

## Before Querying

First, check if Lore is available in this project:

```bash
lore doctor
```

If Lore is not initialized (no `.lore/` directory), inform the user that this project doesn't have Lore set up yet. They can initialize it with `lore init`.

## Querying Knowledge

### By Task (Most Common)

When starting a new task or feature:

```bash
lore query --task="<describe what you're working on>"
```

Examples:
- `lore query --task="implement user authentication"`
- `lore query --task="add API endpoint for payments"`
- `lore query --task="refactor database queries"`

### By Files

When working with specific files or directories:

```bash
lore query --files="<glob pattern>"
```

Examples:
- `lore query --files="src/api/**"`
- `lore query --files="packages/auth/*"`
- `lore query --files="src/components/Button.tsx"`

### By Tags

When looking for specific categories of knowledge:

```bash
lore query --tags="<tag1>,<tag2>"`
```

Examples:
- `lore query --tags="security"`
- `lore query --tags="testing,api"`
- `lore query --tags="performance"`

### Combined Queries

You can combine parameters for more targeted results:

```bash
lore query --task="add validation" --files="src/api/**" --tags="security"
```

## Understanding Results

Query results include:
- **Title**: Brief description of the knowledge
- **Type**: convention, pattern, architecture, decision, gotcha, workflow, reference, or example
- **Relevance Score**: How well it matches your query (higher is better)
- **Freshness**: How recently the knowledge was updated (hot/warm/cold/frozen)
- **Content**: The actual knowledge entry

Prioritize entries with:
1. Higher relevance scores
2. "Hot" or "warm" freshness
3. Types matching your need (e.g., "gotcha" for pitfalls, "pattern" for code patterns)

## When Results Are Empty

If no knowledge is found:
1. The project may have limited knowledge captured
2. Try broader search terms
3. Query by file path if working on specific code
4. Suggest the user capture relevant knowledge after discovering it

## Capturing New Knowledge

When you discover something worth preserving (a pattern, gotcha, decision, etc.):

```bash
lore add --title="<concise title>" --type=<type> --body="<markdown content>"
```

Types available:
- `convention` - How things are done here
- `pattern` - Recurring code patterns
- `architecture` - System design decisions
- `decision` - ADR-style decisions with context
- `gotcha` - Pitfalls and common mistakes
- `workflow` - Process documentation
- `reference` - Quick lookup information
- `example` - Code samples and usage examples

Example:
```bash
lore add --title="API Error Response Format" --type=convention --body="All API errors must return JSON with {error: string, code: number, details?: object}"
```

## Quick Reference

| Action | Command |
|--------|---------|
| Check setup | `lore doctor` |
| Query by task | `lore query --task="..."` |
| Query by files | `lore query --files="..."` |
| Query by tags | `lore query --tags="..."` |
| List all entries | `lore list` |
| Show entry details | `lore show <id>` |
| Capture knowledge | `lore add --title="..." --type=... --body="..."` |
| Get full context | `lore prime` |

Related in Productivity