deepseek-harness
deepseek-ai
DeepSeek Harness: Everything is a Plugin.
PROJECT TOPICS
PROJECT README
@7dgroup/dsh-skill-7d-git-commit
English | 中文
Author: 7DGroup
A DSH (DeepSeek Harness) bundle plugin that registers the 7d-git-commit skill on ctx.skills. Before generating any git commit message, the skill validates it against the 7DGroup commit convention and warns or guides the user to fix violations — a client-side guard that complements the server-side pre-receive hook on gitlab.
The bundled skill is a drop-in composition layer: install the bundle into a DSH profile and the skill becomes available in every session using that profile; remove the bundle to uninstall it cleanly.
| Field | Value |
|---|---|
| Author | 7DGroup |
| Version | 0.1.0-rc.3 |
| Runtime | Node ^22.19.0 || >=24.0.0 · pnpm 10+ · dsh CLI |
| Peer dependencies | @deepseek-ai/cordis · @deepseek-ai/dsh-skill · @deepseek-ai/dsh-invariants |
| Skill name | 7d-git-commit |
| GitLab compatibility | GitLab CE 19.2.0 (server-side hooks) |
| Repository | github.com/7dgroup-ai/dsh-skill-7d-git-commit |
| License | MIT |
git commit is executed.【新增】, 【修复】, 【优化】, 【文档】, etc.[skip-check] deployments.references/git-commit-message.md acts as the source of truth and is loaded on demand.dsh-skill-7d-git-commit/
├── src/
│ ├── index.ts # Cordis plugin: registers the skill provider
│ └── invariant.ts # Package-owned invariant companion
├── assets/7d-git-commit/
│ ├── SKILL.md # Skill body (validation logic)
│ └── references/
│ └── git-commit-message.md # 7DGroup commit convention reference
├── assets/images/
│ └── 7d-git-commit-cover.jpg # README cover image
├── tests/
│ └── skill-7d-git-commit.spec.ts
├── cordis.patch.yml # Composition layer patch
├── tsdown.config.ts # Self-contained transpile config
├── package.json
└── README.md / README.zh.md
Prerequisites: dsh CLI, Node ^22.19.0 || >=24.0.0, pnpm 10+.
dsh plugin --profile web add github:7dgroup-ai/dsh-skill-7d-git-commit
For the first git install, pnpm will refuse to run the build script until you add the exact package key to the profile's pnpm-workspace.yaml under allowBuilds. Then re-run the same command.
To avoid the build authorization, use a pre-built tarball or the published npm package:
dsh plugin --profile web add @7dgroup/dsh-skill-7d-git-commit
The most direct way — just ask the agent in any dsh conversation, and it runs the install for you. Use the GitHub spec — the npm name @7dgroup/dsh-skill-7d-git-commit only works after the package is published:
安装插件 github:7dgroup-ai/dsh-skill-7d-git-commit
(Or in English: "Install the plugin github:7dgroup-ai/dsh-skill-7d-git-commit" — the agent executes the equivalent dsh plugin command through its session shell.)
For a git install the agent will hit the same pnpm allowBuilds gate and print the exact key to add to the profile's pnpm settings file (~/.dsh/profiles/<name>/pnpm-workspace.yaml); after you add it, ask the agent to retry and the skill is enabled.
pnpm install
pnpm build # tsdown; also runs as `prepare` on git installs
pnpm test # vitest
Once installed, mention any commit-related request in a dsh session:
Generate a commit message for the current changes.
You can also trigger the skill explicitly with the slash command:
/7d-git-commit
Example triggers:
The skill will:
【类型】动作 + 对象) ≤ 50 chars without trailing punctuation.See assets/7d-git-commit/references/git-commit-message.md for the full 7DGroup rules.
High-level requirements:
【类型】简短描述。, ,, ., ,@ # $ % ^ & * ~The plugin provides both a client-side DSH skill and a server-side GitLab hook. Use them together for "client pre-check + server enforcement".
Compatibility: The server-side integration is adapted for and verified on GitLab CE 19.2.0 (custom hooks + rule configuration).
assets/7d-git-commit/SKILL.md validates commit messages before git commit.docs/gitlab-integration/pre-receive validates pushes before they reach GitLab.assets/7d-git-commit/references/git-commit-message.md shared by both sides.The first thing you do when receiving a new code drop is read the git log. A messy log that does not tell you what each commit actually did makes reviews and maintenance painful. Well-formed commit messages (a changelog) help others review the code, produce Release Notes efficiently, and matter greatly for version management. That is why we use GitLab server-side hooks to validate the git change log and block non-conforming commits.
pre-receive stageGitLab runs three server-side hooks after a push (the flow the server performs):
| Hook | Stage | Role |
|---|---|---|
pre-receive |
before push is applied | runs as soon as the push reaches the GitLab server — the interception point |
update |
during push | commits the update into the GitLab repository |
post-receive |
after push | runs after the push succeeds — used for notifications |
Flow:
flowchart LR
A[user push] --> B{pre-receive<br>intercept before apply}
B -- "non-zero" --> C[push rejected<br>non-conforming commit]
B -- 0 --> D[update<br>apply to repository]
D --> E[post-receive<br>notify]
Validating at the pre-receive stage: if a commit message does not conform, the hook exits with a non-zero code and the push never lands in the GitLab repository.
pre-receive reads the pushed refs from stdin as oldrev newrev refname (old commit id, new commit id, branch name), then uses git log to extract the author, date, and subject. A regex checks that the subject starts with an allowed prefix (the referenced article's example: fix|add|del|update|temp|test|revert|Merge); on mismatch it prints an error and exit 1 rejects the push.
/srv/gitlab/data/git-data/repositories/@hashed/78/5f/785f3ec7...git.custom_hooks: inside the repository directory, create a custom_hooks folder with a pre-receive file (a shell script).chmod +x pre-receive.The
docs/gitlab-integration/directory in this repo is the productionized version of that approach: it iterates over every ref on stdin (not just the first line), supports warn/reject modes, externalizes rules intocommit-rules.conf, and adds audit logging plus DingTalk reports — deployable withinstall-hooks.shas shown below.
GitLab versions bundle different git versions, and the same command can produce different output across them. For example, git log --no-merges --date-order -1 output differs between git versions — do not rely on unverified command output in hooks.
Reference article: GitLab 服务端 hook 拦截提交到仓库
Copy docs/gitlab-integration/ to the GitLab server, then run:
# single-repo pilot
sudo bash install-hooks.sh --pilot devops/7dgroup
# after pilot passes
sudo bash install-hooks.sh --global
After updating docs/gitlab-integration/commit-rules.conf in this repo:
sudo bash scripts/sync-rules.sh --global --dry-run
sudo bash scripts/sync-rules.sh --global
# daily summary
sudo bash scripts/audit-report.sh --markdown
# send to DingTalk
export DINGTALK_WEBHOOK="https://oapi.dingtalk.com/robot/send?access_token=xxx"
sudo -E bash scripts/dingtalk-notify.sh
docs/gitlab-integration/switch-to-reject-checklist.md.MODE="reject" in the deployed commit-rules.conf.For the full deployment SOP, see docs/gitlab-integration/deployment-guide.md.
prepare does not emit type declarations; the dsh loader only needs the runtime entry.docs/gitlab-integration/ files are not part of the DSH runtime bundle; copy them to the GitLab server on demand.MIT · Copyright (c) 2026 7DGroup
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: 无有效分类标签。