360 Secure SkillHub
360 安全技能中心

projects-hub

在 Hermes 项目工作区中维护项目说明 .hermes.md、项目级 MEMORY.md、知识片段、固定引用的仓库文件和参考链接,并提供本地 RAG 检索、项目注册与发现命令。依赖 Hermes 的 projects.db、桌面插件和 HERMES_HOME 目录。

分类:知识
efendiminati
efendiminati
热度 9.44
最近更新 2026-11-29 06:34:17

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add efendiminati/projects-hub
兼容性
Hermes 专属
联网要求
不联网
数据出网
数据不出本机
Metadata
name
projects-hub
description
Use in Hermes projects. Manage instructions, memory, RAG.
version
1.1.0
author
Efendiminati
license
MIT
metadata
{"hermes":{"tags":["projects","workspace","memory","rag","desktop-plugin","kanban"],"related_skills":["hermes-agent","obsidian"]}}

Projects Hub (Claude Projects Parity + Hermes Upgrades)

When to Use

  • Creating, organizing, or working inside a named Hermes Project (projects.db + Desktop Projects tab).
  • Updating a project's standing instructions (.hermes.md), project-scoped MEMORY.md, knowledge snippets, pinned repo files, or reference links.
  • Running local RAG search across a project's knowledge base before answering or editing code.

Workspace Layout (Per Project)

Inside a project's primary folder (<root>), Projects Hub stores durable workspace state in standard files:

  • Project Instructions: <root>/.hermes.md is the file this hub saves; Hermes auto-injects it into every session rooted in <root> (20,000-char cap). An existing AGENTS.md / CLAUDE.md / .cursorrules in the folder is read for display only — the hub leaves those other tools' files untouched.
  • Project Memory: <root>/.hermes-project/MEMORY.md — project-scoped decisions, requirements, and pitfalls (isolated from other projects; use_account_memory toggle in project.json).
  • Project Knowledge: <root>/.hermes-project/knowledge/ (text/markdown/code snippets) + pinned_files in <root>/.hermes-project/project.json (live references to repo files, no duplication).
  • Reference Links: links in <root>/.hermes-project/project.json.
  • Kanban Link: tasks whose project_id matches the project's id (or tenant/workspace_path matches) surface in the project's Kanban tab.

Projects without a local folder store metadata under $HERMES_HOME/plugin-data/projects-hub/workspaces/<project_id>/.

Agent Rules When Working in a Project

  1. Check project memory on entry: If <cwd>/.hermes-project/MEMORY.md exists, read it before making architectural changes.
  2. Save durable project learnings to MEMORY.md, not global memory: requirements, architecture decisions, and repo pitfalls belong in <root>/.hermes-project/MEMORY.md.
  3. Search knowledge before asking: When a project has .hermes-project/knowledge/ or pinned files, run scripts/project_ctl.py search <slug> "<query>" for fast local RAG retrieval.
  4. Keep instructions tight: .hermes.md is injected on every turn — target 40–60 lines (commands, invariants, gotchas), never dump full docs there; put reference docs in .hermes-project/knowledge/. Hermes also reads an existing AGENTS.md / CLAUDE.md when one is present, but this hub never writes those files (the save endpoint rejects them with a 400) — they belong to the other tools that own them.
  5. Register every new project folder: Hermes's projects.db starts empty and nothing auto-populates it. When you create, scaffold, or clone a repo for the user, register it in the same turn — python scripts/project_ctl.py import <dir> (or hermes project create <name> <path>) — and seed a concise .hermes.md. Otherwise the project never appears in the Projects tab and future sessions fall back to global memory / session_search to find it.
  6. Pin instead of copy: for repo files, pin the path (pin <slug> <rel/path>) so edits stay in sync; store only external snippets as knowledge files.

Desktop UI & Backend

  • Desktop UI: $HERMES_HOME/desktop-plugins/projects-hub/plugin.js — registers Projects sidebar tab (/projects), statusbar active-project chip, ⌘K commands (Open Projects Hub, New Project), and Alt+Mod+P keybind.
  • Backend API: $HERMES_HOME/plugins/projects-hub/dashboard/plugin_api.py mounted at /api/plugins/projects-hub (enable via hermes plugins enable projects-hub).
  • Repo discovery: GET /discover[?roots=a,b] lists unregistered local codebases (git repos, or folders with pyproject.toml / package.json / Cargo.toml / CMakeLists.txt / go.mod) under ~/projects, ~/source/repos, ~/code, ~/dev, ~/workspace, ~; POST /discover/import {"paths": [...]} registers the picks and skips anything already in projects.db, in a project folder, or repeated in the same call. The Desktop Scan repos button is the same pair.
  • Write scope: the instructions endpoint accepts only .hermes.md / HERMES.md; every other context filename is a 400 (see rule 4).
  • Publishing it to the plugin catalog (validation gate, entry YAML, submission PR): load the hermes-agent skill and read its plugin-catalog-submission reference.
  • Hot reload: In Desktop app, run ⌘K → Reload desktop plugins after editing plugin.js.

CLI Helper (scripts/project_ctl.py)

Run via Python from this skill's directory:

  • python scripts/project_ctl.py list — list projects with instruction/memory/knowledge/link counts
  • python scripts/project_ctl.py show <slug> — dump project instructions, memory, knowledge, links
  • python scripts/project_ctl.py set-instructions <slug> --file .hermes.md --text "..."
  • python scripts/project_ctl.py add-memory <slug> "<bullet>" — append a dated entry to MEMORY.md
  • python scripts/project_ctl.py add-knowledge <slug> <name.md> --text "..."
  • python scripts/project_ctl.py pin <slug> <rel/path> — pin an existing repo file
  • python scripts/project_ctl.py add-link <slug> <label> <url>
  • python scripts/project_ctl.py search <slug> "<query>" — local RAG search across project context
  • python scripts/project_ctl.py discover — list unregistered local git repos / codebases
  • python scripts/project_ctl.py import <dir> [<dir> ...] — register local folders as projects (skips dupes)