project-ContemPlace: Command for Claude Code

.claude/commands/extract-fragments.md

extract-fragments is a command for Claude Code from freegyes/project-ContemPlace. It costs 0 tokens per session (3,078 once invoked), scanned A, original, MIT.

A command that searches an Obsidian vault, a collection of linked notes, for a topic and breaks relevant notes into smaller idea fragments. It can then offer approved fragments for capture in ContemPlace, a separate note-taking system.

In plain words
What is it for?
Use it to find and extract ideas from notes about a chosen topic, track extraction progress, identify unprocessed groups, and save selected fragments to ContemPlace.
Why use it?
It helps turn scattered notes into reusable ideas without copying whole documents. The workflow also lets the user review fragments before they are captured.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: mentions CLAUDE.md.

This is freegyes/project-ContemPlace's own configuration. It tells Claude Code how to work on project-ContemPlace itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything project-ContemPlace configures →

Reuse

Borrowing it

Nothing to install: this file belongs to freegyes/project-ContemPlace. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/freegyes/project-ContemPlace/main/.claude/commands/extract-fragments.md
Clone the repo
git clone --depth 1 https://github.com/freegyes/project-ContemPlace

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for extract-fragments

README.md
[![agentmods](https://agentmods.dev/badge/commands/freegyes/project-contemplace/extract-fragments/github.svg)](https://agentmods.dev/commands/freegyes/project-contemplace/extract-fragments)
Your own site
<a href="https://agentmods.dev/commands/freegyes/project-contemplace/extract-fragments"><img src="https://agentmods.dev/badge/commands/freegyes/project-contemplace/extract-fragments/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for extract-fragments

Your own site · 80×15
<a href="https://agentmods.dev/commands/freegyes/project-contemplace/extract-fragments"><img src="https://agentmods.dev/badge/commands/freegyes/project-contemplace/extract-fragments.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,078 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.03078
Opus 5 $0.00000 $0.01539
Sonnet 5 $0.00000 $0.00616
Haiku 4.5 $0.00000 $0.00308

Measured 10d ago against content hash 9e71d2f240ca, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

extract-fragments scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/extract-fragments.md · 210 lines

How it starts

The opening of the file, as written. The whole thing — 210 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Extract fragments

Search an Obsidian vault for notes related to a topic, decompose them into idea fragments re-voiced in the user's natural capture style, and interactively capture approved fragments into ContemPlace.

Arguments

$ARGUMENTS — the topic to search for, described naturally. Examples: "I had thoughts about making a lap steel guitar", "notes about incremental formalization and PKM design", "my reflections on bookbinding techniques". Can be empty.

Prerequisites

This command requires MCP access to both:

  • Obsidian vault — semantic search and file read/update tools
  • ContemPlacesearch_notes and capture_note tools

Workflow

Phase 0: Topic selection (when no argument given)

If $ARGUMENTS is empty, help the user pick a topic:

  1. Report extraction progress. Count notes with contemplace: extracted in frontmatter (grep) and total notes with type: idea or type: reflection in frontmatter (grep). Exclude non-note files (CLAUDE.md, command files). Report:

    Extraction progress: X / Y notes extracted (Z%)
    
  2. Identify unextracted clusters. Glob for MOC*.md files. Read each MOC and check which of its linked notes lack contemplace: extracted. Rank MOCs by number of unextracted notes. Pick the top 3-5 MOCs with the most unextracted material.

  3. Present recommendations:

    Suggested topics for extraction:
      - "topic description" — N unextracted notes (MOC Name)
      - "topic description" — N unextracted notes (MOC Name)
      ...
    
  4. Wait for the user to pick one, then proceed to Phase 1 with that topic.

Phase 1: Gather source material and style reference

Run these in parallel:

  1. Search the Obsidian vault for notes matching the topic in $ARGUMENTS. Use semantic search. Cast a wide net — the user may have written about the topic across multiple notes, under different headings, using different vocabulary.

  2. Search ContemPlace via search_notes for existing fragments related to the same topic. This serves overlap detection: if ContemPlace already has fragments covering an idea from the Obsidian notes, don't re-extract that idea. The goal is to bring in what's missing, not duplicate what exists.

Read the full file on GitHub · 210 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 210 lines · 0 tokens per session scan A 9e71d2f240ca

Subscribe to this mod's changes

extract-fragments is a command published in the GitHub repository freegyes/project-ContemPlace (3 stars, last pushed 5mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 3,078 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.