brainstorming
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).
refactor-skill-structureRefactor an over-long or poorly structured SKILL.md by extracting examples to references/EXAMPLES.md, splitting compound procedures, and reorganizing sections for progressive disclosure. Use when a skill exceeds the 500-line CI limit, when code blocks dominate the skill body, when a procedure step contains multiple unrelated operations, or after a content u…
Independent GitHub snapshot · Automated classification · Original documentation governs
過長或結構亂之 SKILL.md 重構:移例至 references/EXAMPLES.md、分複合步、序章以漸示。
references/EXAMPLES.md 乎(默是、若有可移容)讀技、按段建行算以識膨。
# Total line count
wc -l < skills/<skill-name>/SKILL.md
# Line count per section (approximate)
grep -n "^## \|^### " skills/<skill-name>/SKILL.md
膨類:
得:行算示何段過大、何膨類用之。最大段為主重構標。
敗:技未 500 行、無顯構患→此技或不需。先驗重構請有據再行。
塊 >15 行→移至 references/EXAMPLES.md、留簡內聯片(3-10 行)於主 SKILL.md。
建 references 錄:
mkdir -p skills/<skill-name>/references/
各可移塊:
references/EXAMPLES.md 描述標下See [EXAMPLES.md](references/EXAMPLES.md#heading) for the complete configuration.references/EXAMPLES.md 構以明標:
# Examples
## Example 1: Full Configuration
Complete configuration file for [context]:
\```yaml
# ... full config here ...
\```
## Example 2: Multi-Variant Setup
### Variant A: Development
\```yaml
# ... dev config ...
\```
### Variant B: Production
\```yaml
# ... prod config ...
\```
得:諸 >15 行塊已移。主 SKILL.md 留簡內聯片以易讀。交引指所移容。references/EXAMPLES.md 構良、有描述標。
敗:移碼塊不足減行(仍 >500)→步三分步。技少碼塊(如自然語技)→專注步三四。
識行多無關業之步、分之。
複合號:
各複合步:
### Step N:得:各步行一事。無步 >30 行。步數或增、各步可獨驗。
敗:分步致過細(如總 20+)→宜聚相關微步於一步含編號子步。甜點 5-12 步。
確主 SKILL.md 移後仍易讀可發。
各移:
[EXAMPLES.md](references/EXAMPLES.md#section-anchor)交引模:
See [EXAMPLES.md](references/EXAMPLES.md#full-configuration) for the complete configuration with all options.See [EXAMPLES.md](references/EXAMPLES.md#variants) for development, staging, and production variants.See [EXAMPLES.md](references/EXAMPLES.md#troubleshooting) for additional error scenarios.得:各移有應交引。讀者可循主 SKILL.md 應常情、入 references 求詳。
敗:交引致文流尷→聚多引於步末一註:For extended examples including [X], [Y], and [Z], see [EXAMPLES.md](references/EXAMPLES.md).
諸變後重量 SKILL.md 行。
# Check main SKILL.md
lines=$(wc -l < skills/<skill-name>/SKILL.md)
[ "$lines" -le 500 ] && echo "SKILL.md: OK ($lines lines)" || echo "SKILL.md: STILL OVER ($lines lines)"
# Check references file if created
if [ -f skills/<skill-name>/references/EXAMPLES.md ]; then
ref_lines=$(wc -l < skills/<skill-name>/references/EXAMPLES.md)
echo "EXAMPLES.md: $ref_lines lines"
fi
# Total content
echo "Total content: $((lines + ${ref_lines:-0})) lines"
得:SKILL.md <500 行。理 <400 留後增地。references/EXAMPLES.md 無行限。
敗:移分後仍 >500→宜分為二技。一技覆過廣為範蔓號。用 create-skill 建第二技、二者皆更 Related Skills 交引。
重構後、驗技仍有諸必段、首端完。
行 review-skill-format 單:
# Quick section check
for section in "## When to Use" "## Inputs" "## Procedure" "## Common Pitfalls" "## Related Skills"; do
grep -q "$section" skills/<skill-name>/SKILL.md && echo "$section: OK" || echo "$section: MISSING"
done
grep -qE "## Validation( Checklist)?" skills/<skill-name>/SKILL.md && echo "Validation: OK" || echo "Validation: MISSING"
得:諸段皆存。移時無容誤刪。SKILL.md 之交引解至 EXAMPLES.md 真標。
敗:段誤刪→自 git 史復:git diff skills/<skill-name>/SKILL.md 視變。交引斷→驗 EXAMPLES.md 標錨合 SKILL.md 鏈(GitHub 風 markdown 錨律:小寫、空為連、去標點)。
references/EXAMPLES.md 含描述標review-skill-format 過於重構後之技grep -c "heading-text" references/EXAMPLES.md 測review-skill-format — 重構後行格驗確技仍合update-skill-content — 容更常為構重構之觸、其推技過行限create-skill — 決如何組移容時參標構evolve-skill — 技需分為二技時、用演建衍