minecontext
Guides MineContext/OpenContext runtime service, context workflows, configuration, and desktop packaging tasks.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- minecontext
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Guides MineContext/OpenContext runtime service, context workflows, configuration, and desktop packaging tasks.
- disable-model-invocation
- true
02 资源文件 5
- 参考文档references/architecture.md4.6 KB
- 参考文档references/repo-provenance.md2.9 KB
- 参考文档references/repo-routing-metadata.json512 B
- 参考文档references/troubleshooting.md5.1 KB
- 脚本scripts/check_runtime.py5.3 KB
03 SKILL.md 正文
MineContext repo skill
Use this skill for the MineContext repository and its Python backend package,
whose installed distribution is MineContext, import package is opencontext,
and console entry point is opencontext.
MineContext is a local-first context-aware AI partner. Its backend captures screen, document, vault, and web-link context; processes that material into context types; stores it with SQLite plus ChromaDB or Qdrant; and exposes FastAPI routes, web pages, content-generation jobs, and chat/completion flows. The repo also contains an Electron/React desktop app that bundles the Python backend through PyInstaller.
When to use this skill
Use this skill when the task asks to:
- start or debug the
opencontextserver or CLI; - configure model endpoints, API keys, storage, prompts, content-generation intervals, or API authentication;
- ingest screenshots, documents, folders, vault notes, or web links;
- query or troubleshoot MineContext context search, generated activities, todos, tips, reports, chat, completions, or monitoring;
- build the PyInstaller backend executable or Electron desktop app;
- understand the repo's backend/frontend architecture enough to make a focused code or packaging change.
Do not use this skill for unrelated context-management libraries, generic
FastAPI guidance without MineContext-specific APIs, or ordinary Electron apps
that do not bundle the opencontext backend.
First checks
-
Confirm that the current task really names MineContext, OpenContext,
opencontext, or one of its repo-specific surfaces such as screenshot capture, local context storage, generated todos/tips/reports, or the Electron package. -
If a checkout is present and freshness matters, read references/repo-provenance.md. Refresh this skill when the commit, dirty state, package version, or major public paths differ from that snapshot.
-
Verify the installed backend before trusting runtime advice:
python -m pip install -e . python -c "import opencontext; print(opencontext.__version__)" opencontext --helpThe bundled scripts/check_runtime.py performs a broader import and CLI smoke check without starting the server.
-
If the task requires model inference, screenshot analysis, web-link capture, or generated insights, confirm whether the user has a working OpenAI-compatible or Doubao endpoint. Many workflows import offline but need credentials or a local model server for real generation.
Route map
| Task shape | Read next | Why |
|---|---|---|
Start the backend, inspect opencontext start, configure models/auth/storage, upload context, call API routes, or debug runtime behavior |
runtime-service | Owns CLI, FastAPI, capture, processing, storage, context generation, and bundled runtime smokes. |
Build the backend executable, package the Electron app, diagnose pnpm, PyInstaller, helper binaries, signing, or platform packaging |
desktop-packaging | Owns backend/desktop build flow and macOS helper binary guidance. |
| Understand system layers, data flow, and component boundaries before routing | references/architecture.md | Condensed architecture from the repo's own overview and source layout. |
| A failure crosses install/import/config/runtime/build boundaries | references/troubleshooting.md | Cross-cutting recovery before following a workflow-specific troubleshooting page. |
| Updating the managed repo-skill router entry after verification | references/repo-routing-metadata.json | Structured metadata consumed by the repo-skill importer. |
Repository facts to preserve
- Public branding: MineContext.
- Python distribution:
MineContext. - Python import package:
opencontext. - Console command:
opencontext. - Primary server class:
opencontext.server.opencontext.OpenContext. - Default server command:
opencontext start. - Default service port in config and docs:
1733for the user-facing backend debugger, whileopencontext.clifalls back to configured web settings. - Default local storage is rooted under
${CONTEXT_PATH:.}and includes SQLite document storage plus ChromaDB vector collections unless config switches to Qdrant. - Frontend packaging uses
frontend/package.json,electron-builder.yml, and a prebuilt PyInstaller backend copied intofrontend/backend/.
Safe operating rules
- Do not put API keys,
CONTEXT_PATHvalues, local virtualenv paths, or user data paths in generated artifacts or public notes. - Do not run screenshot, VLM, embedding, web-link, or regeneration flows unless the user has supplied credentials, a local model endpoint, and permission for any network/browser work.
- Prefer bundled smoke scripts over original repo examples when checking this skill. The original examples were used as evidence; the skill-owned scripts are the reusable helpers.
- Treat packaging and release commands as mutating operations. Run the desktop-packaging preflight first and ask before deleting build outputs, installing toolchains, or using signing credentials.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).