360 Secure SkillHub
360 安全技能中心

arch-sign-off

核心功能为向ai-thoughts/docs目录下的文章末尾追加固定签名行`btw, i use arch`,中英文版本均保留原文不翻译。默认自动执行,仅用户明确拒绝时跳过;已存在则不重复添加,不作用于目录外文件、README等非文章,有中文对应稿件时同步处理。适用于新建、完成该目录文章或用户要求添加的场景,可输入目标文章路径,无输入则处理当前撰写的文章,输出带正确签名的文件。

j3ffyang
j3ffyang
热度 50.79
最近更新 2026-10-07 21:51:18
分类:效率依赖:读写文件 / 代码执行应用场景:博客写作

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add arch-sign-off
Metadata
name
arch-sign-off
description
Append the Arch Linux sign-off line `btw, i use arch` to the very bottom of an article in ai-thoughts/docs/ (EN or ZH). This is a standing default for every article: apply it unless the user explicitly says not to. Use when writing or finishing any new article, or when the user asks to add it.

Arch Sign-off

Append the Arch Linux sign-off line to the bottom of an article in ai-thoughts/docs/.

Default rule — read before anything else

  • Every article in ai-thoughts/docs/ ends with the sign-off line, unless the user explicitly says otherwise. "Unless I say no" means: if the user has not told you to skip it, append it.
  • The sign-off is one line at the very bottom of the file, as its own paragraph:
btw, i use arch
  • The sign-off stays verbatim English in both the EN and the ZH (-zh-hans.md, legacy -chn.md) versions. Do not translate it.
  • If the sign-off is already present, do not duplicate it.

Inputs

  • target — path to the article in ai-thoughts/docs/ (optional). If omitted, apply to the article currently being written.

Outputs

  • The article file with the sign-off line at the end (or unchanged if already present).

Procedure

  1. Check the bottom of the target article.
  2. If the last line is already btw, i use arch, stop — nothing to do.
  3. Otherwise append the sign-off as the final line, separated by one blank line from the preceding paragraph.
  4. When the article has a Chinese counterpart (-zh-hans.md or legacy -chn.md), apply the same line to it (verbatim English).
  5. Keep one paragraph per line (no hard-wrap); the sign-off is a single short line.

Insertion

python3 -c "
import pathlib; p = pathlib.Path('TARGET_FILE');
c = p.read_text();
if 'btw, i use arch' not in c:
    p.write_text(c.rstrip() + '\n\nbtw, i use arch\n')
"

Replace TARGET_FILE with the article path.

Verification

  • tail -1 FILE outputs exactly btw, i use arch.
  • No duplicate sign-off lines.
  • The Chinese version (if any — -zh-hans.md or legacy -chn.md) carries the identical line.

Error Handling

  • User says no: do not append; leave the article as-is.
  • Not an article: never append to READMEs, articles.yaml, or files outside ai-thoughts/docs/.