Live survey315 models · 14 providers · 23,592 auditsAudited implement · SAFE →What changedHow we verifyllms.txt

Agent skill · Audited from source

Pi Dcp

skill · Dicklesworthstone/pi_agent_rustNOASSERTION licenceAudited 10 Oct 2026 · source 46a2537504c9

★ 1,872pushed today
✓SAFEGrade B · 89/100 · 10 Oct 2026 · 46a2537
1,872repo stars · whole Dicklesworthstone/pi_agent_rust

Is it safe? Yes — SAFE, grade B (89/100). We read this skill's source at commit 46a2537504c9 and found no filesystem, network or shell access and no hard-coded secrets. What it does: Dynamic Context Pruning extension for pi. Expert guidance on using intelligent message pruning to optimize token usage while preserving conversation coherence.

Ask an AI about this pageGChatGPTCClaudePPerplexityGeGeminiXGrok
More
Cite

Cite this page

ModelsAtlas. “Pi Dcp (Dicklesworthstone/pi_agent_rust)”. Retrieved 10 Oct 2026. https://modelsatlas.com/skills/dicklesworthstone/pi-dcp

Trust audit

Audit 0.4.1 · source read 10 Oct 2026

Trust score89/100✓SAFE B
0 critical0 high1 medium0 low0 info

SAFE means nothing in the source contradicts what the skill says it does. Grade B is shared by 17,406 of 18,389 audited skills.

What the source does

  • FilesystemNone observedNo reads or writes in the source
  • NetworkNone observedNo outbound calls in the source
  • ShellNone observedNo commands run in the source
  • DependenciesPinnedNothing floats
  • SecretsNone foundNo keys in source

Five audit layers

LayerWhat we checkResultFindings
L0 ProvenanceRepo owner, licence, archive status, activityWARN1
L1 Static sourceSecrets, path traversal, supply chain, hidden codePASS0
L2 InstructionsPrompt injection, authority framing, hidden directivesPASS0
L3 InventoryThe files and declarations match the sourcePASS0
L4 SandboxRun in isolation and watch behaviourSKIPPED why0

Gates applied: no behavioural pass.

Findings (1)

Audit 0.4.1 · source sha 46a2537504c9 · 10 Oct 2026Report an issue or request a re-scan

Provenance

Who published it, and what the verdict is pinned to

What it tells the agent

Full source on GitHub ↗

Its description: Dynamic Context Pruning extension for pi. Expert guidance on using intelligent message pruning to optimize token usage while preserving conversation coherence.

---
name: pi-dcp
description: Dynamic Context Pruning extension for pi. Expert guidance on using intelligent message pruning to optimize token usage while preserving conversation coherence.
---

# Pi-DCP: Dynamic Context Pruning Expert

You are an expert on the Pi-DCP (Dynamic Context Pruning) extension for pi. You help users understand and optimize context pruning for token efficiency.

## Core Concepts

### What Pi-DCP Does

Pi-DCP automatically removes obsolete and redundant messages from conversation context before each LLM call. This:

- **Reduces token usage** - Fewer messages sent to the LLM
- **Lowers costs** - Smaller prompts = cheaper API calls
- **Preserves coherence** - Smart rules keep important context
- **Works transparently** - No user intervention needed

### Workflow: Prepare > Process > Filter

1. **Prepare Phase**: Rules annotate message metadata (hashes, file paths, error status, etc.)
2. **Process Phase**: Rules make pruning decisions based on metadata
3. **Filter Phase**: Messages marked for pruning are removed

### Built-in Rules

**Deduplication**
- Removes duplicate tool outputs based on content hash
- Keeps first occurrence, prunes later duplicates
- Never prunes user messages

**Superseded Writes**
- Removes older file write/edit operations when newer versions exist
- Tracks file paths and versions
- Only keeps the latest write to each file

**Error Purging**
- Removes resolved errors from context
- Identifies errors followed by successful retries
- Keeps unresolved errors for context

**Recency Protection**
- Always preserves recent messages (default: last 10)
- Overrides other pruning decisions
- Configurable threshold

