skills/reading-data/SKILL.md
Instructions for reading data from TraceMem memory.
npx skillsauth add tracemem/tracemem-skills reading-dataInstall 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.
This skill teaches how to safely and correctly read data using TraceMem Data Products. Direct database selection or API calls are prohibited; all data access must be mediated by TraceMem.
decision_write / insert product).decision_id from decision_create before calling decision_read. Reading data without a decision envelope will FAIL.customers_read) for reading.purpose string for every read. This purpose must be in the product's allowed_purposes list.Follow these steps IN ORDER before attempting to read data:
Tool: decision_create
Why: ALL TraceMem operations require a decision envelope
Parameters:
- intent: "customer.lookup.support"
- automation_mode: "autonomous" (or propose/approve/override)
Returns: decision_id → Save this for steps 3-5
Tool: products_list
Why: Find which data products exist and are accessible
Parameters:
- purpose: "support_context" (optional filter)
Returns: List of products with names and descriptions
Note: This returns a CATALOG of available products, not the data itself
Tool: product_get
Why: Get metadata about a specific product - its schema and rules
Parameters:
- product: "customers_v1"
Returns:
- exposed_schema: [{name: "customer_id", type: "integer"}, ...]
- allowed_purposes: ["support_context", "order_validation", ...]
- example_queries: Sample query structures
Note: This returns METADATA about the product (schema, rules)
This does NOT return actual data records
This does NOT require a decision_id
From Step 3, you learned:
- Field names: customer_id, name, email, tier
- Allowed purposes: support_context, order_validation
Build query object:
query: {"customer_id": "1001"} ← Use exact field names from schema
Tool: decision_read
Why: Access the ACTUAL DATA RECORDS from the product
Parameters:
- decision_id: "TMEM_abc123..." (from Step 1 - REQUIRED)
- product: "customers_v1"
- purpose: "support_context" (must be in allowed_purposes from Step 3)
- query: {"customer_id": "1001"} (using field names from Step 3)
- allow_multiple: false (default) or true
Returns: records array with ACTUAL DATA from database
Example: [{customer_id: 1001, name: "Acme Corp", email: "[email protected]"}]
Tool: decision_close
Parameters:
- decision_id: "TMEM_abc123..." (from Step 1)
- action: "commit" (successful) or "abort" (cancelled)
Identify the Product:
Use products_list to find the correct Data Product for your need (e.g., orders_read_v1). Check its schema and allowed_purposes.
Execute Read:
Call decision_read with:
decision_id: Your current open decision.product: The name of the data product.purpose: A valid purpose string (e.g., verification).query: The key-value filter (e.g., {"user_id": "123"}).Handle Results:
The response contains records (list) and summary.
Example:
{
"records": [{"id": 1, "status": "active"}],
"summary": {"rows": 1}
}
decision_read without first calling decision_create. This will FAIL - the decision envelope is MANDATORY.insert.testing
Instructions for writing and efficiently storing data in TraceMem.
tools
Complete workflow patterns for common TraceMem operations.
tools
Scenarios where TraceMem should not be used.
development
Auditing memory traces and debugging.