skillmem 0.9.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- skillmem-0.9.0/.claude-plugin/marketplace.json +18 -0
- skillmem-0.9.0/.claude-plugin/plugin.json +28 -0
- skillmem-0.9.0/.github/workflows/ci.yml +60 -0
- skillmem-0.9.0/.github/workflows/release.yml +33 -0
- skillmem-0.9.0/.gitignore +13 -0
- skillmem-0.9.0/CHANGELOG.md +37 -0
- skillmem-0.9.0/LICENSE +201 -0
- skillmem-0.9.0/PKG-INFO +184 -0
- skillmem-0.9.0/README.md +149 -0
- skillmem-0.9.0/bench/README.md +20 -0
- skillmem-0.9.0/bench/longmemeval.py +137 -0
- skillmem-0.9.0/docs/PUBLISHING.md +162 -0
- skillmem-0.9.0/hooks/hooks.json +37 -0
- skillmem-0.9.0/install.ps1 +196 -0
- skillmem-0.9.0/install.sh +261 -0
- skillmem-0.9.0/pyproject.toml +67 -0
- skillmem-0.9.0/scripts/mcp_smoke.py +141 -0
- skillmem-0.9.0/server.json +39 -0
- skillmem-0.9.0/skillmem/__init__.py +1 -0
- skillmem-0.9.0/skillmem/cli.py +1231 -0
- skillmem-0.9.0/skillmem/embed.py +129 -0
- skillmem-0.9.0/skillmem/export.py +101 -0
- skillmem-0.9.0/skillmem/hooks.py +521 -0
- skillmem-0.9.0/skillmem/mcp_server.py +474 -0
- skillmem-0.9.0/skillmem/migrate.py +231 -0
- skillmem-0.9.0/skillmem/schedule.py +412 -0
- skillmem-0.9.0/skillmem/server.py +446 -0
- skillmem-0.9.0/skillmem/storage.py +1773 -0
- skillmem-0.9.0/skillmem/vault.py +261 -0
- skillmem-0.9.0/tests/__init__.py +0 -0
- skillmem-0.9.0/tests/conftest.py +36 -0
- skillmem-0.9.0/tests/test_body_files.py +78 -0
- skillmem-0.9.0/tests/test_briefing.py +66 -0
- skillmem-0.9.0/tests/test_cli_init.py +116 -0
- skillmem-0.9.0/tests/test_discover.py +38 -0
- skillmem-0.9.0/tests/test_export.py +205 -0
- skillmem-0.9.0/tests/test_hash_chain.py +59 -0
- skillmem-0.9.0/tests/test_hooks.py +189 -0
- skillmem-0.9.0/tests/test_lifecycle.py +58 -0
- skillmem-0.9.0/tests/test_mcp.py +164 -0
- skillmem-0.9.0/tests/test_migrate_surrogates.py +53 -0
- skillmem-0.9.0/tests/test_schedule_linux.py +175 -0
- skillmem-0.9.0/tests/test_semantic.py +72 -0
- skillmem-0.9.0/tests/test_server.py +231 -0
- skillmem-0.9.0/tests/test_skills.py +125 -0
- skillmem-0.9.0/tests/test_storage.py +115 -0
- skillmem-0.9.0/tests/test_upgrade_github.py +141 -0
- skillmem-0.9.0/tests/test_vault.py +117 -0
- skillmem-0.9.0/tests/test_windows_compat.py +96 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "liza-studio",
|
|
3
|
+
"owner": {
|
|
4
|
+
"name": "Liza Studio",
|
|
5
|
+
"url": "https://github.com/liza-studio"
|
|
6
|
+
},
|
|
7
|
+
"plugins": [
|
|
8
|
+
{
|
|
9
|
+
"name": "skillmem",
|
|
10
|
+
"source": "./",
|
|
11
|
+
"description": "Self-improving skill memory for Claude Code: MCP server (8 tools) + 6 memory hooks. Requires the skillmem Python package on PATH (pip install skillmem).",
|
|
12
|
+
"version": "0.9.0",
|
|
13
|
+
"author": {
|
|
14
|
+
"name": "Liza Studio"
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "skillmem",
|
|
3
|
+
"displayName": "skillmem",
|
|
4
|
+
"version": "0.9.0",
|
|
5
|
+
"description": "Self-improving skill memory for Claude Code: learn, recall, reinforce, decay. Wires the skillmem MCP server (8 tools) and 6 memory hooks. Requires the skillmem Python package on PATH (pip install skillmem).",
|
|
6
|
+
"author": {
|
|
7
|
+
"name": "Liza Studio",
|
|
8
|
+
"url": "https://github.com/liza-studio"
|
|
9
|
+
},
|
|
10
|
+
"homepage": "https://skillmem.dev",
|
|
11
|
+
"repository": "https://github.com/liza-studio/skillmem",
|
|
12
|
+
"license": "Apache-2.0",
|
|
13
|
+
"keywords": [
|
|
14
|
+
"memory",
|
|
15
|
+
"skills",
|
|
16
|
+
"self-improving",
|
|
17
|
+
"mcp",
|
|
18
|
+
"hooks",
|
|
19
|
+
"sqlite",
|
|
20
|
+
"recall"
|
|
21
|
+
],
|
|
22
|
+
"hooks": "./hooks/hooks.json",
|
|
23
|
+
"mcpServers": {
|
|
24
|
+
"skillmem": {
|
|
25
|
+
"command": "skillmem-mcp"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
pull_request:
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
test:
|
|
9
|
+
name: test (${{ matrix.os }}, py${{ matrix.python }})
|
|
10
|
+
strategy:
|
|
11
|
+
fail-fast: false
|
|
12
|
+
matrix:
|
|
13
|
+
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
14
|
+
python: ["3.11", "3.13"]
|
|
15
|
+
runs-on: ${{ matrix.os }}
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v4
|
|
18
|
+
- uses: actions/setup-python@v5
|
|
19
|
+
with:
|
|
20
|
+
python-version: ${{ matrix.python }}
|
|
21
|
+
# Deliberately WITHOUT the [semantic] extra: no 220 MB model download in
|
|
22
|
+
# the matrix. test_semantic.py skips itself when the embedder is absent.
|
|
23
|
+
- name: Install (no semantic extra)
|
|
24
|
+
run: python -m pip install -e ".[test]"
|
|
25
|
+
- name: Run tests
|
|
26
|
+
run: python -m pytest -q
|
|
27
|
+
|
|
28
|
+
build:
|
|
29
|
+
name: build (packaging smoke)
|
|
30
|
+
runs-on: ubuntu-latest
|
|
31
|
+
steps:
|
|
32
|
+
- uses: actions/checkout@v4
|
|
33
|
+
- uses: actions/setup-python@v5
|
|
34
|
+
with:
|
|
35
|
+
python-version: "3.12"
|
|
36
|
+
- name: Install build
|
|
37
|
+
run: python -m pip install build
|
|
38
|
+
- name: Build sdist + wheel
|
|
39
|
+
run: python -m build
|
|
40
|
+
|
|
41
|
+
test-semantic:
|
|
42
|
+
name: test-semantic (ubuntu, py3.12)
|
|
43
|
+
runs-on: ubuntu-latest
|
|
44
|
+
steps:
|
|
45
|
+
- uses: actions/checkout@v4
|
|
46
|
+
- uses: actions/setup-python@v5
|
|
47
|
+
with:
|
|
48
|
+
python-version: "3.12"
|
|
49
|
+
- name: Cache embedding model
|
|
50
|
+
uses: actions/cache@v4
|
|
51
|
+
with:
|
|
52
|
+
path: ~/.cache/skillmem-models
|
|
53
|
+
# Bump the suffix when MODEL_NAME in skillmem/embed.py changes.
|
|
54
|
+
key: fastembed-paraphrase-multilingual-MiniLM-L12-v2-v1
|
|
55
|
+
- name: Install (with semantic extra)
|
|
56
|
+
run: python -m pip install -e ".[test,semantic]"
|
|
57
|
+
- name: Run tests (semantic recall enabled)
|
|
58
|
+
env:
|
|
59
|
+
SKILLMEM_MODEL_CACHE: /home/runner/.cache/skillmem-models
|
|
60
|
+
run: python -m pytest -q
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
name: release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags: ["v*"]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
build:
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
steps:
|
|
11
|
+
- uses: actions/checkout@v4
|
|
12
|
+
- uses: actions/setup-python@v5
|
|
13
|
+
with:
|
|
14
|
+
python-version: "3.12"
|
|
15
|
+
- run: python -m pip install build
|
|
16
|
+
- run: python -m build
|
|
17
|
+
- uses: actions/upload-artifact@v4
|
|
18
|
+
with:
|
|
19
|
+
name: dist
|
|
20
|
+
path: dist/
|
|
21
|
+
|
|
22
|
+
publish:
|
|
23
|
+
needs: build
|
|
24
|
+
runs-on: ubuntu-latest
|
|
25
|
+
environment: pypi
|
|
26
|
+
permissions:
|
|
27
|
+
id-token: write # OIDC for PyPI Trusted Publishing — no stored token
|
|
28
|
+
steps:
|
|
29
|
+
- uses: actions/download-artifact@v4
|
|
30
|
+
with:
|
|
31
|
+
name: dist
|
|
32
|
+
path: dist/
|
|
33
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## Unreleased
|
|
4
|
+
|
|
5
|
+
- Distribution packaging (no code changes): Claude Code plugin
|
|
6
|
+
(`.claude-plugin/plugin.json` + `hooks/hooks.json` + single-plugin
|
|
7
|
+
marketplace), MCP Registry manifest (`server.json`,
|
|
8
|
+
`io.github.liza-studio/skillmem`), and the publishing runbook
|
|
9
|
+
`docs/PUBLISHING.md` (PyPI → MCP Registry → plugin).
|
|
10
|
+
|
|
11
|
+
## 0.9.0 — first public release
|
|
12
|
+
|
|
13
|
+
Self-improving skills for Claude Code, extracted from an internal agent-memory
|
|
14
|
+
project and released under Apache-2.0.
|
|
15
|
+
|
|
16
|
+
- Skill learning loop: `mem_learn` / `mem_recall` / `mem_reinforce` with an
|
|
17
|
+
Ebbinghaus strength model, scheduled decay, and an active → stale → archived
|
|
18
|
+
lifecycle (archived skills are snapshotted to JSONL, never deleted).
|
|
19
|
+
- Hybrid local search: FTS5 BM25 with Snowball stemming (English + Russian)
|
|
20
|
+
fused via Reciprocal Rank Fusion with optional local ONNX embeddings
|
|
21
|
+
(`fastembed`, multilingual, cross-lingual RU↔EN). No cloud, no API keys.
|
|
22
|
+
- MCP stdio server with 8 tools (`mem_search`, `mem_get`, `mem_list`,
|
|
23
|
+
`mem_write`, `mem_update`, `mem_learn`, `mem_recall`, `mem_reinforce`).
|
|
24
|
+
- 6 Claude Code hooks: mcp-guard, briefing inject, session-history,
|
|
25
|
+
verify-gate (bilingual triggers), auto-recall, tool-recall — plus a Stop-time
|
|
26
|
+
session recap and auto-migration of session notes.
|
|
27
|
+
- Tamper-evident SHA256 hash-chain over the edit history (`skillmem verify`).
|
|
28
|
+
- Secret scrubbing on every write (API keys, PEM blocks, JWTs, tokens,
|
|
29
|
+
password assignments).
|
|
30
|
+
- Provenance guarantees: unique slugs, refusal of silent overwrites,
|
|
31
|
+
near-duplicate detection, reasons required for updates and deletes.
|
|
32
|
+
- Markdown round-trip: `export-all` / `import-vault` — your data stays plain
|
|
33
|
+
markdown with YAML frontmatter.
|
|
34
|
+
- Cross-platform installers (`install.sh`, `install.ps1`) and scheduled
|
|
35
|
+
maintenance via launchd / schtasks / cron (`skillmem schedule`).
|
|
36
|
+
- Optional multi-agent HTTP server with bearer tokens and per-agent
|
|
37
|
+
visibility scoping (`skillmem serve`).
|
skillmem-0.9.0/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2026 Liza Studio
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
skillmem-0.9.0/PKG-INFO
ADDED
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: skillmem
|
|
3
|
+
Version: 0.9.0
|
|
4
|
+
Summary: Self-improving skills for Claude Code — your agent learns, recalls, reinforces, and forgets. SQLite + FTS5 + local embeddings + MCP.
|
|
5
|
+
Project-URL: Homepage, https://skillmem.dev
|
|
6
|
+
Project-URL: Repository, https://github.com/liza-studio/skillmem
|
|
7
|
+
Author: Liza Studio
|
|
8
|
+
License-Expression: Apache-2.0
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Keywords: agent-memory,claude-code,embeddings,fts5,hooks,mcp,self-improving,skills,sqlite
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Environment :: Console
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Operating System :: OS Independent
|
|
15
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
19
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
20
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
21
|
+
Requires-Python: >=3.11
|
|
22
|
+
Requires-Dist: click>=8.1.7
|
|
23
|
+
Requires-Dist: fastapi>=0.111
|
|
24
|
+
Requires-Dist: mcp<2,>=1.0.0
|
|
25
|
+
Requires-Dist: platformdirs>=4.2.0
|
|
26
|
+
Requires-Dist: pyyaml>=6.0.1
|
|
27
|
+
Requires-Dist: snowballstemmer>=2.2
|
|
28
|
+
Requires-Dist: uvicorn[standard]>=0.30
|
|
29
|
+
Provides-Extra: semantic
|
|
30
|
+
Requires-Dist: fastembed>=0.8; extra == 'semantic'
|
|
31
|
+
Requires-Dist: numpy>=1.26; extra == 'semantic'
|
|
32
|
+
Provides-Extra: test
|
|
33
|
+
Requires-Dist: pytest>=8.0; extra == 'test'
|
|
34
|
+
Description-Content-Type: text/markdown
|
|
35
|
+
|
|
36
|
+
# skillmem
|
|
37
|
+
|
|
38
|
+
<!-- mcp-name: io.github.liza-studio/skillmem -->
|
|
39
|
+
|
|
40
|
+
[](https://github.com/liza-studio/skillmem/actions/workflows/ci.yml)
|
|
41
|
+
|
|
42
|
+
**Self-improving skills for Claude Code — your agent learns, recalls, reinforces, and forgets.**
|
|
43
|
+
|
|
44
|
+
skillmem gives Claude Code a local, persistent skill & memory layer. After every non-trivial task the agent can record *how it was done* as a skill; before the next task it recalls the relevant ones; skills that keep proving useful get stronger, and skills nobody uses fade away — the way human memory works.
|
|
45
|
+
|
|
46
|
+
- **$0 per write and per read** — no LLM calls, no cloud, no API keys. Plain SQLite on your disk.
|
|
47
|
+
- **Bilingual hybrid search, fully local** — FTS5 BM25 + Snowball stemming (EN/RU) + a multilingual ONNX embedding model. A Russian query finds an English skill and vice versa, all on CPU, offline.
|
|
48
|
+
- **Ebbinghaus strength model** — `reinforce` bumps a skill's strength, scheduled decay fades unused ones, lifecycle sweeps move dead skills to a backed-up archive (never deleted).
|
|
49
|
+
- **Tamper-evident history** — every edit is appended to a SHA256 hash-chain; `skillmem verify` detects any after-the-fact tampering.
|
|
50
|
+
- **Deep Claude Code integration** — 6 hooks + 8 MCP tools installed with one command.
|
|
51
|
+
- **Cross-platform** — macOS (launchd), Windows (schtasks), Linux (systemd user timers, cron fallback).
|
|
52
|
+
- **No vendor lock** — `export-all` dumps everything to plain markdown with YAML frontmatter; re-importing the dump yields the same records.
|
|
53
|
+
|
|
54
|
+
## Why
|
|
55
|
+
|
|
56
|
+
Agents repeat their mistakes because each session starts from zero. Existing "memory" tools store facts; skillmem stores *procedures* — trigger, steps, outcome, lessons — and ranks them by how often they actually helped. The write path costs nothing, so the agent can afford to learn from every task.
|
|
57
|
+
|
|
58
|
+
## Quickstart
|
|
59
|
+
|
|
60
|
+
macOS / Linux:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
bash install.sh # installs python + uv if needed, venv, symlinks
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Windows (PowerShell):
|
|
67
|
+
|
|
68
|
+
```powershell
|
|
69
|
+
powershell -ExecutionPolicy Bypass -File install.ps1
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Or from a checkout:
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
uv venv && uv pip install -e '.[semantic]'
|
|
76
|
+
source .venv/bin/activate # or prefix the commands below with `uv run`
|
|
77
|
+
skillmem init --claude-code # wires MCP server + hooks into Claude Code
|
|
78
|
+
skillmem doctor # health check: DB, schema, semantic status
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
`init --claude-code` registers the MCP server in `~/.claude.json` and the hooks in `~/.claude/settings.json` (idempotent, with backups). Use `--hooks minimal` for just the Stop→migrate hook, or `--hooks none` for MCP only.
|
|
82
|
+
|
|
83
|
+
### Claude Code plugin & MCP Registry (coming soon)
|
|
84
|
+
|
|
85
|
+
The repo already carries a Claude Code plugin (`.claude-plugin/` + `hooks/hooks.json` — MCP server and all hooks in one install) and an MCP Registry manifest (`server.json`). Both go live once the `skillmem` package is published on PyPI; until then, use the installers above. Once live:
|
|
86
|
+
|
|
87
|
+
```
|
|
88
|
+
/plugin marketplace add liza-studio/skillmem
|
|
89
|
+
/plugin install skillmem@liza-studio
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
The plugin requires the skillmem Python package on PATH and replaces `skillmem init --claude-code`'s wiring — use one or the other, not both (see [docs/PUBLISHING.md](docs/PUBLISHING.md)).
|
|
93
|
+
|
|
94
|
+
## How it works
|
|
95
|
+
|
|
96
|
+
```
|
|
97
|
+
learn ──▶ recall ──▶ reinforce ──▶ decay
|
|
98
|
+
│ │ │ │
|
|
99
|
+
│ │ │ └─ daily job: unused skills lose strength;
|
|
100
|
+
│ │ │ fully faded ones are archived (backed up)
|
|
101
|
+
│ │ └─ strength +0.15 when a skill proves useful
|
|
102
|
+
│ └─ hybrid BM25 + vector search, strength-weighted ranking
|
|
103
|
+
└─ after a hard task: trigger / steps / outcome / lessons
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
1. **learn** — after a task that took real debugging, the agent calls `mem_learn` with a slug, trigger, steps, outcome, and lessons.
|
|
107
|
+
2. **recall** — before the next task, `mem_recall` (or the automatic hooks) surfaces the most relevant skills, fusing lexical and semantic signals via Reciprocal Rank Fusion.
|
|
108
|
+
3. **reinforce** — when a recalled skill helped, `mem_reinforce` bumps its strength, so proven skills rank higher next time.
|
|
109
|
+
4. **decay** — a scheduled `skillmem decay` run applies Ebbinghaus-style forgetting; skills untouched for months drift to `stale`, then to an `archived` state (excluded from recall, restorable with one command, snapshotted to JSONL first).
|
|
110
|
+
|
|
111
|
+
## MCP tools
|
|
112
|
+
|
|
113
|
+
| Tool | What it does |
|
|
114
|
+
| --- | --- |
|
|
115
|
+
| `mem_search` | Hybrid full-text search (FTS5 BM25 + optional vector recall) over all memories |
|
|
116
|
+
| `mem_get` | Fetch one memory by slug, with history and wikilinks |
|
|
117
|
+
| `mem_list` | List memories by kind/project, most recent first |
|
|
118
|
+
| `mem_write` | Insert a new memory; refuses silent overwrites and near-duplicates |
|
|
119
|
+
| `mem_update` | Update an existing memory; old version is kept in the hash-chained history |
|
|
120
|
+
| `mem_learn` | Record an after-action skill (trigger / steps / outcome / lessons) |
|
|
121
|
+
| `mem_recall` | Find relevant skills for a task, strength-weighted; auto-reinforces |
|
|
122
|
+
| `mem_reinforce` | Explicitly bump a skill's strength after it proved useful |
|
|
123
|
+
|
|
124
|
+
## Hooks
|
|
125
|
+
|
|
126
|
+
| Event | Hook | What it injects |
|
|
127
|
+
| --- | --- | --- |
|
|
128
|
+
| SessionStart | `mcp-guard` | Warns when configured MCP servers are missing vs a baseline |
|
|
129
|
+
| SessionStart | `inject` | Compact title-only briefing of your `user`/`feedback` memories |
|
|
130
|
+
| SessionStart | `session-history` | Recaps of the last 3 sessions in this project |
|
|
131
|
+
| UserPromptSubmit | `verify-gate` | "Search before you claim" reminder on time-sensitive prompts (bilingual EN/RU triggers) |
|
|
132
|
+
| UserPromptSubmit | `auto-recall` | Relevant feedback + skills matched against the prompt |
|
|
133
|
+
| PreToolUse | `tool-recall` | Skills/warnings matched against the Bash command or edited file path |
|
|
134
|
+
| Stop | `session-recap` | Distills the session into a markdown note via `claude -p` (recap language mirrors the session) |
|
|
135
|
+
| Stop | `migrate` | Indexes new session notes into the database |
|
|
136
|
+
|
|
137
|
+
All hooks are best-effort: a broken database or missing model never blocks Claude Code.
|
|
138
|
+
|
|
139
|
+
## CLI highlights
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
skillmem learn skill-x -t "..." --trigger "..." --steps "..." --outcome success
|
|
143
|
+
skillmem recall "deploy the bot to prod"
|
|
144
|
+
skillmem skills # list skills with strength bars
|
|
145
|
+
skillmem decay --days 14 # manual decay + lifecycle sweep
|
|
146
|
+
skillmem search "hash chain" --kind feedback
|
|
147
|
+
skillmem verify --strict # check the tamper-evidence chain
|
|
148
|
+
skillmem export-all ./vault # markdown round-trip, no lock-in
|
|
149
|
+
skillmem import-vault ~/Obsidian/Notes
|
|
150
|
+
skillmem schedule install # decay daily 04:15, export weekly Sun 04:30
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
## Uninstall
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
skillmem uninstall # removes MCP entry, hooks, scheduled jobs; keeps the DB
|
|
157
|
+
skillmem uninstall --purge-db # ...and deletes the database
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
Config edits are made atomically with timestamped backups, and corrupt JSON is never overwritten.
|
|
161
|
+
|
|
162
|
+
## Benchmarks
|
|
163
|
+
|
|
164
|
+
Retrieval quality on [LongMemEval](https://github.com/xiaowu0162/LongMemEval) (Wu et al., ICLR 2025), full oracle set, **hybrid retrieval** (FTS5 BM25 + Snowball stemming + `paraphrase-multilingual-MiniLM-L12-v2` embeddings, RRF fusion), k=5, CPU only:
|
|
165
|
+
|
|
166
|
+
| Question type | n | hit@5 | MRR |
|
|
167
|
+
|---|---|---|---|
|
|
168
|
+
| **Overall** | **479** | **0.871** | **0.622** |
|
|
169
|
+
| single-session-assistant | 56 | 0.982 | 0.746 |
|
|
170
|
+
| knowledge-update | 72 | 0.944 | 0.676 |
|
|
171
|
+
| single-session-user | 64 | 0.938 | 0.719 |
|
|
172
|
+
| multi-session | 125 | 0.848 | 0.568 |
|
|
173
|
+
| single-session-preference | 30 | 0.833 | 0.465 |
|
|
174
|
+
| temporal-reasoning | 132 | 0.780 | 0.579 |
|
|
175
|
+
|
|
176
|
+
Median 0.76 s per query on a laptop CPU, no LLM calls, no network. The pipeline is deterministic: repeated runs produce identical numbers. Reproduce with `python bench/longmemeval.py --sample 0 -k 5` (see [bench/README.md](bench/README.md) for the oracle file and reporting rules — we don't publish bare percentages without stating the retrieval mode and embedding model, and we encourage other tools to do the same).
|
|
177
|
+
|
|
178
|
+
## License
|
|
179
|
+
|
|
180
|
+
Apache-2.0 — see [LICENSE](LICENSE).
|
|
181
|
+
|
|
182
|
+
---
|
|
183
|
+
|
|
184
|
+
Built by **Liza Studio**.
|