Skip to content
Back to skills

Oss Pr Threshold

ASecurity

Threshold verification for oss-pr-lessons playbook — determine if distillation should trigger for any repository

  • 5 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 2, 2026
developmentgobash

Security analysis

A100/100

Scanned September 2, 2026

npx -y skills add kookr-ai/kookr --skill oss-pr-threshold --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Oss Pr Threshold?

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

Security grade badge for Oss Pr Threshold
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/kookr-ai-oss-pr-threshold/badge)](https://www.skillsdirectory.com/skills/kookr-ai-oss-pr-threshold)

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: oss-pr-threshold
description: Threshold verification for oss-pr-lessons playbook — determine if distillation should trigger for any repository
keywords: oss, pr, threshold, distillation, trigger, line count, open source
related: [oss-pr-state, oss-pr-distill]
---

# OSS PR Threshold

Determine whether accumulated raw learnings are sufficient for distillation.

## When to Use

Invoked after each batch's state update.

## Non-Negotiable Rules

| # | Rule | Violation Example | Correct Pattern |
|---|------|-------------------|-----------------|
| 1 | Threshold is exactly 200 lines | Using subjective criteria | `wc -l < learnings-raw.md` > 200 |
| 2 | Count ALL lines including headers | Only counting observation lines | `wc -l` on the entire file |
| 3 | Report exact count and decision | Silently triggering or skipping | Always output: "{N} lines - {DISTILL/SKIP}" |
| 4 | Never trigger on first batch | Distilling from 5 PRs | Minimum `total_processed >= 10` |

## Parameters

- **repoSlug**: URL-safe slug

## Threshold Definition

```
DISTILL if:
  (line_count > 200) AND (state.total_processed >= 10)

SKIP otherwise
```

## Verification Command

```bash
SLUG="{{repoSlug}}"
LINE_COUNT=$(wc -l < ~/.claude/${SLUG}-pr-lessons/learnings-raw.md)
TOTAL_PROCESSED=$(jq '.total_processed' ~/.claude/${SLUG}-pr-lessons/state.json)
echo "Lines: $LINE_COUNT | Processed: $TOTAL_PROCESSED"

if [ "$LINE_COUNT" -gt 200 ] && [ "$TOTAL_PROCESSED" -ge 10 ]; then
  echo "DECISION: DISTILL"
else
  echo "DECISION: SKIP (need >200 lines and >=10 PRs)"
fi
```

## Output

- `DISTILL` — proceed to `oss-pr-distill`
- `SKIP — {N} lines, {M} PRs processed (need >200 lines and >=10 PRs)` — stop iteration

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.