"Keep your own standing preferences, glossary terms (brands, product lines, repo groups) and cross-project learnings in a private store that follows you across devices. Use for remember this preference, what is my standard setup, look up a term, or sync my knowledge."
Install
npx skillscat add dobeu-tech-eco/dts2-marketplace/dt-knowledge Install via the SkillsCat registry.
Cursor procedure
Find the plugin root: the nearest ancestor of this file that contains .cursor-plugin/plugin.json. The examples below say $PLUGIN for that directory.
Run python3 "$PLUGIN/scripts/dt_gate.py" for every gate. Exit 2 from scaffold, preflight, or approve stops the command. Exit 2 from bridge that prints BLOCKED unsupported-runtime-script is a precise blocker for that one step: record it and do not imitate the script. The interview, approve, and scaffold still run.
--yes, --ship, and --scaffold-only are rejected. A JSON key with the same name as a kind is not authorization. approve records the sha256 of the file the user accepted, and later gates require that digest.
Phase files for this command are in $PLUGIN/skills/dt-knowledge/.
Merges, fleet broadcast, hook install, the headless SDK, and paid provider calls are CURSOR_UNSUPPORTED even after a permission phrase is recorded.
Cursor edition: run scripts/dt_gate.py from this plugin for every gate. Do not read tokens or credential files. Do not merge, broadcast, install hooks, or spend a provider API. Carry out file work with Read, Edit, Grep, Glob, and git.
Knowledge — your personal preferences and glossary, on every device
A small private store of things that are true for you, not for one repo: standing defaults ("my standard team is 6 agents"), glossary terms (a brand or product line and the repos in it) and lessons that apply everywhere. It is personal and private, and it is never part of the plugin. One Markdown file per entry lives under entries/<kind>/<key>.md; the store is a folder (DTS2_KNOWLEDGE, else $DTS2_HOME/knowledge, else ~/.dts2/knowledge) that is usually a private git repo you own, so it can sync between devices.
All commands: python3 "$PLUGIN/scripts/dt_gate.py" bridge knowledge.py <command>.
Guided setup and join
Run this when the user types /dt-knowledge setup or /dt-knowledge join, or says "set up my knowledge store" or "connect this computer to my knowledge". Ask one question at a time and wait for each answer.
- Q1: Do you already have a knowledge store, or is this your first? Existing →
join(a new device, once per machine). New →setup(once per person). - Q2: Where should it live?
- Cloud or local? Local only on this machine means no sync (
setuponly). Cloud has three choices: - (a) A private GitHub repo: free, the default. Signs in through
gh auth loginor your normal git sign-in. The user creates the empty private repo and gives its URL (--remote). - (b) A Cloudflare Worker + D1: also reachable from claude.ai web and phone. The user deploys
templates/knowledge-cloudflare/with wrangler (see its README), sets the Worker secretthe knowledge token, and exports the same value asDTS2_the knowledge tokenon this device. Ask for the Worker URL (--url). Never ask the user to paste the token into the chat and never write it anywhere. The claude.ai custom connector form may need OAuth, which the template does not provide yet (see its README); Claude Code can send the token as a header. - (c) A folder synced by OneDrive, Google Drive or Dropbox: cloud through the drive app. Ask for the folder path (
--path).
- Cloud or local? Local only on this machine means no sync (
- Q3 (new store only): What owner label should it carry? A short name such as
acme-owner. - Run it.
- New:
setup --owner <label> --backend git|folder|local|cloudflare [--remote <url>] [--path <dir>] [--url <worker url>]. Add--forceonly if the user confirms replacing an existing store. - Existing:
join --backend git|folder|cloudflare [--remote <url>] [--path <dir>] [--url <worker url>]. It reads the owner from the store and prints "this device is now tied to 's knowledge store".
- New:
- Confirm in one line: owner, backend and where it lives. This device's choice is kept in
~/.dts2/knowledge.json.
Never ask for or store an API key or password; sign-in comes fromgh/git or the drive app. For Cloudflare the token is read fromDTS2_the knowledge tokenonly; if it is unset, setup and join still work and print a note, andsyncexits 2 until it is set.init [--remote <url>]still works as an alias ofsetup --backend git.
Kinds and keys
preference(default): a standing default, such asagents.standard.term: a glossary entry with--aliasnames and--tagwords, such as a brand and its repos.learning: a lesson that applies across projects.- Keys are lowercase: letters, digits,
.,_,-, up to 64 characters, starting with a letter or digit.
Steps: map what the user says to a command
- set ("remember that...", "my standard is...")
set <key> "<value>" [--kind preference|term|learning] [--alias <name>]... [--tag <word>]... - get ("what is my...", "what does X mean")
get <key or alias>; add--jsonto parse it. Exit 3 means nothing matches: say so. - find ("anything about...")
find <text>searches keys, aliases, tags and values;--kindnarrows it. - list ("show everything I saved")
list [--kind <kind>]. - rm ("forget...")
rm <key>. - sync ("sync my knowledge", or after any
setorrm)sync. Run it right aftersetandrmwhenever a remote or Worker URL exists (statusshows it). With the Cloudflare backend it pulls newer remote entries and pushes newer local ones. With no remote it only commits locally and says so. - status ("is it set up?")
statusshows the store path, counts per kind, the remote and whether there are unsynced changes. - Confirm in one line: what was stored or found, under which key, and whether it was synced.
Examples
A preference:
set agents.standard "6 agents"A glossary term for a brand with several repos (generic name):
set acme "Acme product line: the acme-web, acme-api and acme-docs repos ship together" --kind term --alias "Acme Co" --alias "acme-*" --tag acme-web --tag acme-api --tag acme-docs
get "Acme Co"get finds the term by its key or by any alias, ignoring case. /dt-setup uses the tags and aliases to spot that the repo it is in belongs to acme.
Rules
- Never store secrets: no tokens, passwords, API keys, private keys or credentials. The script refuses them (exit 2). Do not work around a refusal; tell the user the store is for preferences and glossary only.
- Read the store only when the user invokes this skill or
/dt-setupdoes. No hook and no other skill reads it. - Keep values short and plain; the value is the text after the front matter.
- A sync conflict on the same key keeps the newer
updatedentry and saves the other as<key>.conflict-<time>.mdbeside it. Tell the user so they can review it. - This is separate from cooldowns (
/dt-cooldown): those are live per-account state and are not synced through git.