framework/memex/skills/save/SKILL.md
Use when the user provides a source (URL, file path, or free text) to save into the project's memex — a long-term knowledge bank for AI agents. Stores the raw source, extracts entities into cross-linked pages, runs a backlink audit, and updates the index and activity log. Do NOT trigger on casual reads; only when the intent is to persist a source into the memex.
npx skillsauth add korchasa/flowai saveInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Save a new source into the memex (long-term knowledge bank for AI agents) and integrate it. One source typically touches 5–15 memex pages.
Invoked when the user wants to capture a source into the memex (e.g., "save this article to my memex", "add this URL to the memex", /save <path-or-url-or-text>). The argument is the source to read.
Resolve the active memex root in this order — first match wins:
--memex <path> flag in arguments → use that path.AGENTS.md and a pages/ subdirectory is the active memex root../ in the current working directory and scaffold a memex there (see "Scaffold a new memex" below).After resolution, read <memex-root>/AGENTS.md for the schema. All conventions (filenames, frontmatter, link format, log format) come from there. Cross-references use SALP only: [REF:mx-<type>:<slug>] (bare) or [REF:mx-<type>:<slug> | <display>] (with display text). [[wikilinks]] are no longer recognised by the audit script or the skills.
The pages directory is
pages/— it holds the cross-linked page graph. The umbrella concept (sources + pages + log + schema) is the memex. SALP REFs ([REF:mx-<type>:<slug>]) are the canonical cross-link notation; do not confuse them with directory naming.
If no memex was found and the user did not pass --memex, scaffold one in the current working directory:
./pages/, ./pages/answers/, ./raw/articles/, ./raw/attachments/../AGENTS.md. The asset ships with this skill at assets/AGENTS.md in the framework. If the user already has AGENTS.md in this directory, do NOT overwrite — append a "## Memex Schema" section that links to it instead, then create a separate MEMEX.md with the schema. Ask the user once which they prefer if both options are unclear../pages/index.md with the empty-catalog template:
# Memex Index
Last updated: <today>
<!-- Add entries after each save. Format:
## <Domain>
- [REF:mx-concept:page-slug | Page Slug] — one-line description (YYYY-MM-DD)
-->
./log.md with the header:
# Memex Activity Log
<!-- Append-only. Never edit existing entries. Format:
## [YYYY-MM-DD] <op> | <title>
<one-line description>
-->
Scaffolded new memex at <memex-root>. Schema is in AGENTS.md.Continue with the save steps below in the same invocation.
http://, https://): use WebFetch with the prompt: Extract the complete article content. Return: title, author(s) if listed, date if listed, and full article text preserving all factual claims, data points, code examples. Format as clean markdown.If a URL is paywalled or returns thin content, report the failure and suggest pasting the text manually. Do NOT fabricate content.
Classify as one of: article | paper | transcript | conversation | note. Auto-detect from the URL or content (arxiv → paper, github → repo-style article, twitter/x → conversation, etc.).
Generate the slug:
[a-z0-9-] characters.YYYY-MM-DD-<slug>.md.-2, -3, etc.raw/articles/Write to <memex-root>/raw/articles/YYYY-MM-DD-<slug>.md with frontmatter:
---
date: YYYY-MM-DD
source-url: <URL or original file path or "MANUAL">
source-type: <classification>
title: <extracted or inferred title>
---
Followed by the full source content.
raw/ is immutable — once written, never modify these files in later operations.
Read your own raw save. Identify mentioned entities:
For each entity decide: CREATE (no page yet) or UPDATE (page exists in <memex-root>/pages/). Skip minor mentions — they will be referenced inline within other pages, not turned into pages of their own.
For each new entity, write <memex-root>/pages/<slug>.md using the matching template from AGENTS.md (concept / person / source-summary). Fill the frontmatter, write a synthesized body (do NOT copy-paste raw content — explain in your own words), and add SALP REFs ([REF:mx-<type>:<slug>]) to related entities.
For each existing entity, read the page first, then integrate new information using Edit:
date in frontmatter to today.Always write a source-summary page at <memex-root>/pages/<source-slug>.md covering the source itself:
[REF:mx-<type>:<slug>]) to every entity page touched in step 5.This gives every raw source a discoverable memex entry point.
For each NEWLY CREATED page (from step 5–6), grep all existing memex pages for mentions of its title or key terms:
grep -rln "<new page title>" <memex-root>/pages/
For every match that mentions the title in prose but does NOT contain [REF:mx-<type>:<new-slug>], add a SALP REF at the first natural mention. This is the most commonly skipped step — without it, the memex does not compound.
pages/index.mdOpen <memex-root>/pages/index.md. For each created or updated page, ensure it has a row under the appropriate domain heading:
## <Domain>
- [REF:mx-concept:page-slug | Page Slug] — one-line description (YYYY-MM-DD)
Update "Last updated" to today. Keep entries under 80 characters. Group by domain — derive from tags frontmatter.
log.mdAppend one entry to <memex-root>/log.md:
## [YYYY-MM-DD] save | <source title>
Stored <type> from <source>. Created N pages, updated M. Touched: <slug-1>, <slug-2>, ...
Print a concise summary:
raw/articles/.[!WARNING] callouts.When a new source contradicts existing memex content, do NOT silently overwrite. Add an Obsidian-style callout near the contradicting claim:
> [!WARNING] Contradiction with [REF:mx-concept:other-page]
> Source A claims X, but [REF:mx-concept:other-page] states Y. Needs human resolution.
Touch BOTH pages with the warning, and mention the contradiction in the log entry. The audit skill (audit) surfaces all [!WARNING] markers in its report.
raw/articles/): tell the user and stop. Suggest they pass a different source or remove the existing file first.raw/articles/ does not exist in the resolved memex: create it. The memex is malformed but recoverable.pages/index.md missing: recreate it from the empty template before step 8.raw/ after the initial save in step 3.[REF:mx-<type>:<slug>]) only.raw/ source via the Sources section.Read, Write, Edit, Glob, Grep, Bash (for grep only — no git operations unless the user asks). WebFetch only for URL sources.development
Use when the user asks to add TypeScript strict-mode code-style rules to AGENTS.md for a TypeScript project using strict mode. Do NOT trigger for Deno projects (use setup-agent-code-style-deno) or non-strict TS configurations.
development
Use when the user asks to add Deno/TypeScript code-style rules to AGENTS.md, or during initial Deno project setup when code-style guidelines need to be established. Do NOT trigger for non-Deno TypeScript projects (use setup-agent-code-style-strict), or for runtime-agnostic style advice.
development
Use when the user asks to audit a memex (long-term knowledge bank for AI agents) for orphans, dead SALP REFs, missing sections, contradictions, or index drift. Runs a deterministic structural check, layers LLM-judgement findings, optionally auto-fixes trivial issues with `--fix`. Do NOT trigger on general code linting.
development
Use when the user asks a question to be answered from the project's memex (long-term knowledge bank for AI agents) rather than training data or the live web. Reads the index, opens relevant pages, follows one SALP-REF hop, synthesises a cited answer, files it back. Do NOT trigger on source-code or live-session questions.