## Usage Guidance

### Commands

Tell users about these commands:

- `/dcp-debug` - Toggle debug logging to see what's being pruned
- `/dcp-stats` - Show pruning statistics for current session
- `/dcp-toggle` - Enable/disable the extension
- `/dcp-recent <number>` - Adjust recency threshold (default: 10)

### When to Use Debug Mode

Recommend `/dcp-debug` when:
- User suspects important context is being pruned
- Investigating unexpected LLM behavior
- Understanding what the extension is doing
- Tuning configuration

### When to Adjust Recency Threshold

Recommend changing `keepRecentCount`:
- **Increase** (e.g., `/dcp-recent 20`) if:
  - LLM seems to forget recent context
  - Working on complex multi-step tasks
  - Need more working memory
  
- **Decrease** (e.g., `/dcp-recent 5`) if:
  - Token usage is still too high
  - Conversation is very repetitive
  - Most context is in recent messages anyway

### When to Disable

Recommend `/dcp-toggle` to disable when:
- Debugging issues and want to see full context
- Working on tasks where all history matters
- Testing if pruning is causing problems

## Custom Rules

### Creating Custom Rules

Guide users on implementing `PruneRule`:

```typescript
import type { PruneRule } from "~/.pi/agent/extensions/pi-dcp/src/types";

const myRule: PruneRule = {
  name: 'my-rule-name',
  description: 'What this rule does',
  
  // Optional: Annotate metadata
  prepare(msg, ctx) {
    // Access: msg.message (original message)
    //         msg.metadata (metadata object to annotate)
    //         ctx.messages (all messages)
    //         ctx.index (current message index)
    //         ctx.config (configuration)
    
    msg.metadata.myScore = calculateScore(msg.message);
  },
  
  // Optional: Make pruning decisions
  process(msg, ctx) {
    // Check if already pruned
    if (msg.metadata.shouldPrune) return;
    
    // Never prune user messages
    if (msg.message.role === 'user') return;
    
    // Make decision
    if (msg.metadata.myScore < threshold) {
      msg.metadata.shouldPrune = true;
      msg.metadata.pruneReason = 'low score';
    }
  },
};
```

### Rule Design Patterns

**Prepare-only rules**: Annotate metadata for other rules to use

**Process-only rules**: Make decisions based on metadata from prepare phase

**Two-phase rules**: Annotate in prepare, decide in process (most common)

**Protective rules**: Override pruning decisions (like recency)

### Metadata Fields

Standard metadata fields:
- `hash` - Content hash for deduplication
- `filePath` - File path for superseded writes
- `fileVersion` - Version hash for file tracking
- `isError` - Whether message is an error
- `errorResolved` - Whether error was resolved
- `protectedByRecency` - Protected by recency rule
- `shouldPrune` - Final pruning decision (boolean)
- `pruneReason` - Why it should be pruned (string)

Custom rules can add any fields.

## Troubleshooting

### "LLM forgot recent context"

1. Check recency threshold: `/dcp-recent 15` to increase
2. Enable debug: `/dcp-debug` to see what's being pruned
3. Check if important messages are within recency window

### "Still using too many tokens"

1. Check stats: `/dcp-stats` to see pruning rate
2. Consider adding custom rules for domain-specific pruning
3. Reduce recency threshold if safe: `/dcp-recent 5`

### "Extension not working"

1. Check if enabled: `/dcp-toggle` twice (off then on)
2. Look for initialization message in logs
3. Check for configuration errors in console

### "Rule not found error"

Rules must be registered before use. Built-in rules auto-register when extension loads.

For custom rules, ensure they're registered:
```typescript
import { registerRule } from "~/.pi/agent/extensions/pi-dcp/src/registry";
registerRule(myRule);
```

## Best Practices

### Configuration

- Start with defaults (4 built-in rules, keepRecentCount: 10)
- Enable debug mode initially to understand behavior
- Tune recency threshold based on use case
- Add custom rules for domain-specific patterns

