吾本可创一泛称之"补丁"之技。模板索症状、期行、已试之策。有用。泛化。易忘。
然吾察吾之git日志。于此项目,三十次提交中,有八次触及同一Node.js子系统。常见之模式:API超时,slug正则,损坏之JSON文件。吾所创之技,不索症状——直读三文件,可解八成之失,依序而行。此乃通用模板与定制技之别也。
Git之志乃汝实所行之最诚文牍。此乃如何用之以生自动触发之技.
审察:Git之志所真显者
始于此令:
git log --oneline -50 | awk '{$1=""; print $0}' | sed 's/([^)]*)//' | sort | uniq -c | sort -rn | head -20
所见:近五十次提交中,各任务类型之实频。于此作品集:
8 fix(veille): Node.js watch system — frequent bugs, complex architecture
5 feat(blog): article creation — always the same file order
3 fix(blog): post-publication fixes — typos, PHP syntax, slugs
2 refactor(veille): refactors of the same subsystem
1 docs(publish): workflow updates
三征以察之:
- 频度 — 往复者,技之所存也。偶为之务,非也.
- 复用之域 — 同件共改,技知所之矣.
- 同系之修 — 数多
fix(X)→ 识其弊之所在,当为之码.
于此,补以频触之文:
git log --oneline -30 --name-only | grep -v "^[a-f0-9]" | sort | uniq -c | sort -rn | head -15
案卷之记不足,言谈之史亦重
诸事之记,所为之事,所行之频此不告君以所询之由,亦不示所问之故,或致龃龉之由于交际。此常为精妙之技藏焉。
言谈往复显:
- 澄问之需,每会必询→所缺之讯,未得编码于技
- 修正若"非也,非如此,当如此"者,乃制约之明示也
- 屡次重拟之文,当为触发之确钥
- 数度重释之事,当在技能之属,非存于心也
世俗实践,未尝录原始之语。然有三源摄其精要
1. 记忆之牍(反馈)
每存一正,皆为直讯。于此项目,memory/feedback_article_workflow.md所含者:
Don't go through brainstorming for articles — too much ceremony.
Write directly in order: FR → EN → posts.json → OG → php -l → commit → deploy.
此即blog-article之要约。非在码中,而在正史。无记,则每会须重释此律.
2. CLAUDE.md之Git日志
git log --oneline -- CLAUDE.md .claude/CLAUDE.md
凡改 CLAUDE.md 者皆摩擦之迹,迫令规更——多因会话有失所致。此增补,实为技艺之材之适选.
3. 工作流提交(文档,杂务)
于此项目:docs(publish): add article creation workflow to CLAUDE.publish.md是也。前会显隙,故此录存。当日所增,恰应技能所载。
二源并合
源
所显
所宜
Git日志所录
频务同触之文,脆系之统
辨识当立之技能
記憶/回饋
往昔糾正、所學約束、摩擦之點
技藝內涵與約束
CLAUDE.md之Git日誌
摩擦後所增之規則
非顯而易見之約束待編碼
文件/維護提交
會議中所顯文件之缺失
序列與邊界情況
由git log所生之技,知所行之事。由git log所生之技,兼及之修正史,知所行之事,亦知其勿谬之道。
将式转为技
克劳德代码之技,乃markdown之文也~/.claude/plugins/<name>/skills/<name>/SKILL.md至简之构:
---
name: skill-name
description: ">"
[Trigger conditions — this is where everything happens]
---
[What Claude should do when the skill is triggered]
"其"description非文牍也,乃探察之式Claude 每读一讯,必决此技之适否。其应曰:此技何境乃适?
描述模糊则致误报与漏报
# ❌ Too vague
description: Use when there's a bug.
# ✅ Precise
description: >
Use for any bug, error or unexpected behavior in the automated watch/veille system.
Trigger on: "veille doesn't work", "job not running", "article not generated",
any error in scripts/veille/ or logs/veille-daemon.log.
Do NOT trigger for blog PHP bugs or deploy issues.
末句——“勿触发”——与正向条件同等重要。其可防类技能相撞
具体之例:此项目所生三技
《git日志》显三殊式。今列其应技于下.
技一—制文( feat(blog) × 5)
五次合,恒同其序:PHP FR → PHP EN → posts.json → OG图 → php -l → 合 → 部署。缺一节,则部署不克.
---
name: blog-article
description: >
Use when asked to create, write, draft or publish a blog article.
Trigger on: "new article", "write about X", "publish on LinkedIn/dev.to",
any mention of blog post creation or article workflow.
---
Mandatory execution order:
1. blog/posts/<slug>.php — complete FR version
2. blog/posts/<slug>.en.php — complete EN version
3. blog/posts.json — FR + EN entry, first position
4. npm run og <slug> — OG image
5. php -l on both files — syntax check
6. git commit + push
7. node scripts/publish-article.js <slug> — LinkedIn + dev.to + deploy
Never skip a step. Never commit without php -l.
技能二—守望调试(修(守望)×八)
同一子系统中八次修整提交。已知故障点,直书其事可也。
---
name: veille-debug
description: >
Use for any bug, error or unexpected behavior in the automated watch/veille system.
Trigger on: veille errors, jobs not running, articles not generated, daemon issues,
Claude API timeouts in watch context, slug/registry problems.
Do NOT trigger for blog PHP bugs or LinkedIn/dev.to publishing issues.
---
Read in this order before any diagnosis:
1. scripts/veille/registry.json — configured jobs and their state
2. logs/veille-daemon.log — last execution (timestamp + errors)
3. scripts/veille/runner.js — general architecture
Known failure points (by frequency):
- Claude API timeout → increase timeout in the job config
- Slug regex too restrictive → test with node scripts/veille/test-slug.js
- Corrupt updates.json → delete the file, system recreates on next run
- Wrong cron working directory → check WorkingDirectory in systemd .service
- renderArticle() not writing → verify article.json exists with correct fields
技能三—刊后修正(修(博客)×三)
---
name: blog-fix
description: >
Use for small fixes on already-published blog articles: typos, grammar,
PHP syntax errors, slug corrections, missing tags.
Trigger after publication, not during creation.
Do NOT trigger for new article creation.
---
Constraints for post-publication fixes:
- Never run scripts/deploy.sh (full deploy)
- Use bash scripts/deploy-files.sh <file1> <file2> (targeted deploy)
- php -l mandatory before any deploy
- If posts.json modified → include it in deploy-files.sh
Commit convention: fix(blog): <short description>
何以致技自发之善
数周习用,效者:
简述配以实词。"触发于:警误、任未行"胜于"用之,则自系统有弊。"词宜合乎自若所书。
一境一技。 若二技可应同境,克劳德择之,非恒得其宜。宁择一技而条件较广,毋使二技相似而相扰。
编码隐约之制。 "勿以deploy.sh为修之策"者,若非内含于技,则每临其境必复习之。此即技所当编:已决之断,毋令屡改。
试变之验. 触发于"文章"而非"博客"或"领英帖"之技,谬调矣。列尔实用于描述之自然表述.
结论
git之日志,乃最佳之始点,以其诚也。显尔所实为,非尔所自谓为。频务之事,脆弱之系,不变之序——皆在焉。
更正之迹——记忆之文,CLAUDE.md之演进,工作之程——补git之志所不能显:事之问若何,纷争之所由,所习之制若何。
独凭git之志而生之技,知所行。兼凭git之志与更正之迹而生之技,知所行,且知何以不为谬。其别,惟读二源各三十分钟耳。












