{"id":50782385,"url":"https://github.com/gmzhang/skillmng","last_synced_at":"2026-06-12T04:31:53.420Z","repository":{"id":361742269,"uuid":"1255606158","full_name":"gmzhang/skillmng","owner":"gmzhang","description":"Agent Skills management platform for creation, validation, versioning, LLM-assisted editing, and Git-backed publishing.","archived":false,"fork":false,"pushed_at":"2026-06-01T03:33:25.000Z","size":51307,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-01T05:08:18.305Z","etag":null,"topics":["agent-skills","codex","developer-tools","fastapi","llm","openai","openai-api","react"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gmzhang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-01T02:25:32.000Z","updated_at":"2026-06-01T03:33:29.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/gmzhang/skillmng","commit_stats":null,"previous_names":["gmzhang/skillmng"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/gmzhang/skillmng","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmzhang%2Fskillmng","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmzhang%2Fskillmng/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmzhang%2Fskillmng/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmzhang%2Fskillmng/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gmzhang","download_url":"https://codeload.github.com/gmzhang/skillmng/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmzhang%2Fskillmng/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34229624,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-12T02:00:06.859Z","response_time":109,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent-skills","codex","developer-tools","fastapi","llm","openai","openai-api","react"],"created_at":"2026-06-12T04:31:52.646Z","updated_at":"2026-06-12T04:31:53.415Z","avatar_url":"https://github.com/gmzhang.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Skill 管理系统\n\nskillmng is an open-source management platform for Agent Skills. It helps maintainers create, validate, version, review, and publish reusable Skills with Git-backed history, secure import/export, audit logs, and LLM-assisted editing workflows.\n\nThe project is especially designed for Codex-style and agentic development workflows where Skills need to be maintained as structured, reviewable, testable software artifacts.\n\n面向 Agent 的 Skill 创建、版本管理、LLM 辅助优化与 Git 托管平台。\n完整需求见 [`feature/prd1.md`](./feature/prd1.md);Skill 文件规范见 [`doc/guifan.md`](./doc/guifan.md)。\n\n## 技术栈\n\n- **后端**:Python 3.11+ / FastAPI / SQLAlchemy 2.x / Alembic / sqlite / GitPython\n- **前端**:React 18 / TypeScript / Vite / Ant Design 5 / Tailwind / TanStack Query / Monaco Editor\n- **持久化**:`./data/skillmng.sqlite3` (后续可平滑迁 PostgreSQL)\n\n## 本地启动\n\n### 1. 准备配置\n\n```bash\ncp .env.example .env\n# 按需修改 .env;敏感字段(token/密钥)切勿提交回仓库\n```\n\n### 2. 启动后端\n\n```bash\ncd backend\npython3 -m venv .venv\n. .venv/bin/activate\npip install -e \".[dev]\"\nalembic upgrade head\nuvicorn app.main:app --reload --port 8000\n```\n\n或直接:`./scripts/run_backend.sh`\n\n### 3. 启动前端\n\n```bash\ncd frontend\npnpm install\npnpm dev\n```\n\n或直接:`./scripts/run_frontend.sh`\n\n### 4. 设置测试 Cookie\n\n打开浏览器访问 \u003chttp://localhost:5173\u003e。当前阶段没有登录页,需要在 DevTools → Application → Cookies → http://localhost:5173 中手动添加:\n\n| 字段 | 值 | 说明 |\n|---|---|---|\n| `user_id` | `alice` | 必需,租户隔离主键 |\n| `user_name` | `Alice` | 可选,展示用 |\n| `user_email` | `alice@example.com` | 可选,Git author 用 |\n\n刷新页面即可看到当前用户信息。换 `user_id=bob` 可验证跨租户隔离。\n\n## 测试\n\n```bash\ncd backend\n. .venv/bin/activate\npytest -x\n```\n\n端到端 smoke test(严格按 PRD §14.3 9 步运行):\n\n```bash\npytest tests/test_smoke.py -v\n```\n\n涵盖测试范围:租户隔离、SKILL.md 校验、路径安全、Skill CRUD、Git 版本(commit/diff/restore)、LLM Mock 完整链路、zip 导入安全。\n\n## 服务器部署\n\n### Docker 构建 \u0026 运行\n\n```bash\nmake build   # 构建镜像\nmake run     # 启动容器\nmake logs    # 查看日志\nmake stop    # 停止容器\n```\n\n### 数据持久化\n\n容器运行时数据挂载在宿主机 `~/skillmng-data/`（可通过 `DATA_DIR` 覆盖）:\n\n```\n~/skillmng-data/\n├── skillmng.sqlite3           # 主数据库（Skill、用户、版本、审计日志等）\n├── skillmng.sqlite3-wal       # SQLite WAL 日志（备份时需一起同步）\n└── git/\n    └── skill-repos/           # 各 Skill 的本地 Git 仓库\n        ├── alice--my-skill/\n        └── bob--code-review/\n```\n\n**OSS 同步注意事项**:\n- 同步 `skillmng.sqlite3` 时必须同时同步 `skillmng.sqlite3-wal` 和 `skillmng.sqlite3-shm`（如果存在），否则数据不完整。\n- 建议在容器停止状态下同步，或使用 `sqlite3 skillmng.sqlite3 \"VACUUM INTO '/tmp/backup.sqlite3'\"` 生成一致性快照再同步。\n- `git/skill-repos/` 是各 Skill 的完整 Git 仓库，已推送到 GIT 的数据可从远端恢复，未推送的仅存在于此目录。\n\n## 目录结构\n\n```\nskillmng/\n├── backend/        Python FastAPI 后端\n├── frontend/       React + Vite 前端\n├── data/           运行时数据(sqlite + Git 工作区,gitignored)\n├── scripts/        启动脚本\n├── feature/prd1.md 需求规格\n├── doc/guifan.md   SKILL.md 公司规范\n├── CLAUDE.md       Agent 协作指引\n└── .env.example    完整配置示例\n```\n\n## 第一阶段范围\n\n按 PRD §18 推进里程碑(本次会话全部完成,共 51 个后端测试通过):\n\n- [x] **M1** — 可运行骨架(双服务、sqlite、Cookie 用户、`.env.example`)\n- [x] **M2** — Skill CRUD + 文件树 + `SKILL.md` 校验\n- [x] **M3** — Git 版本管理(commit、diff、restore)\n- [x] **M4** — LLM 辅助创建/更新(全 Mock,接口预留真实切换)\n- [x] **M5** — 导入导出(zip 安全)+ 审计日志 + smoke test\n\n### 主要功能入口\n\n- `/` 工作台\n- `/skills` Skill 列表(支持搜索、导出、导入 zip)\n- `/skills/new` 创建 Skill(手动 / LLM 辅助 两种模式)\n- `/skills/:id` 详情(文件树 + Monaco 编辑器,发布版本、LLM 辅助更新弹窗)\n- `/skills/:id/versions` 版本历史(发布、恢复、多选对比)\n- `/skills/:id/diff` 版本 diff(Monaco DiffEditor 分文件查看)\n- `/llm-jobs` LLM 任务列表(实时刷新、详情、落地、取消)\n- `/audit-logs` 审计日志\n\n## 关键约束\n\n- Cookie 中的 `user_id` 是**唯一**租户来源,前端 body/query 中的 `user_id` 必须忽略 (PRD §4.2)。\n- 不提交真实 token/SSH 私钥;`.env` 已纳入 `.gitignore`。\n- 中文注释为权威版本(详见 [LEGAL.md](./LEGAL.md))。\n- Git auto-create-via-API 暂不实现,需要管理员先在 `xiaojin-skills` 下手动建仓库,再通过 `PATCH /api/skills/{id}/repository` 绑定 remote URL。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgmzhang%2Fskillmng","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgmzhang%2Fskillmng","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgmzhang%2Fskillmng/lists"}