### Rule Order

Rules are applied in the order configured. Standard order:
1. Deduplication
2. Superseded Writes
3. Error Purging
4. Recency (should be last to override)

Recency should typically be last since it protects messages.

### Performance

- Prepare phase should be fast (just annotation)
- A

Excerpt, first 6,000 characters of SKILL.md, verbatim from the audited commit. It is text from someone else’s repository, quoted so you can judge it before your agent reads it.

Install

Pinned to the audited commit 46a2537

Download folder ↗
git clone https://github.com/Dicklesworthstone/pi_agent_rust
git -C pi_agent_rust checkout 46a2537504c9

The author documents no install command, so this uses the repository directly. Our verdict covers commit 46a2537504c9 only.

Works in

The author has not said which agents this skill supports, and we have not tested it in any.

Audit history

Every audit, every source change

  1. ✓SAFE B 89 / 100

    first audit · source 46a2537504c9

README badge

For maintainers · shows the latest audit

ModelsAtlas: SAFE BMODELSATLASSAFE · B
[![ModelsAtlas: SAFE B](https://modelsatlas.com/skills/dicklesworthstone/pi-dcp/badge.svg)](https://modelsatlas.com/skills/dicklesworthstone/pi-dcp/)

The badge shows our verdict and grade for this skill, and links back to this page. It changes when the audit does.

Similar skills

A Nach B✓SAFE

Dicklesworthstone/pi_agent_rust

Austrian public transport (VOR AnachB) for all of Austria. Query real-time departures, search stations/stops, plan routes between locations, and check service disruptions. Use when asking about Austrian trains, buses,…

★ 1.9kGrade B
Anachb✓SAFE

Dicklesworthstone/pi_agent_rust

Austrian public transport (VOR AnachB) for all of Austria. Query real-time departures, search stations/stops, plan routes between locations, and check service disruptions. Use when asking about Austrian trains, buses,…

★ 1.9kGrade B
Approval Workflow Generator!CAUTION

Dicklesworthstone/pi_agent_rust

Generate approval workflow generator operations. Auto-activating skill for Business Automation. Triggers on: approval workflow generator, approval workflow generator Part of the Business Automation skill category. Use…

★ 1.9kGrade B
Asana Task Creator!CAUTION

Dicklesworthstone/pi_agent_rust

Create asana task creator operations. Auto-activating skill for Enterprise Workflows. Triggers on: asana task creator, asana task creator Part of the Enterprise Workflows skill category. Use when working with asana task…

★ 1.9kGrade B
Audit Trail Helper!CAUTION

Dicklesworthstone/pi_agent_rust

Audit Trail Helper - Auto-activating skill for Enterprise Workflows. Triggers on: audit trail helper, audit trail helper Part of the Enterprise Workflows skill category. Use when analyzing or auditing audit trail…

★ 1.9kGrade B
Backlog Grooming Assistant!CAUTION

Dicklesworthstone/pi_agent_rust

Execute backlog grooming assistant operations. Auto-activating skill for Enterprise Workflows. Triggers on: backlog grooming assistant, backlog grooming assistant Part of the Enterprise Workflows skill category. Use…

★ 1.9kGrade B

Add this badge to your README

[![ModelsAtlas: SAFE B](https://modelsatlas.com/skills/dicklesworthstone/pi-dcp/badge.svg)](https://modelsatlas.com/skills/dicklesworthstone/pi-dcp/)

Questions about Pi Dcp

What does the Pi Dcp skill do?
High-performance AI coding agent CLI written in Rust with zero unsafe code
Is Pi Dcp safe to install?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean skill reads B.
What can Pi Dcp access on my machine?
The audit observed no filesystem, network or shell use at all in its source.
How current is this page?
The grade is for one exact copy of the source (46a2537504c9), read on 2026-10-10. The repository is watched, and a new audit runs when it changes — this is the first audit.

Sources

Spotted something wrong? Report a correction · Methodology

Keep going in your AI

Opens with this page as the source. We add nothing else to the prompt.