Skip to content
Back to skills

Extract

ASecurity

Derive content from a single Note via LLM-guided extraction, compression, or transformation. Output is grounded entirely in the input — no new information is introduced.

  • 10 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added June 6, 2026
researchpython

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned June 6, 2026

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

Installs into .claude/skills of the current project.

Are you the author of Extract?

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

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

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: extract
type: python
flattens_collections: false
description: "Derive content from a single Note via LLM-guided extraction, compression, or transformation. Output is grounded entirely in the input — no new information is introduced."
schema_hint:
  target: "$variable (single Note, required)"
  instruction: "string (what to extract or how to transform, required)"
  out: "$variable (optional)"
---

# extract

LLM-guided extraction or transformation from a single Note. Output is grounded
entirely in the input — no new information introduced.

## Input

- `target`: Single Note (variable, ID, or name) — NOT Collections
- `instruction`: What to extract or how to transform (required)
- `target_tokens`: Optional output length in tokens
- `out`: Variable name for resulting Note

## Planning Notes

Prefer Python for small, predictable structure (YAML frontmatter, key:value
blocks). Use `extract` when layout is unknown or you need semantic judgment.

**Output length is unreliable.** Word-count instructions ("output a 1-3 word
phrase") are frequently ignored — expect verbose output. When output will be
used as a filename, directory name, or identifier, **always truncate and
sanitize in Python**:
```python
tokens = re.split(r'[\s_]+', raw)[:3]  # split on spaces AND underscores
name = re.sub(r'[^a-z0-9_]', '', '_'.join(tokens).lower())
```

**Do NOT use when:**
- Bibliography/references → `extract-references` (GROBID, structured, deterministic)
- Multiple documents → `synthesize`
- New content from scratch → `generate-note`
- Filtering Collection items → `filter-structured` or `filter-semantic`
- Structured metadata fields → `project` or `pluck`

**Prefer over `synthesize` when** there is only ONE source document.

## Anti-Patterns

- ❌ `extract(target=$collection)` — Use `map(extract)` for Collections.
- ❌ `extract(target=$paper, instruction="extract citations")` — Use `extract-references`.
- ❌ Raw extract output as directory/file name — Always truncate + sanitize in Python first.

## Examples

```json
{"type":"extract","target":"$paper","instruction":"Extract the key architectural innovation as one sentence.","out":"$innovation"}
{"type":"extract","target":"$abstract","instruction":"Compress to 2-3 sentences retaining methodology and results.","out":"$compressed"}
{"type":"map","target":"$papers","operation":"extract","instruction":"State the main contribution in one sentence.","out":"$contributions"}
```

Files in this skill

  • Skill.md2.4 KB
  • tool.py4.6 KB

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…