pma-mem
Knowledge management skill for capturing, classifying, searching, and syncing project knowledge. Use when storing learnings, syncing BKD issue outcomes, or retrieving past decisions and patterns. Memos is the storage backend.
What this skill does
# Knowledge Palace
Capture and retrieve project knowledge. Storage backend: Memos (`$MEMOS_URL`, `$MEMOS_TOKEN`).
## Always-On Rules
1. Confirm `$MEMOS_URL` and `$MEMOS_TOKEN` before any operation. If missing, ask the user.
2. Every knowledge entry must have a **type tag**.
3. Before writing, **always check for duplicates** by topicHash.
4. One memo = one knowledge point. Never bundle multiple topics into a single memo.
5. Related knowledge points must be linked via memo relations (`REFERENCE`).
6. **Before implementing**: query relevant knowledge first. Check for existing decisions, discoveries, and patterns that may apply to the current task.
## When to Query
Agents should query the knowledge base in these situations:
- **Hitting an error or unexpected behavior**: query `#discovery` + keyword — someone may have seen this before
- **Making a technical choice**: query `#decision` + keyword — check if a decision was already made and why
- **Implementing a pattern**: query `#pattern` + keyword — reuse proven approaches
- **Verifying an assumption**: query `#fact` + keyword — confirm before building on it
## Knowledge Types
5 types, flat tags, exactly one per memo:
`#fact` · `#event` · `#discovery` · `#decision` · `#pattern`
Additional tags are optional and free-form — agent decides based on content.
Full classification rules, content guidelines, and quality checks: see `references/classification.md`.
## Memo Format
```markdown
## {title}
{content — preserve context and reasoning, not just the conclusion}
#fact
<!-- {topicHash} from:{origin} -->
```
- Bottom comment is metadata: `topicHash` (dedup key, first 8 chars of md5(title)) + `from:` (knowledge origin, e.g. `session`, `bkd/issueId`, `manual`)
- Tags go in content body, not in metadata
## Operations
### Write
```bash
AUTH="Authorization: Bearer $MEMOS_TOKEN"
API="$MEMOS_URL/api/v1"
# 1. Check duplicate by topicHash
HASH=$(echo -n "Title here" | md5sum | cut -c1-8)
EXISTS=$(curl -s -H "$AUTH" \
"$API/memos?filter=content.contains(\"$HASH\")" \
| jq '.memos | length')
# 2. Create (if not exists)
curl -s -X POST -H "$AUTH" -H 'Content-Type: application/json' \
"$API/memos" \
-d '{"content":"## Title\n\nContent\n\n#fact\n\n<!-- '"$HASH"' from:session -->","visibility":"PRIVATE"}' | jq
# 3. Update (if exists and changed)
curl -s -X PATCH -H "$AUTH" -H 'Content-Type: application/json' \
"$API/memos/{uid}?updateMask=content" \
-d '{"content":"...updated..."}' | jq
# 4. Link related memos
curl -s -X PATCH -H "$AUTH" -H 'Content-Type: application/json' \
"$API/memos/{uid}/relations" \
-d '{"relations":[{"relatedMemo":"memos/{otherUid}","type":"REFERENCE"}]}' | jq
```
### Query
Use queries to retrieve knowledge before acting. Return content to the agent context.
```bash
# By type
curl -s -H "$AUTH" "$API/memos?filter=tag+in+[\"discovery\"]" \
| jq '.memos[]|{uid,snippet}'
# By type + keyword
curl -s -H "$AUTH" "$API/memos?filter=tag+in+[\"decision\"]" \
| jq '.memos[]|.content' | grep -i "keyword"
# Full-text search
curl -s -H "$AUTH" \
"$API/memos?filter=content.contains(\"keyword\")" \
| jq '.memos[]|{uid,snippet}'
# Get full content
curl -s -H "$AUTH" "$API/memos/{uid}" | jq '.content'
# Follow links
curl -s -H "$AUTH" "$API/memos/{uid}/relations" \
| jq '.relations[].relatedMemo'
```
### Capture
During a conversation, when the user says "remember this" / "save this" / "store this",
or when the agent identifies knowledge worth preserving:
1. Extract one or more knowledge points from the current conversation
2. For each point, assign type + tags, generate topicHash
3. Dedup → create/update → link if multiple points
The agent should also **proactively suggest** capturing when it encounters:
- A non-obvious technical fact confirmed through debugging
- A decision made after weighing alternatives
- A gotcha or pitfall discovered during implementation
- A reusable pattern or workflow that worked well
### Consolidate
On-demand: user asks to clean up or the agent notices overlapping memos during a query.
1. Load a tag group: `curl -s -H "$AUTH" "$API/memos?filter=tag+in+[\"auth\"]&pageSize=100" | jq`
2. Review for near-duplicates, superseded facts, or fragments
3. Merge into one memo, archive originals — see `references/knowledge-sync.md` for details
## Reference Packs
- `references/classification.md`
Type definitions, content guidelines, tagging rules, quality checks, consolidation rules.
- `references/storage-api.md`
Memos REST API reference (CRUD, filters, relations, pagination, attachments).
- `references/knowledge-sync.md`
Automated sync workflow: scanning, extraction, dedup, incremental update, automation guide.
## Quick Routing
- Classifying or formatting knowledge: load `references/classification.md`.
- API details (updateMask, filters, error codes): load `references/storage-api.md`.
- Automated sync from task systems: load `references/knowledge-sync.md`.
- Simple capture or query: use operations above directly.
Related in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.