Skip to content
Back to skills

Persist

ASecurity

Mark a Note or Collection as persistent so it survives goal-completion cleanup

  • 10 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added June 6, 2026
businessgo

Security analysis

A100/100

Scanned June 6, 2026

npx -y skills add bdambrosio/Cognitive_workbench --skill persist --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Persist?

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

Security grade badge for Persist
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/bdambrosio-persist/badge)](https://www.skillsdirectory.com/skills/bdambrosio-persist)

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: persist
type: primitive
description: Mark a Note or Collection as persistent so it survives goal-completion cleanup
---

# Persist

## INPUT CONTRACT

- `target` (required): `$variable`, resource ID (`Note_123`, `Collection_456`, `Relation_7`), or named resource
- `name` (optional): Stable name to register for later `load(target="my-name")`
- `out` (optional): `$variable` aliased to the persisted resource

**REQUIREMENTS:**
- Target must resolve to an existing Note, Collection, or Relation

## BEHAVIOR

Marks the resource as persistent on disk so it is not swept by the transient-resource cleanup that runs after goal completion. Persistence is in-place — the same resource ID before and after. If `name` is given, the resource is also registered for load-by-name. If `out` is given, the variable is aliased to the same resource ID (equivalent to `bind` after `persist`).

Use persist for any output a subsequent goal will need to read.

## EXAMPLES

```json
{"type": "persist", "target": "$matches", "name": "transformer_attention_matches"}
```
```json
{"type": "persist", "target": "Collection_17", "name": "weather_report", "out": "$report"}
```

## OUTPUT

Returns `success` with the persisted resource's ID in `resource_id`.

## FAILURE SEMANTICS

- Missing `target`
- Target does not resolve to a Note, Collection, or Relation
- Underlying `mark_persistent` failed (e.g. disk write error)

## ANTI-PATTERNS

- Persisting transient scratch resources — only persist deliverables.
- Assuming `persist` copies or clones — it flips a flag on the existing resource. Both pre- and post-persist variables point to the same ID.
- Passing `out=` expecting a new resource. The binding points to the same resource; use `bind` explicitly if that is clearer at the call site.

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…