Pack references and optional scripts into a skill
Goal: Pack references and scripts with a short README, a version, and zero committed secrets.
Best for: people who wrote a first skill and now want it to use a style guide or a small script safely.
A skill is a reusable instruction pack (often a SKILL.md or similar). References are the extra files the skill may read (style guide, rubric, glossary). Optional scripts are tiny helpers the agent can run when the product allows—not a place to hide secrets.
Beginner rule: only pack files you would be fine pasting into a chat. Keep the pack small.
Why beginners skip this
Shipping only the skill body without references and scripts feels light—teammates cannot reproduce. Pack references + scripts together.
Step 1 — List what the skill must know
Separate always-on short rules from look-up reference files—do not stuff a whole handbook into always-on.
Skill purpose: [one line]
List:
A) Always-on rules (≤10 bullets)
B) Reference files to attach (name + why + max pages)
C) What must NOT be in the pack (secrets, whole databases)
Beginner-friendly.
Example
Filled prompt
I have a skill that links three reference PDFs and one script stub.
Write a beginner pack README: what each file is for, how to update versions, and a never-commit secrets line.
What good output looks like
- Always-on is short
- References might be voice-guide.md + example-email.md
- Secrets/client private data excluded
Step 2 — Write a tiny reference index
At the top of the skill, say when to open which reference—like a menu.
Draft a Reference index section for SKILL.md:
For each file: when to open · what to extract · what to ignore.
Example
Filled prompt
Job: Open skill card for “attach the docs and helpers a skill”. Add Done + golden example if missing. Run fail case once.
Boundaries: draft only; Unknowns [?]; no silent send; no invented metrics.
Return: checkable artifact + one-minute pass/fail for skills-pack-references-and-scripts.
What good output looks like
- Matches named constraints for “Pack references and optional scripts”
- Unknowns labeled; no invented owners/metrics
- Stops before irreversible actions
- Pass/fail markable in ≤60s
Step 3 — Scripts only with a sandbox story
Scripts do one thing and stay offline by default; if you cannot read it, do not pack it.
Decide: does this skill need a script? If yes, describe in plain words what it would do, inputs, outputs, and why a prompt alone is not enough. If no, say why.
Example
Filled prompt
Skill needs a glossary CSV + a format script note.
Pack layout: references/ allowed, no secrets, how to cite file in steps, test without prod data.
Return folder tree + never-do.
What good output looks like
- Often concludes prompt is enough for small CSV
- If script: no silent uploads
- Inputs/outputs named clearly
- If you insist on a script: offline by default; pack only what you can read
Keep it real
Run this guide’s Practice now on work you will actually ship this week—not a fictional scenario. Dated notes beat perfect theory.
Do not bookmark-only
Finish Practice now, then tick this guide on your path. Titles unread are not skills.
Close the loop
Write one line: next time I ship body-only with no refs/scripts, I refuse “shareable.”
One more pass
Re-read your Save-this-card line. If it is vague, rewrite it until a stranger could apply it.
Red flag
Shipping unread scripts; README missing; secrets in the pack—block share.
Save this card
Card: README · version · no secrets · only scripts you can read. Block share if any box is empty.
Before you start
Open the skill card (or blank one-pager). Purpose must be one job for “attach the docs and helpers a skill.” Golden example slot cannot stay empty. Guide: skills-pack-references-and-scripts. Keep the real job visible the whole time; a blank box means stop and fetch the artifact first.
How to use this week
This week pack a real skill: body + reference links + runnable script; no “shareable” until all three land.
Close the week by quoting aloud the refuse line you actually used once. If you cannot, rerun Practice now and date the pass/fail (Asia/Shanghai).
Pitfalls
| Pitfall | Fix |
|---|---|
| Attaching entire company wikis | Slim references |
| Scripts that call the internet by default | Off unless required |
| Secrets inside SKILL.md | Never |
Example
Filled prompt
Temptation: skip the habit for skills-pack-references-and-scripts to save five minutes.
Job still: attach the docs and helpers a skill
Smallest correct pass: Done visible · checkable artifact · Unknowns [?].
Boundaries: draft only; no silent send; no invented metrics.
Return: artifact + refuse-line said aloud.
What good output looks like
- Names the shortcut refused (specific to skills-pack-references-and-scripts)
- Still delivers checkable output for “attach the docs and helpers a skill”
- Unknowns labeled; draft-only
- Pass/fail: refuse-line dated (skills-pack-references-and-scripts #4)
Practice now
Broken-link hunt: open every ref link once (Asia/Shanghai).
Hash pin: note script hash/version on the skill card (Asia/Shanghai).
Missing-ref fail: delete a ref temporarily; skill should fail loud (Asia/Shanghai).
Script dry-run: run the script once with dry-run/no-op if available (Asia/Shanghai).
Ref-path drill: open the reference file once tonight to prove the path (Asia/Shanghai).
Pack-refs drill: one reference file path + one script path listed on the skill card (Asia/Shanghai).
Thin-spot drill: rewrite the Save card with real nouns from your work (repo, doc, inbox). Generic placeholders fail the drill.
Tonight open a real skill and cut references/scripts to a minimum-deps table; delete unused ones.
Today card (copy) — skills-pack-references-and-scripts: 1. Artifact I will produce: ___ 2. Pass/fail check: ___ 3. Refuse-line if tempted to skip verify/send: ___ (date: Asia/Shanghai) 4. One never-do from this guide: ___
Extra pass: do the card on a real file today—reading alone does not count.
One sentence takeaway
Body + reference links + runnable script; no “shareable” until all three.
Next
把参考资料和可选脚本打进技能包
目标: 把参考文件与脚本打成可分享的包:短 README、可升版本、绝不提交密钥。
适合: 准备把 skill 交给队友,或脚本里已经出现密钥味道的人。
永远生效的说明要短;大参考放 refs;脚本默认假设会漏密钥,分享前当安检做一遍。
为什么新手跳过
只交 skill 正文不附参考与脚本像省事;队友无法复现。参考 + 脚本一起打包。
步骤 1——列出技能必须知道什么
把「永远生效的短规则」和「需要时再查的参考文件」分开;别把整本手册塞进始终生效段。
技能用途:[一句话]
列出:
A) 永远生效的规则(≤10 条)
B) 要附上的参考文件(文件名 + 原因 + 最多几页)
C) 绝不能打进包的(密钥、整库数据)
要初学者能懂。
实例
填好的提示词
我有一个 skill,链了三份参考 PDF 和一个脚本草稿。
请写新手包 README:每个文件干什么、如何升版本,以及单独一行「绝不提交密钥」。
边界:不编造;未知标 [?];发送前停下。
完成检查:一分钟内能判过/不过。
像样的输出大概长这样
- README 写清每个文件干什么、如何升版本
- 永远生效的说明很短;参考可分 voice-guide.md 与 example-email.md
- 单独一行:绝不提交密钥与客户隐私
- 新手打开包不会迷路
- 像寄给队友的装箱单
- 一分钟内能对照清单判过/不过;缺项标红再继续
步骤 2——写一个小小的参考索引
在技能开头就告诉模型什么时候打开哪个文件,写得像点菜单一样清楚:「如果问语气,读 voice-guide.md。」
为 SKILL.md 起草「参考索引」一节:
每个文件写:何时打开 · 提取什么 · 忽略什么。
实例
填好的提示词
请批评这个包布局:/skill.md、/refs/a.pdf、/scripts/run.sh(脚本里写死了 API 密钥)。
请列出分享给队友前的 5 条卫生改法。
边界:不编造;未知标 [?];只出草稿。
像样的输出大概长这样
- 写明脚本里写死的 API 密钥必须移出
- 列出分享前 5 条卫生改法(密钥、权限、路径、说明、测试)
- 触发条件与提取范围说具体,不整本塞 PDF
- 忽略过时的 2023 报价一节写进说明
- 改完才适合丢给队友
- 一分钟内能对照清单判过/不过;缺项标红再继续
步骤 3——脚本要有沙箱说法
如果工具允许脚本:只做一件事,默认不上网,把结果打印给你看;自己看不懂的脚本,别打进技能包。
判断:这个技能需要脚本吗?如果需要,用白话写它做什么、输入、输出,以及为什么单靠提示词不够。如果不需要,说明理由。
实例
填好的提示词
这个技能把 CSV 行格式化成表格。请判断要不要脚本,并用白话写清输入输出。
如果要脚本:默认离线、禁止默默上传;读不懂就不打包。
边界:不编造;未知标 [?];发送前停下。
完成检查:一分钟内能判过/不过。
像样的输出大概长这样
- 小 CSV 常常结论是:提示词就够,不必上脚本
- 如果真要脚本:不能默默上传外部
- 输入输出名称用白话写清
- 判断过程可读,不甩「看情况」
- 帮你少装一个会漏密钥的脚本
- 如果坚持脚本:默认离线,读得懂才打包
- 一分钟内能对照清单判过/不过;缺项标红再继续
保持真实
用本周真要交付的工作做「现在就练一次」,别编假场景。带日期的实操笔记,比完美理论有用。
不要只收藏
先做完「现在就练一次」,再在学习路径上打勾。只收藏不练,标题变不成技能。
闭环
写下一行:下次只交正文不打包参考脚本,我拒绝宣布可共享。
再过一遍
重读「保存这张卡」那一行。如果含糊,改到陌生人也能执行。
红旗
只交 skill 正文不附参考与脚本,队友无法复现;参考 + 脚本一起打包。
保存这张卡
记下:skill 名 + 版本号 + 红线夹具是否测过。标上日期。
开始前
信任该 skill 前,先确认已有完成标准 + 一个实例。
本周怎么用
本周给一个真 skill 打包:正文 + 参考链接 + 可跑脚本;缺一件不宣布可共享。
常见坑
| 坑 | 改法 |
|---|---|
| 脚本写死 API 密钥 | 分享前移出并写 README |
| 参考 PDF 整本塞进永远生效 | 永远生效部分保持短 |
| 小 CSV 也上脚本 | 先问提示词是否够 |
现在就练一次
今晚就练:给一个真 skill 打包:正文 + 参考链接 + 可跑脚本;缺一件不宣布可共享。
一句话带走
正文 + 参考链接 + 可跑脚本;缺一件不宣布可共享。
下一步
← Back to home · Learn · Tools · Compare · Start