Skip to content
Back to skills

Context Loader

ASecurity

Session start context priming — loads relevant memories from Pensyve to provide continuity across sessions

  • 93 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 2, 2026
ai-agentspythongosqltestingapidatabase

Works with

  • api
  • mcp

Security analysis

A100/100

Scanned September 2, 2026

npx -y skills add major7apps/pensyve --skill context-loader --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Context Loader?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Context Loader
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/major7apps-context-loader-a4cb3d4f/badge)](https://www.skillsdirectory.com/skills/major7apps-context-loader-a4cb3d4f)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: context-loader
description: "Session start context priming — loads relevant memories from Pensyve to provide continuity across sessions"
---

# Context Loader

Load relevant memories from Pensyve at the start of a session to provide cross-session continuity. Supports summary and full loading modes.

## Instructions

When this skill is invoked (typically at session start via the SessionStart hook), follow these steps:

### Step 0: Determine Loading Mode

Check for a mode argument if provided:

- **off**: Do nothing. Inform the user: "Context loading is disabled. Use `pensyve_recall` to search memories on demand."
- **summary**: Load a concise overview (10-15 lines max). This is the default.
- **full**: Load comprehensive context with relevance scores and details.

If no mode is specified, default to **summary**.

### Step 1: Query Memories

Run the following `pensyve_recall` queries to gather session context:

1. **Recent decisions**: `pensyve_recall` with query `"decided"` (limit: 5)
2. **Known issues**: `pensyve_recall` with query `"issue OR bug OR error OR problem"` (limit: 5)
3. **Workflow patterns**: `pensyve_recall` with query `"workflow OR pattern OR process"` (limit: 5)
4. **Recent activity**: `pensyve_recall` with query `"*"` (limit: 10) -- broad query to capture recent memories by recency

Deduplicate results across queries (same memory ID should appear only once).

### Step 2: Present Context

#### Summary Mode (10-15 lines max)

Present a concise briefing with the most important items:

> **Session Context** (from Pensyve memory)
>
> **Recent Decisions:**
>
> - auth-service: Using RS256 for JWT signing to support key rotation
> - api-design: POST endpoints return 201 with created resource
>
> **Known Issues:**
>
> - database: Migration script requires Python 3.11+
>
> **Active Patterns:**
>
> - testing: Integration tests need tmpdir cleanup after filesystem operations
>
> _Use `pensyve_recall` to search for specific memories._

Rules for summary mode:

- Maximum 15 lines of content (excluding the header)
- Show at most 3 items per category
- Omit categories with no results
- Do not show scores, IDs, or timestamps
- Prioritize higher-confidence and more recent memories

#### Full Mode (comprehensive)

Present a detailed briefing with scores and metadata:

> **Session Context** (from Pensyve memory)
>
> **Recent Decisions** (3 found):
> | Entity | Decision | Confidence | When |
> |--------|----------|------------|------|
> | auth-service | Using RS256 for JWT signing | 0.9 | 2026-03-15 |
> | api-design | POST endpoints return 201 | 0.9 | 2026-03-14 |
> | database | SQLite for MVP, migrate to Postgres later | 0.9 | 2026-03-12 |
>
> **Known Issues** (2 found):
> | Entity | Issue | Confidence | Score |
> |--------|-------|------------|-------|
> | database | Migration requires Python 3.11+ | 0.8 | 0.91 |
> | cache | Invalidation race condition on concurrent writes | 0.8 | 0.85 |
>
> **Workflow Patterns** (1 found):
> | Entity | Pattern | Confidence | Score |
> |--------|---------|------------|-------|
> | testing | Integration tests need tmpdir cleanup | 0.7 | 0.78 |
>
> **Recent Activity** (5 unique memories, most recent first):
> | Type | Entity | Summary | Score |
> |------|--------|---------|-------|
> | semantic | auth-service | RS256 JWT signing | 0.92 |
> | episodic | database | Debugged migration failure | 0.88 |
> | procedural | deploy | Run tests before deploy | 0.75 |
>
> _Total memories loaded: 11 | Use `pensyve_recall` for targeted search | `pensyve_inspect` for entity details_

Rules for full mode:

- Show all results with relevance scores
- Include confidence values and timestamps where available
- Group by category with counts
- Show memory types in the recent activity section
- Include a footer with total count and navigation suggestions

## Constraints

- **All memory operations go through the Pensyve MCP tools exclusively.** Do not read or write to the local filesystem for memory purposes.
- Do not fabricate memories. Only display what the MCP tools return.
- In summary mode, strictly respect the 15-line content limit. Truncate rather than exceed it.
- Do not take any action based on the loaded context -- this skill is informational only.
- If no memories are found at all, say: "No memories found. This appears to be a fresh session. Use `pensyve_remember` to start building context."
- The context loading should be fast and non-blocking. Do not run expensive operations.

## Error Handling

- If some `pensyve_recall` queries fail but others succeed, present the successful results and note the failures briefly.
- If all queries fail, report the error and suggest checking the MCP server connection.
- If the MCP server is not connected, inform the user: "Pensyve MCP server is not connected. Context loading skipped. Verify your `PENSYVE_API_KEY` environment variable and MCP configuration."

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.